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/compat/arpa | |
| 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/compat/arpa')
| -rw-r--r-- | include/compat/arpa/inet.h | 19 | ||||
| -rw-r--r-- | include/compat/arpa/nameser.h | 23 |
2 files changed, 42 insertions, 0 deletions
diff --git a/include/compat/arpa/inet.h b/include/compat/arpa/inet.h new file mode 100644 index 0000000..0cea8c4 --- /dev/null +++ b/include/compat/arpa/inet.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * Public domain | ||
| 3 | * arpa/inet.h compatibility shim | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _WIN32 | ||
| 7 | #include_next <arpa/inet.h> | ||
| 8 | #else | ||
| 9 | #include <win32netcompat.h> | ||
| 10 | |||
| 11 | #ifndef AI_ADDRCONFIG | ||
| 12 | #define AI_ADDRCONFIG 0x00000400 | ||
| 13 | #endif | ||
| 14 | |||
| 15 | #endif | ||
| 16 | |||
| 17 | #ifndef HAVE_INET_PTON | ||
| 18 | int inet_pton(int af, const char * src, void * dst); | ||
| 19 | #endif | ||
diff --git a/include/compat/arpa/nameser.h b/include/compat/arpa/nameser.h new file mode 100644 index 0000000..0126a60 --- /dev/null +++ b/include/compat/arpa/nameser.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Public domain | ||
| 3 | * arpa/inet.h compatibility shim | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _WIN32 | ||
| 7 | #include_next <arpa/nameser.h> | ||
| 8 | #else | ||
| 9 | #include <win32netcompat.h> | ||
| 10 | |||
| 11 | #ifndef INADDRSZ | ||
| 12 | #define INADDRSZ 4 | ||
| 13 | #endif | ||
| 14 | |||
| 15 | #ifndef IN6ADDRSZ | ||
| 16 | #define IN6ADDRSZ 16 | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #ifndef INT16SZ | ||
| 20 | #define INT16SZ 2 | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #endif | ||
