]> sjero.net Git - wget/blobdiff - src/utils.c
[svn] Fix broken Windows builds due to the xxx_with_timeout stuff.
[wget] / src / utils.c
index a84237ee130eae8ac420a4f8d8e008fcd46c6bd1..0756fde98bc18b5501d0a0fee63566ce166e65cd 100644 (file)
@@ -1812,8 +1812,9 @@ debug_test_md5 (char *buf)
 \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;
 
@@ -1823,8 +1824,8 @@ abort_run_with_timeout (int sig)
   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;
 
@@ -1842,7 +1843,8 @@ abort_run_with_timeout (int sig)
   /* 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)