Hello,
I can't compile any C++ source that includes <openssl/ssl.h> and <unistd.h>
with -D_XOPEN_SOURCE and -pedantic
The reason is this:
1.cpp:
#include <unistd.h>
#include <openssl/ssl.h>
int main() {}
g++ -x c++ -D_XOPEN_SOURCE -o 1 1.cpp -pedantic
In file included from /usr/include/openssl/evp.h:80,
from /usr/include/openssl/pem.h:67,
from /usr/include/openssl/ssl.h:148,
from 1.cpp:3:
/usr/include/openssl/des.h:194: declaration of `char *crypt (const char
*, const char *)' throws different exceptions
/usr/include/unistd.h:953: than previous declaration `char *crypt
(const char *, const char *) throw ()'
/usr/include/unistd.h:
/* XPG4.2 specifies that prototypes for the encryption functions must
be defined here. */
#ifdef __USE_XOPEN
/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
extern char *crypt (__const char *__key, __const char *__salt) __THROW;
/usr/include/openssl/des.h:
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
char *crypt(const char *buf,const char *salt);
#endif
OpenSSL version (the crypt() prototype is still in the newest snapshot):
OpenSSL 0.9.5a 1 Apr 2000
built on: Die Aug 29 16:25:21 CEST 2000
platform: linux-elf
options: bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int)
blowfish(idx)
compiler: gcc -fPIC -DTHREADS -D_REENTRANT -DL_ENDIAN -DTERMIO -O3
-fomit-frame-pointer -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
OS: Linux (Distribution: RedHat 7.0beta, Kernel: 2.4.0-test6, i386)
Compiler: gcc version 2.96 20000724 (experimental)
glibc: 2.1.92 (in older versions, there was no __THROW)
Why do you declare crypt() at all, isn't that the job of the system headers?
Thanks,
-Malte
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]