\f
/* Implementation of run_with_timeout, a generic timeout handler for
systems with Unix-like signal handling. */
-#ifdef HAVE_SIGSETJMP
-#define SETJMP(env) sigsetjmp (env, 1)
+#ifdef USE_SIGNAL_TIMEOUT
+# ifdef HAVE_SIGSETJMP
+# define SETJMP(env) sigsetjmp (env, 1)
static sigjmp_buf run_with_timeout_env;
assert (sig == SIGALRM);
siglongjmp (run_with_timeout_env, -1);
}
-#else /* not HAVE_SIGSETJMP */
-#define SETJMP(env) setjmp (env)
+# else /* not HAVE_SIGSETJMP */
+# define SETJMP(env) setjmp (env)
static jmp_buf run_with_timeout_env;
/* Now it's safe to longjump. */
longjmp (run_with_timeout_env, -1);
}
-#endif /* not HAVE_SIGSETJMP */
+# endif /* not HAVE_SIGSETJMP */
+#endif /* USE_SIGNAL_TIMEOUT */
int
run_with_timeout (long timeout, void (*fun) (void *), void *arg)