[openssl.org #1987] Definition of STRING conflicts with ntsecapi.h

2009-07-27 Thread Stephen Henson via RT
 [c...@savagexi.com - Mon Jul 20 11:01:32 2009]:
 
 
 I assume other programs that use openssl and ntsecapi will also fail
 to
 compile.  Any chance these generic typedefs can be changed to
 something
 like OPENSSL_STRING and OPENSSL_CSTRING?

This has been changed to OPENSSL_STRING etc. Please check the latest
snapshots resolve this issue.

Steve.
-- 
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #1987] Definition of STRING conflicts with ntsecapi.h

2009-07-20 Thread Charlie Savage via RT
 From safestack.h, line 113, in 1.0 beta 3:

typedef char *STRING;

typedef const char *CSTRING;

Using such generic names seems like a really bad idea - its asking for 
conflicts.  And they do happen, at least on windows.  The problem is 
that one of the windows headers, ntsecapi.h around line 134, also define 
STRING:

typedef struct _STRING {
   USHORT Length;
   USHORT MaximumLength;
   PCHAR Buffer;
} STRING, *PSTRING;

To see this blow up, compile postgresql 8.4 setting the --with-openssl 
flag, using mingw.  You'll get this error:

gcc -O2 -g -mms-bitfields -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing 
-fwrapv -I../../../../src/include -I/usr/local/include 
-I./src/include/port/win32 -DEXEC_BACKEND -I/usr/local/include/libxml2 
-I../../../../src/include/port/win32 -DBUILDING_DLL  -c
-o printtup.o printtup.c
In file included from ../../../../src/include/libpq/libpq-be.h:51,
  from ../../../../src/include/libpq/libpq.h:21,
  from printtup.c:19:
c:\development\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/ntsecapi.h:137:
 
error: conflicting types for 'STRING'
C:/Development/msys/local/include/openssl/safestack.h:113: note: 
previous declaration of 'STRING' was here


I assume other programs that use openssl and ntsecapi will also fail to 
compile.  Any chance these generic typedefs can be changed to something 
like OPENSSL_STRING and OPENSSL_CSTRING?

Thanks,

Charlie Savage
http://cfis.savagexi.com







Specifically, when building postgresql 8.4 these names mingw,




Thanks,

Charlie



smime.p7s
Description: S/MIME cryptographic signature