The following change to dlls/crypt32/cert.c
revision 1.36
date: 2007-01-12 20:56:12 +0100; author: julliard; state: Exp; lines: +56 -57
Paul Vriens <paul.vriens.wine(a)gmail.com>
crypt32/tests: Cast-qual warning fixes.
breaks the bootstrap on some of my systems. Specifically, it added a new
variable
static WCHAR ms_def_prov_w[] = MS_DEF_PROV_W;
initialized with MS_DEF_PROV_W.
However, in include/wincrypt.h we have the following:
#if defined(__GNUC__)
# define MS_DEF_PROV_W (const WCHAR []){ ... }
#elif defined(_MSC_VER)
# define MS_DEF_PROV_W L"Microsoft Base Cryptographic Provider v1.0"
#else
static const WCHAR MS_DEF_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
'B','a','s','e',' ','C','r','y','p','t','o','g','r','a','p','h','i','c',' ',
'P','r','o','v','i','d','e','r',' ','v','1','.','0',0 };
#endif
In my case this breaks for GCC 3.4:
/usr/bin/gcc -c -I. -I. -I../../../include -I../../../include
-D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith
-g -O2 -o cert.o cert.c
cert.c:312: error: invalid initializer
Gerald
PS: The patch below avoids this breakage on my test system, but is
obviously not the real fix.
Index: cert.c
===================================================================
RCS file: /home/wine/wine/dlls/crypt32/tests/cert.c,v
retrieving revision 1.36
diff -u -3 -p -r1.36 cert.c
--- cert.c 12 Jan 2007 19:56:12 -0000 1.36
+++ cert.c 13 Jan 2007 17:08:00 -0000
@@ -309,7 +309,10 @@ static void checkHash(const BYTE *data,
}
static WCHAR cspNameW[] = { 'W','i','n','e','C','r','y','p','t','T','e','m','p',0 };
-static WCHAR ms_def_prov_w[] = MS_DEF_PROV_W;
+static WCHAR ms_def_prov_w[] = { 'M','i','c','r','o','s','o','f','t',' ' ,
+ 'B','a','s','e',' ','C','r','y','p','t','o','g','r','a','p','h','i','c', ' ',
+ 'P','r','o','v','i','d','e','r',' ','v','1','.','0',0 };
+
static void testCertProperties(void)
{