aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-03-28 21:45:38 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-03-28 21:45:38 +0200
commit089476b5415e9844175a2fbf1bde6faf18ae0b61 (patch)
tree2127890d7d349fa4ba5c7451f7b05ab2ceef56fa
parentb467a6d3d604723e0c152dceb09e998c059bfa40 (diff)
downloadegawk-089476b5415e9844175a2fbf1bde6faf18ae0b61.tar.gz
egawk-089476b5415e9844175a2fbf1bde6faf18ae0b61.tar.bz2
egawk-089476b5415e9844175a2fbf1bde6faf18ae0b61.zip
Additional getopt fix, for DJGPP this time.
-rw-r--r--ChangeLog5
-rw-r--r--getopt.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index eafd8af4..69a06e2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * getopt.c: Add DJGPP to list of platforms where it's ok
+ to include <stdlib.h>.
+
2012-03-21 Corinna Vinschen <vinschen@redhat.com>
* getopt.c: Add Cygwin to list of platforms where it's ok
diff --git a/getopt.c b/getopt.c
index b1f854af..58df01a0 100644
--- a/getopt.c
+++ b/getopt.c
@@ -58,9 +58,12 @@
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
-#if defined (__GNU_LIBRARY__) || defined (__CYGWIN__)
-/* Don't include stdlib.h for non-GNU C libraries and non-Cygwin because some
- of them contain conflicting prototypes for getopt. */
+#if defined (__GNU_LIBRARY__) || defined (__CYGWIN__) || defined(DJGPP)
+/* Don't include stdlib.h for
+ * non-GNU C libraries
+ * non-Cygwin
+ * non-DJGPP
+ * because some of them contain conflicting prototypes for getopt. */
# include <stdlib.h>
# include <unistd.h>
#endif /* GNU C library. */