aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Makefile.am1
-rw-r--r--include/compat/limits.h26
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
8noinst_HEADERS += compat/dirent.h 8noinst_HEADERS += compat/dirent.h
9noinst_HEADERS += compat/dirent_msvc.h 9noinst_HEADERS += compat/dirent_msvc.h
10noinst_HEADERS += compat/err.h 10noinst_HEADERS += compat/err.h
11noinst_HEADERS += compat/limits.h
11noinst_HEADERS += compat/netdb.h 12noinst_HEADERS += compat/netdb.h
12noinst_HEADERS += compat/poll.h 13noinst_HEADERS += compat/poll.h
13noinst_HEADERS += compat/readpassphrase.h 14noinst_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