IF_RTS(void unblockVtAlrmSignal(STG_NO_ARGS);)
IF_RTS(void AwaitEvent(I_ delta);)
-#ifdef _POSIX_SOURCE
+#if defined(_POSIX_SOURCE) && !defined(nextstep3_TARGET_OS)
+ /* For nextstep3_TARGET_OS comment see stgdefs.h. CaS */
extern I_ sig_install PROTO((I_, I_, sigset_t *));
#define stg_sig_ignore(s,m) SAFESTGCALL3(I_,(void *, I_, I_),sig_install,s,STG_SIG_IGN,(sigset_t *)m)
#define stg_sig_default(s,m) SAFESTGCALL3(I_,(void *, I_, I_),sig_install,s,STG_SIG_DFL,(sigset_t *)m)
#define NON_POSIX_SOURCE
#endif
+/* If _NEXT_SOURCE is defined, certain header files make more
+ * constants visible to us.
+ * Perhaps it would have been wise, also to define NON_POSIX_SOURCE.
+ * Things seemed to work better without it however, so I have not
+ * done it. Nevertheless we do the signal stuff in a NON_POSIX way,
+ * see StgMacros.lh.
+ * CaS
+ */
+#ifdef nextstep3_TARGET_OS
+#define _NEXT_SOURCE
+#endif
+
#ifdef NON_POSIX_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_C_SOURCE