[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: CRYPT32: iod.c compile problem (gcc 2.95)
From:       Juan Lang <juan_lang () yahoo ! com>
Date:       2006-02-27 17:23:07
Message-ID: 20060227172307.38981.qmail () web32115 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

Like this.

ChangeLog: correct compile problem on gcc 2.95.

--Juan

--- Vitaly Lipatov <lav@etersoft.ru> wrote:

> I try compile last version with gcc 2.95 and get it failed:
> $ make
> gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ 
> -D_CRYPT32_ 
> -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -gstabs+
> -Wpointer-arith  
> -O2 -march=i586  -o oid.o oid.c
> oid.c: In function `init_oid_info':
> oid.c:940: structure has no member named `Algid'
> oid.c:969: structure has no member named `Algid'
> oid.c: In function `CryptFindOIDInfo':
> oid.c:1037: structure has no member named `Algid'
> oid.c:1089: structure has no member named `Algid'
> oid.c: In function `CertOIDToAlgId':
> oid.c:1126: structure has no member named `Algid'
> 
> There is unnamed union, and such construction does no recognized old the
> 
> compiler. What the best way to fix it?
> 
> -- 
> Vitaly Lipatov, ALT Linux Team
> Russia, Saint-Petersburg, www.etersoft.ru
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
["nonameless.diff" (text/x-patch)]

Index: dlls/crypt32/oid.c
===================================================================
RCS file: /home/wine/wine/dlls/crypt32/oid.c,v
retrieving revision 1.5
diff -u -r1.5 oid.c
--- dlls/crypt32/oid.c	24 Feb 2006 10:49:48 -0000	1.5
+++ dlls/crypt32/oid.c	27 Feb 2006 17:19:58 -0000
@@ -18,6 +18,7 @@
  */
 #include <stdio.h>
 #include <stdarg.h>
+#define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
 #include "wincrypt.h"
@@ -937,7 +938,7 @@
                 info->info.pszOID = oidInfoConstructors[i].pszOID;
                 info->info.pwszName = oidInfoConstructors[i].pwszName;
                 info->info.dwGroupId = oidInfoConstructors[i].dwGroupId;
-                info->info.Algid = oidInfoConstructors[i].Algid;
+                info->info.u.Algid = oidInfoConstructors[i].Algid;
                 if (oidInfoConstructors[i].blob)
                 {
                     info->info.ExtraInfo.cbData =
@@ -966,7 +967,7 @@
                     info->info.pwszName =
                      (LPWSTR)((LPBYTE)info + sizeof(struct OIDInfo));
                     info->info.dwGroupId = oidInfoConstructors[i].dwGroupId;
-                    info->info.Algid = oidInfoConstructors[i].Algid;
+                    info->info.u.Algid = oidInfoConstructors[i].Algid;
                     LoadStringW(hinst, (UINT)oidInfoConstructors[i].pwszName,
                      (LPWSTR)info->info.pwszName, len + 1);
                     if (oidInfoConstructors[i].blob)
@@ -1034,7 +1035,7 @@
         EnterCriticalSection(&oidInfoCS);
         LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
         {
-            if (info->info.Algid == *(DWORD *)pvKey &&
+            if (info->info.u.Algid == *(DWORD *)pvKey &&
              (!dwGroupId || info->info.dwGroupId == dwGroupId))
             {
                 ret = &info->info;
@@ -1086,7 +1087,7 @@
         EnterCriticalSection(&oidInfoCS);
         LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
         {
-            if (info->info.Algid == *(DWORD *)pvKey &&
+            if (info->info.u.Algid == *(DWORD *)pvKey &&
              info->info.ExtraInfo.cbData >= sizeof(DWORD) &&
              *(DWORD *)info->info.ExtraInfo.pbData ==
              *(DWORD *)((LPBYTE)pvKey + sizeof(DWORD)) &&
@@ -1123,7 +1124,7 @@
      (void *)pszObjId, 0);
 
     if (info)
-        ret = info->Algid;
+        ret = info->u.Algid;
     else
         ret = 0;
     return ret;




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic