summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-04-17 15:28:02 -0700
committerMichael Forney <mforney@mforney.org>2016-04-17 15:28:02 -0700
commite2be6f64fab1c78f1dac6edd4df52edff722e441 (patch)
treee5890b2842d9e7c4cd26a9f56fdc14be8ec9425e
parent4e8f478342d8b3929a7b89027614b56d6e18ac7a (diff)
Add config-posix.h header and configheader.rc script to help with packages using config.h.in
-rw-r--r--include/config-posix.h91
-rw-r--r--scripts/configheader.rc18
2 files changed, 109 insertions, 0 deletions
diff --git a/include/config-posix.h b/include/config-posix.h
new file mode 100644
index 00000000..ce60fdfe
--- /dev/null
+++ b/include/config-posix.h
@@ -0,0 +1,91 @@
+/* headers */
+#define HAVE_DIRENT_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_SYS_MMAN_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_TERMIOS_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_WCTYPE_H 1
+#define STDC_HEADERS 1
+/* #undef HAVE_SYS_UTIME_H */ /* utime comes from utime.h */
+/* #undef HAVE_VFORK_H */ /* vfork comes from unistd.h */
+
+/* types */
+/* #undef TM_IN_SYS_TIME */ /* struct tm comes from time.h */
+/* #undef const */
+/* #undef gid_t */
+/* #undef inline */
+/* #undef pid_t */
+/* #undef size_t */
+/* #undef uid_t */
+
+/* functions */
+#define HAVE_ALARM 1
+#define HAVE_ASCTIME_R 1
+#define HAVE_CHOWN 1
+#define HAVE_CTIME_R 1
+#define HAVE_DPRINTF 1
+#define HAVE_FORK 1
+#define HAVE_FORK 1
+#define HAVE_FREELOCALE 1
+#define HAVE_GETLINE 1
+#define HAVE_GMTIME_R 1
+#define HAVE_LOCALTIME_R 1
+#define HAVE_MALLOC 1
+#define HAVE_MBRTOWC 1
+#define HAVE_MEMSET 1
+#define HAVE_MKSTEMP 1
+#define HAVE_MMAP 1
+#define HAVE_NEWLOCALE 1
+#define HAVE_PREAD 1
+#define HAVE_REALLOC 1
+#define HAVE_SETLOCALE 1
+#define HAVE_SETLOCALE 1
+#define HAVE_SETPGRP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRCHR 1
+#define HAVE_STRDUP 1
+#define HAVE_STRERROR 1
+#define HAVE_STRERROR 1
+#define HAVE_STRNDUP 1
+#define HAVE_STRSPN 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOF 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+#define HAVE_USELOCALE 1
+#define HAVE_UTIME 1
+#define HAVE_UTIMES 1
+#define HAVE_VFORK 1 /* removed in latest POSIX */
+#define HAVE_WCWIDTH 1
+#define RETSIGTYPE void
+/* #undef CLOSEDIR_VOID */
+/* #undef vfork */
+
+/* bugs */
+#define HAVE_WORKING_FORK 1
+#define HAVE_WORKING_VFORK 1
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+/* #undef HAVE_STAT_EMPTY_STRING_BUG */
diff --git a/scripts/configheader.rc b/scripts/configheader.rc
new file mode 100644
index 00000000..c1655f91
--- /dev/null
+++ b/scripts/configheader.rc
@@ -0,0 +1,18 @@
+#!/bin/rc
+
+flag e +
+
+fn checkstatus {}
+
+posix_defines=`{mktemp}
+checkstatus
+
+fn sigexit {
+ status=() rm $posix_defines
+}
+
+awk '{if($1 == "#define") print $2 ; if($2 == "#undef") print $3}' include/config-posix.h >$posix_defines
+defines=`{awk '{if($1 == "#undef") print $2}' $1 | grep -F -x -v -f $posix_defines}
+checkstatus
+
+printf '#undef %s\n' $defines