diff options
author | Brent Cook <bcook@openbsd.org> | 2015-10-14 17:19:00 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-10-14 23:54:25 -0500 |
commit | 1dd79f5d8f617afdb0f5d51ac0278d7b4f84b82f (patch) | |
tree | 9b162ede77ad68a694d09863cdd199585024bfb0 /include | |
parent | 448645d47991e36337c11dff0271be77218e82c7 (diff) | |
download | portable-1dd79f5d8f617afdb0f5d51ac0278d7b4f84b82f.tar.gz portable-1dd79f5d8f617afdb0f5d51ac0278d7b4f84b82f.tar.bz2 portable-1dd79f5d8f617afdb0f5d51ac0278d7b4f84b82f.zip |
add limits.h shim for defining PATH_MAX on HP-UX
Diffstat (limited to 'include')
-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 | ||