X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fc-stack.c;h=b5027107022b8ae21cf558aa44d2aea8e4fadcfa;hb=1bb8cb70f5271120ecc1f88dd58fb5b79b84353d;hp=6e724b74ce9539dca141ce3f634a91822d92b3ca;hpb=0ef3ed5202a30d4aa8dab6c025649596464819e7;p=gnulib.git diff --git a/lib/c-stack.c b/lib/c-stack.c index 6e724b74c..b50271070 100644 --- a/lib/c-stack.c +++ b/lib/c-stack.c @@ -68,6 +68,12 @@ typedef struct sigaltstack stack_t; #include #if HAVE_SYS_RESOURCE_H +/* Include sys/time.h here, because... + SunOS-4.1.x fails to include . + This gives "incomplete type" errors for ru_utime and tu_stime. */ +# if HAVE_SYS_TIME_H +# include +# endif # include #endif @@ -277,7 +283,7 @@ static union void *p; } alternate_signal_stack; -# if defined SA_ONSTACK && defined _SC_PAGESIZE +# if defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE /* Handle a segmentation violation and exit. This function is async-signal-safe. */ @@ -363,7 +369,7 @@ c_stack_action (char * const *argv __attribute__ ((unused)), stack_overflow_message = _("stack overflow"); { -# if ! (defined SA_ONSTACK && defined _SC_PAGESIZE) +# if ! (defined SA_ONSTACK && defined SA_SIGINFO && defined _SC_PAGESIZE) return signal (SIGSEGV, die) == SIG_ERR ? -1 : 0; # else struct sigaction act;