From 439bd03e10053c088eac26da28c0a85be0c325a4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 9 Jan 2014 21:08:11 -0800 Subject: Long overdue MinGW port maintenance. * Makefile: Use new EXE variable from config.mk. * configure (exe, have_windows_h): New variables. Handle situations with .exe suffix; on MiGW, the rm command doesn't work on executables if the .exe suffix is not given. New tests for localtime_r and gmtime_r. * lib.c: Supply declarations which are missing on MinGW because we use gcc -ansi, because MinGW doesn't follow established conventions like -D_POSIX_SOURCE. Supply definitions for gmtime_r, localtime_r, setenv and unsetenv. * parser.l: Supply declarations which are missing on MinGW. * signal.h (async_sig_enabled): Declare differently based on HAVE_POSIX_SIGS. Misspelled typedef fixed in the code for !HAVE_POSIX_SIGS that has hitherto not been compiled. (sig_mask): Wrap declaration in #ifdef HAVE_POSIX_SIGS because it relies on sigset_t. * stream.c: Supply declarations which are missing on MinGW. Include if we have it. (sleep): Define for Windows. (statf): Handle missing st_blksize and st_blocks members in struct stat. (stream_init): Handle numerous missing S_* macros. * utf8.c: Supply declarations which are missing on MinGW. --- utf8.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utf8.c') diff --git a/utf8.c b/utf8.c index 36354277..c37e7d8d 100644 --- a/utf8.c +++ b/utf8.c @@ -36,6 +36,10 @@ #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 -- cgit v1.2.3