summaryrefslogtreecommitdiff
path: root/libcrypto/libcrypto/downstream/openssl/opensslconf.h
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-02-26 17:04:25 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-02-28 16:07:10 +0300
commit0ca0851a01251b960ba19d958978004168f58593 (patch)
treed50cc7f7d17e1f1a79dd2c1026606ed23540222d /libcrypto/libcrypto/downstream/openssl/opensslconf.h
parent05e886fee177833f75d01ebf72f120021f71f130 (diff)
Add implementation
Diffstat (limited to 'libcrypto/libcrypto/downstream/openssl/opensslconf.h')
-rw-r--r--libcrypto/libcrypto/downstream/openssl/opensslconf.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/libcrypto/libcrypto/downstream/openssl/opensslconf.h b/libcrypto/libcrypto/downstream/openssl/opensslconf.h
new file mode 100644
index 0000000..f6692c8
--- /dev/null
+++ b/libcrypto/libcrypto/downstream/openssl/opensslconf.h
@@ -0,0 +1,50 @@
+/* file : libcrypto/downstream/openssl/opensslconf.h -*- C -*-
+ * copyright : Copyright (c) 2018-2019 Code Synthesis Ltd
+ * license : OpenSSL and SSLeay Licenses; see accompanying LICENSE file
+ */
+
+#ifndef LIBCRYPTO_DOWNSTREAM_OPENSSL_OPENSSLCONF_H
+#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).
+ */
+#ifdef LIBCRYPTO_BUILD
+# define OPENSSL_PIC
+
+/*
+ * Endianess.
+ */
+# ifdef __FreeBSD__
+# include <sys/endian.h> /* BYTE_ORDER */
+# else
+# if defined(_WIN32)
+# ifndef BYTE_ORDER
+# define BYTE_ORDER LITTLE_ENDIAN
+# endif
+# else
+# include <sys/param.h> /* BYTE_ORDER/__BYTE_ORDER */
+# ifndef BYTE_ORDER
+# ifdef __BYTE_ORDER
+# define BYTE_ORDER __BYTE_ORDER
+# else
+# error no BYTE_ORDER/__BYTE_ORDER define
+# endif
+# endif
+# endif
+# endif
+
+# if BYTE_ORDER == BIG_ENDIAN
+# define B_ENDIAN
+# else
+# define L_ENDIAN
+# endif
+#endif
+
+#endif /* LIBCRYPTO_DOWNSTREAM_OPENSSL_OPENSSLCONF_H */