On certain platforms, we redefine certain symbols using macros in
authorRichard Levitte <levitte@openssl.org>
Thu, 24 Oct 2002 10:03:55 +0000 (10:03 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 24 Oct 2002 10:03:55 +0000 (10:03 +0000)
apps.h.  For those, it's better to include apps.h after the system
headers where those symbols may be defined, since there's otherwise a
chance that the C compiler will barf when it sees something that looks
like this after expansion:

int VMS_strcasecmp((str1),(str2))(const char *, const char *);

apps/apps.c
apps/ca.c

index 5863b33850ea9048351e93d2925e97f1d514823c..b2a28c9b4d23942b79f4c230a154e556a0006532 100644 (file)
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#define NON_MAIN
-#include "apps.h"
-#undef NON_MAIN
 #include <openssl/err.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #  endif /* NO_STRINGS_H */
 #endif
 
+#define NON_MAIN
+#include "apps.h"
+#undef NON_MAIN
+
 #ifdef OPENSSL_SYS_WINDOWS
 #  include "bss_file.c"
 #endif
index 4867f309c7a0645aa4c24d7083942ad15d52684b..1242d373220046dc662f0d2deeea7fe196e465fc 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -64,7 +64,6 @@
 #include <ctype.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "apps.h"
 #include <openssl/conf.h>
 #include <openssl/bio.h>
 #include <openssl/err.h>
@@ -99,6 +98,8 @@
 #  endif
 #endif
 
+#include "apps.h"
+
 #ifndef W_OK
 #  define F_OK 0
 #  define X_OK 1