/* Temporary files to remove at program exit. */
static struct pending_tmp_file *pending_tmp_files = NULL;
+#ifndef _WIN32
static sigset_t fatal_signal_set;
/* PID of currently executing compiler that we have started, if any. 0 means no
* ongoing compilation. */
static pid_t compiler_pid = 0;
+#endif
/*
* This is a string that identifies the current "version" of the hash sum
void
block_signals(void)
{
+#ifndef _WIN32
sigprocmask(SIG_BLOCK, &fatal_signal_set, NULL);
+#endif
}
void
unblock_signals(void)
{
+#ifndef _WIN32
sigset_t empty;
sigemptyset(&empty);
sigprocmask(SIG_SETMASK, &empty, NULL);
+#endif
}
static void
unblock_signals();
}
+#ifndef _WIN32
static void
signal_handler(int signum)
{
register_signal_handler(SIGQUIT);
#endif
}
+#endif /* _WIN32 */
static void
clean_up_internal_tempdir(void)
/* Arguments to send to the real compiler. */
struct args *compiler_args;
+#ifndef _WIN32
set_up_signal_handlers();
+#endif
orig_args = args_init(argc, argv);
# define link(src,dst) (CreateHardLink(dst,src,NULL) ? 0 : -1)
# define lstat(a,b) stat(a,b)
# define execv(a,b) win32execute(a,b,0,-1,-1)
-# define execute(a,b,c) win32execute(*(a),a,1,b,c)
+# define execute(a,b,c,d) win32execute(*(a),a,1,b,c)
# define DIR_DELIM_CH '/'
# define PATH_DELIM ";"
# define F_RDLCK 0
static UINTMAX_T myround(LDOUBLE);
static LDOUBLE mypow10(int);
+#ifndef __MINGW32__
extern int errno;
+#endif
int
rpl_vsnprintf(char *str, size_t size, const char *format, va_list args)
cct_check_passed(file, line, expression);
return true;
} else {
-#ifdef HAVE_LONG_LONG
+#if defined(HAVE_LONG_LONG) && !defined(__MINGW32__)
char *exp_str = format("%lld", (long long)expected);
char *act_str = format("%lld", (long long)actual);
#else
conf.item_origins = x_malloc(N_CONFIG_ITEMS * sizeof(char *));
for (i = 0; i < N_CONFIG_ITEMS; ++i) {
+#ifndef __MINGW32__
conf.item_origins[i] = format("origin%zu", i);
+#else
+ conf.item_origins[i] = format("origin%u", (unsigned) i);
+#endif
}
conf_print_items(&conf, conf_item_receiver, NULL);
CHECK_STR_EQ("unify = true", received_conf_items[n++].descr);
for (i = 0; i < N_CONFIG_ITEMS; ++i) {
+#ifndef __MINGW32__
char *expected = format("origin%zu", i);
+#else
+ char *expected = format("origin%u", (unsigned) i);
+#endif
CHECK_STR_EQ_FREE1(expected, received_conf_items[i].origin);
}