@@ -44,7 +44,7 @@
dnl Checks for libraries.
dnl Checks for header files.
-AC_CHECK_HEADERS(alloca.h paths.h pwd.h dirent.h \
+AC_CHECK_HEADERS(alloca.h paths.h pwd.h stdbool.h dirent.h \
getopt.h sys/resource.h termios.h sys/time.h)
dnl Check for declarations
@@ -73,7 +73,12 @@
#include <glob.h>
#endif
#include <ctype.h>
+#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
+#else
+typedef int bool;
+const int false = 0;
+#endif
/*
* Routines to expand arguments to commands. We have to deal with
@@ -1057,10 +1062,10 @@
if (c == (char)CTLESC)
c = *p++;
- isifs = strchr(ifs, c);
+ isifs = strchr(ifs, c) != NULL;
isdefifs = false;
if (isifs)
- isdefifs = strchr(defifs, c);
+ isdefifs = strchr(defifs, c) != NULL;
/* If only reading one more argument:
* If we have exactly one field,