summaryrefslogtreecommitdiff
path: root/src/internal/slibtool_spawn_impl.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-20 16:14:22 -0400
committermidipix <writeonce@midipix.org>2016-03-20 16:47:38 -0400
commit22fe2598d3740a8537695edd5d5b7d5c6301f1b9 (patch)
tree98e35579c4ed7af0e6bdd73f961a12769dd7b5cc /src/internal/slibtool_spawn_impl.h
parent3c594dd51a8e699837b32a1c90b1e318d3e0b2fa (diff)
downloadslibtool-22fe2598d3740a8537695edd5d5b7d5c6301f1b9.tar.bz2
slibtool-22fe2598d3740a8537695edd5d5b7d5c6301f1b9.tar.xz
move the fallback definition of PATH_MAX to slibtool_spawn_impl.h.
Diffstat (limited to 'src/internal/slibtool_spawn_impl.h')
-rw-r--r--src/internal/slibtool_spawn_impl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal/slibtool_spawn_impl.h b/src/internal/slibtool_spawn_impl.h
index b376ad8..3966fcb 100644
--- a/src/internal/slibtool_spawn_impl.h
+++ b/src/internal/slibtool_spawn_impl.h
@@ -4,10 +4,15 @@
/* Released under the Standard MIT License; see COPYING.SLIBTOOL. */
/*******************************************************************/
+#include <limits.h>
#include <unistd.h>
#include <stdbool.h>
#include <sys/wait.h>
+#ifndef PATH_MAX
+#define PATH_MAX (_XOPEN_PATH_MAX < 4096) ? 4096 : _XOPEN_PATH_MAX
+#endif
+
#ifndef SLBT_USE_FORK
#ifndef SLBT_USE_VFORK
#ifndef SLBT_USE_POSIX_SPAWN