#include "bacula.h"
#include "jcr.h"
-int execvp_errors[] = {EACCES, ENOEXEC, EFAULT, EINTR, E2BIG,
- ENAMETOOLONG, ENOMEM, ETXTBSY, ENOENT};
+int execvp_errors[] = {
+ EACCES,
+ ENOEXEC,
+ EFAULT,
+ EINTR,
+ E2BIG,
+ ENAMETOOLONG,
+ ENOMEM,
+#ifndef WIN32
+ ETXTBSY,
+#endif
+ ENOENT
+};
int num_execvp_errors = (int)(sizeof(execvp_errors)/sizeof(int));
}
Dmsg1(800, "child status=%d\n", stat & ~b_errno_exit);
} else if (WIFSIGNALED(chldstatus)) { /* process died */
+#ifndef WIN32
stat = WTERMSIG(chldstatus);
+#else
+#warning "WTERMSIG undefined in Win32 !!!"
+#endif
Dmsg1(800, "Child died from signale %d\n", stat);
stat |= b_errno_signal; /* exit signal returned */
}
}
}
-#if HAVE_WIN32 && !HAVE_CONSOLE && !HAVE_WXCONSOLE
+/* kludge below disabled for MinGW, due to link problems ... */
+#if HAVE_WIN32 && !HAVE_CONSOLE && !HAVE_WXCONSOLE && !HAVE_MINGW
extern long _timezone;
extern int _daylight;
extern long _dstbias;
struct tm tm;
int n = 0;
-#if HAVE_WIN32 && !HAVE_CONSOLE && !HAVE_WXCONSOLE
+#if HAVE_WIN32 && !HAVE_CONSOLE && !HAVE_WXCONSOLE && !HAVE_MINGW
/*
* Gross kludge to avoid a seg fault in Microsoft's CRT localtime_r(),
* which incorrectly references a NULL returned from gmtime() if