summaryrefslogtreecommitdiff
path: root/src/flexdef.h
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2017-02-17 23:17:23 +0800
committerWill Estes <westes575@gmail.com>2017-02-17 16:55:33 -0500
commitdbb4e94dc7bacbcfd4acef4f085ef752fe1aa03f (patch)
tree8e979274b7d5064135b49414fe9d29b3e62407c6 /src/flexdef.h
parentc7a545ae0907c81cf52139dd391659586570f60c (diff)
build: Let configure error if missing required functions, headers..
`configure` will now error if a required header or function is not found on the system. Also add comments on optional functions checks. Add sys/stats.h and sys/wait.h to list of required headers in configure. This fixes issue #180.
Diffstat (limited to 'src/flexdef.h')
-rw-r--r--src/flexdef.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/flexdef.h b/src/flexdef.h
index e5ab8e0..b3162e2 100644
--- a/src/flexdef.h
+++ b/src/flexdef.h
@@ -57,24 +57,22 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifdef HAVE_UNISTD_H
+/* Required: dup() and dup2() in <unistd.h> */
#include <unistd.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_SYS_PARAMS_H
#include <sys/params.h>
#endif
-#ifdef HAVE_SYS_STAT_H
+/* Required: stat() in <sys/stat.h> */
#include <sys/stat.h>
-#endif
+/* Required: wait() in <sys/wait.h> */
#include <sys/wait.h>
#include <stdbool.h>
#include <stdarg.h>
-#ifdef HAVE_REGEX_H
+/* Required: regcomp(), regexec() and regerror() in <regex.h> */
#include <regex.h>
-#endif
#include "flexint.h"
/* We use gettext. So, when we write strings which should be translated, we mark them with _() */