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. --- signal.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'signal.h') diff --git a/signal.h b/signal.h index 8882c259..32281e9a 100644 --- a/signal.h +++ b/signal.h @@ -76,6 +76,7 @@ typedef struct { ((EJB).rv = (ARG), longjmp((EJB).jb, 1)) extern sigset_t sig_blocked_cache; +extern volatile sig_atomic_t async_sig_enabled; #else @@ -85,14 +86,13 @@ extern sigset_t sig_blocked_cache; #define sig_restore_enable do { } while (0); } while (0) #define sig_restore_disable do { } while (0); } while (0) -tyedef jmp_buf extended_jmp_buf; +typedef jmp_buf extended_jmp_buf; #define extended_setjmp(EJB) setjmp(EJB) #define extended_longjmp(EJB, ARG) longjmp(EJB, ARG) +extern int async_sig_enabled; #endif -extern volatile sig_atomic_t async_sig_enabled; - extern val sig_hup, sig_int, sig_quit, sig_ill, sig_trap, sig_abrt, sig_bus; extern val sig_fpe, sig_kill, sig_usr1, sig_segv, sig_usr2, sig_pipe, sig_alrm; extern val sig_term, sig_chld, sig_cont, sig_stop, sig_tstp, sig_ttin; @@ -104,4 +104,6 @@ void sig_init(void); val set_sig_handler(val signo, val lambda); val get_sig_handler(val signo); val sig_check(void); +#if HAVE_POSIX_SIGS int sig_mask(int how, const sigset_t *set, sigset_t *oldset); +#endif -- cgit v1.2.3