diff options
author | Brent Cook <busterb@gmail.com> | 2014-07-10 22:06:10 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-07-21 12:08:18 -0500 |
commit | 5d8a1cf7155130bd8101090d7e1d0c2f90d9b123 (patch) | |
tree | 286f7d12e3647f94bd1e6e8e180a4bf6215a0740 /include/machine | |
parent | 7a4a37cf596697ae96eeb1c555989e6d1a443187 (diff) | |
download | portable-5d8a1cf7155130bd8101090d7e1d0c2f90d9b123.tar.gz portable-5d8a1cf7155130bd8101090d7e1d0c2f90d9b123.tar.bz2 portable-5d8a1cf7155130bd8101090d7e1d0c2f90d9b123.zip |
add initial CMake and Visual Studio build support
This moves the compatibility include files from include to
include/compat so we can use the awful MS C compiler
<../include/> trick to emulate the GNU #include_next extension.
This also removes a few old compat files we do not need anymore.
Diffstat (limited to 'include/machine')
-rw-r--r-- | include/machine/endian.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/include/machine/endian.h b/include/machine/endian.h deleted file mode 100644 index 5ec39af..0000000 --- a/include/machine/endian.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Public domain | ||
3 | * machine/endian.h compatibility shim | ||
4 | */ | ||
5 | |||
6 | #ifndef LIBCRYPTOCOMPAT_BYTE_ORDER_H_ | ||
7 | #define LIBCRYPTOCOMPAT_BYTE_ORDER_H_ | ||
8 | |||
9 | #if defined(_WIN32) | ||
10 | |||
11 | #define LITTLE_ENDIAN 1234 | ||
12 | #define BIG_ENDIAN 4321 | ||
13 | #define PDP_ENDIAN 3412 | ||
14 | |||
15 | /* | ||
16 | * Use GCC and Visual Studio compiler defines to determine endian. | ||
17 | */ | ||
18 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | ||
19 | #define BYTE_ORDER LITTLE_ENDIAN | ||
20 | #else | ||
21 | #define BYTE_ORDER BIG_ENDIAN | ||
22 | #endif | ||
23 | |||
24 | #elif defined(__linux__) | ||
25 | #include <endian.h> | ||
26 | |||
27 | #elif defined(__sun) || defined(_AIX) || defined(__hpux) | ||
28 | #include <sys/types.h> | ||
29 | #include <arpa/nameser_compat.h> | ||
30 | |||
31 | #elif defined(__sgi) | ||
32 | #include <standards.h> | ||
33 | #include <sys/endian.h> | ||
34 | |||
35 | #else | ||
36 | #include_next <machine/endian.h> | ||
37 | |||
38 | #endif | ||
39 | |||
40 | #endif | ||