diff options
-rw-r--r-- | include/Makefile.am | 1 | ||||
-rw-r--r-- | include/compat/limits.h | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index b3c3549..98920b4 100644 --- a/include/Makefile.am +++ b/include/Makefile.am | |||
@@ -8,6 +8,7 @@ noinst_HEADERS = pqueue.h | |||
8 | noinst_HEADERS += compat/dirent.h | 8 | noinst_HEADERS += compat/dirent.h |
9 | noinst_HEADERS += compat/dirent_msvc.h | 9 | noinst_HEADERS += compat/dirent_msvc.h |
10 | noinst_HEADERS += compat/err.h | 10 | noinst_HEADERS += compat/err.h |
11 | noinst_HEADERS += compat/limits.h | ||
11 | noinst_HEADERS += compat/netdb.h | 12 | noinst_HEADERS += compat/netdb.h |
12 | noinst_HEADERS += compat/poll.h | 13 | noinst_HEADERS += compat/poll.h |
13 | noinst_HEADERS += compat/readpassphrase.h | 14 | noinst_HEADERS += compat/readpassphrase.h |
diff --git a/include/compat/limits.h b/include/compat/limits.h new file mode 100644 index 0000000..ca96125 --- /dev/null +++ b/include/compat/limits.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Public domain | ||
3 | * limits.h compatibility shim | ||
4 | */ | ||
5 | |||
6 | #ifndef LIBCRYPTOCOMPAT_LIMITS_H | ||
7 | #define LIBCRYPTOCOMPAT_LIMITS_H | ||
8 | |||
9 | #ifdef _MSC_VER | ||
10 | #if _MSC_VER >= 1900 | ||
11 | #include <../ucrt/limits.h> | ||
12 | #else | ||
13 | #include <../include/limits.h> | ||
14 | #endif | ||
15 | #else | ||
16 | #include_next <limits.h> | ||
17 | #endif | ||
18 | |||
19 | #ifdef __hpux | ||
20 | #include <sys/param.h> | ||
21 | #ifndef PATH_MAX | ||
22 | #define PATH_MAX MAXPATHLEN | ||
23 | #endif | ||
24 | #endif | ||
25 | |||
26 | #endif | ||