diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rwxr-xr-x | configure | 23 | ||||
-rw-r--r-- | lib.c | 5 | ||||
-rw-r--r-- | parser.l | 4 | ||||
-rw-r--r-- | stream.c | 5 | ||||
-rw-r--r-- | utf8.c | 4 |
6 files changed, 38 insertions, 18 deletions
@@ -1,5 +1,20 @@ 2014-01-10 Kaz Kylheku <kaz@kylheku.com> + * configure: Detect platforms which don't reveal declarations + in C headers which are extensions to standard C, like popen or fileno, + in response to standard feature selection macros like -D_POSIX_SOURCE. + MinGW and Cygwin are offenders. These platforms hide the declarations + when gcc is in -ansi mode, by testing for __STRICT_ANSI__. Turns out, + however, that -U__STRICT_ANSI__ on the gcc command line strips this + away, causing the declarations to be revealed. + + * lib.c, parser.l, stream.c, utf8.c: Removed the declarations which + compensated for the above problem. Yippee! Fuck you, stupid Cygwin + troglodytes, and the MinGW horse you rode in on. + http://cygwin.com/ml/cygwin/2011-10/msg00131.html + +2014-01-10 Kaz Kylheku <kaz@kylheku.com> + * eval.c (eval_init): Renaming lisp-parse to read; lisp-parse is retained as an obsolescent synonym. All arguments become optional. @@ -709,6 +709,29 @@ done printf "done\n" # +# Check for idiotic behavior: extensions in C header files controlled +# by __STRICT_ANSI__ rather than things like __POSIX_SOURCE. +# + +printf "Checking for proper support for feature-test macros ... " + +cat > conftest.c <<! +#include <stdio.h> + +int main(void) +{ + return fileno(stdin); +} +! +rm -f conftest$exe +if ! $make EXTRA_FLAGS=-Werror conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then + printf "no\n" + lang_flags="$lang_flags -U__STRICT_ANSI__" +else + printf "yes\n" +fi + +# # Check for annoying warnings from ctype.h macros # @@ -60,11 +60,6 @@ #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) -#if HAVE_WINDOWS_H -int putenv(const char *); -int tzset(void); -#endif - #if !HAVE_POSIX_SIGS int async_sig_enabled = 0; #endif @@ -50,10 +50,6 @@ #include "hash.h" #include "parser.h" -#if HAVE_WINDOWS_H -int fileno(FILE *stream); -#endif - #define YY_INPUT(buf, result, max_size) \ do { \ val c = get_byte(yyin_stream); \ @@ -55,11 +55,6 @@ #include "stream.h" #include "utf8.h" -#if HAVE_WINDOWS_H -int fileno(FILE *stream); -int pclose(FILE *stream); -#endif - val std_input, std_output, std_debug, std_error, std_null; val output_produced; @@ -36,10 +36,6 @@ #include "unwind.h" #include "utf8.h" -#if HAVE_WINDOWS_H -FILE *popen(const char *path, const char *mode); -#endif - #if WCHAR_MAX > 65535 #define FULL_UNICODE #endif |