summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/winsup.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-03-13 21:10:14 +0000
committerChristopher Faylor <me@cgf.cx>2006-03-13 21:10:14 +0000
commit84d38174056e438860213eb0cda919df89c06bd2 (patch)
tree061d434bdf553f8de3ea11667fdeeea29d7390a7 /winsup/cygwin/winsup.h
parent063fd1266048237629929240f923065bf9941abb (diff)
downloadcygnal-84d38174056e438860213eb0cda919df89c06bd2.tar.gz
cygnal-84d38174056e438860213eb0cda919df89c06bd2.tar.bz2
cygnal-84d38174056e438860213eb0cda919df89c06bd2.zip
* child_info.h (child_info_fork::handle_failure): Declare new function.
(child_info_fork::retry): New field. * dcrt0.cc (__api_fatal_exit_val): Define. (child_info_fork::handle_failure): Define new function. (__api_fatal): Exit using __api_fatal_exit_val value. * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN environment variable. (parse_thing): Add "fork_retry" setting. * fork.cc (fork_retry): Define. (frok::parent): Reorganize to allow retry of failed child creation if child signalled that it was ok to do so. * heap.cc (heap_init): Signal parent via handle_failure when VirtualAlloc fails. * pinfo.h (EXITCODE_RETRY): Declare. * sigproc.cc (child_info::sync): Properly exit with failure condition if called for fork and didn't see subproc_ready. * spawn.cc (spawn_guts): Use windows pid as first argument. * winsup.h: Remove obsolete NEW_MACRO_VARARGS define. (__api_fatal_exit_val): Declare. (set_api_fatal_return): Define. (in_dllentry): Declare. * exceptions.cc (inside_kernel): Remove unneeded in_dllentry declaration.
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r--winsup/cygwin/winsup.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index eaae8e0ab..b8cdd15b7 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -35,10 +35,6 @@ details. */
#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199900L
-#define NEW_MACRO_VARARGS
-#endif
-
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
@@ -157,11 +153,9 @@ extern HANDLE tty_mutex;
#define SIGTOMASK(sig) (1 << ((sig) - signal_shift_subtract))
extern unsigned int signal_shift_subtract;
-#ifdef NEW_MACRO_VARARGS
-# define api_fatal(...) __api_fatal (__VA_ARGS__)
-#else
-# define api_fatal(fmt, args...) __api_fatal ("%P: *** " fmt,## args)
-#endif
+extern int __api_fatal_exit_val;
+#define set_api_fatal_return(n) do {extern int __api_fatal_exit_val; __api_fatal_exit_val = (n);} while (0)
+#define api_fatal(fmt, args...) __api_fatal ("%P: *** " fmt,## args)
#undef issep
#define issep(ch) (strchr (" \t\n\r", (ch)) != NULL)
@@ -346,9 +340,11 @@ extern SYSTEM_INFO system_info;
/* The title on program start. */
extern char *old_title;
extern bool display_title;
-extern bool in_forkee;
extern bool transparent_exe;
+extern bool in_forkee;
+extern bool in_dllentry;
+
extern HANDLE hMainThread;
extern HANDLE hMainProc;
extern HANDLE hProcToken;