summaryrefslogtreecommitdiffhomepage
path: root/src
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
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')
-rw-r--r--src/internal/slibtool_spawn_impl.h5
-rw-r--r--src/logic/slbt_exec_link.c5
2 files changed, 5 insertions, 5 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
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 1ef8b77..009a59f 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -7,7 +7,6 @@
#include <string.h>
#include <stdbool.h>
#include <fcntl.h>
-#include <limits.h>
#include <errno.h>
#include <sys/stat.h>
@@ -25,10 +24,6 @@
/* */
/*******************************************************************/
-#ifndef PATH_MAX
-#define PATH_MAX _XOPEN_PATH_MAX
-#endif
-
static bool slbt_adjust_input_argument(char * arg, bool fpic)
{
char * dot;