summaryrefslogtreecommitdiff
path: root/libcrypto/libcrypto/downstream/openssl/opensslconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcrypto/libcrypto/downstream/openssl/opensslconf.h')
-rw-r--r--libcrypto/libcrypto/downstream/openssl/opensslconf.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/libcrypto/libcrypto/downstream/openssl/opensslconf.h b/libcrypto/libcrypto/downstream/openssl/opensslconf.h
index f6692c8..810306b 100644
--- a/libcrypto/libcrypto/downstream/openssl/opensslconf.h
+++ b/libcrypto/libcrypto/downstream/openssl/opensslconf.h
@@ -7,13 +7,9 @@
#define LIBCRYPTO_DOWNSTREAM_OPENSSL_OPENSSLCONF_H
/*
- * Include upstream's auto-generated platform-specific opensslconf.h.
- */
-#include <openssl/opensslconf/platform.h>
-
-/*
- * Define OPENSSL_PIC and {L|B}_ENDIAN macros if we are building libcrypto
- * (see ../../buildfile for details).
+ * Define OPENSSL_PIC and {L|B}_ENDIAN macros (that upstream defines on the
+ * command line via -D) if we are building libcrypto (see ../../buildfile for
+ * details).
*/
#ifdef LIBCRYPTO_BUILD
# define OPENSSL_PIC
@@ -26,13 +22,17 @@
# else
# if defined(_WIN32)
# ifndef BYTE_ORDER
-# define BYTE_ORDER LITTLE_ENDIAN
+# define BIG_ENDIAN 4321
+# define LITTLE_ENDIAN 1234
+# define BYTE_ORDER LITTLE_ENDIAN
# endif
# else
-# include <sys/param.h> /* BYTE_ORDER/__BYTE_ORDER */
+# include <sys/param.h> /* BYTE_ORDER/__BYTE_ORDER */
# ifndef BYTE_ORDER
# ifdef __BYTE_ORDER
-# define BYTE_ORDER __BYTE_ORDER
+# define BYTE_ORDER __BYTE_ORDER
+# define BIG_ENDIAN __BIG_ENDIAN
+# define LITTLE_ENDIAN __LITTLE_ENDIAN
# else
# error no BYTE_ORDER/__BYTE_ORDER define
# endif
@@ -47,4 +47,9 @@
# endif
#endif
+/*
+ * Include upstream's auto-generated platform-specific opensslconf.h.
+ */
+#include <openssl/opensslconf/platform.h>
+
#endif /* LIBCRYPTO_DOWNSTREAM_OPENSSL_OPENSSLCONF_H */