]> sjero.net Git - wget/blobdiff - src/mswindows.c
[svn] Several Windows-related changes.
[wget] / src / mswindows.c
index 986f1ba49ee6b8dd1c29fcacaa0a89e8bcb32d86..64a9eb95c0ca39729bcb52909be46b56acba9924 100644 (file)
@@ -1,5 +1,5 @@
 /* mswindows.c -- Windows-specific support
-   Copyright (C) 1996-2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2006 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -90,6 +90,7 @@ ws_cleanup (void)
   WSACleanup ();
 }
 
+#if defined(CTRLBREAK_BACKGND) || defined(CTRLC_BACKGND)
 static void
 ws_hangup (const char *reason)
 {
@@ -103,6 +104,7 @@ ws_hangup (const char *reason)
      gesture as the parent will wait for us to terminate before resuming.  */
   FreeConsole ();
 }
+#endif
 
 /* Construct the name for a named section (a.k.a. `file mapping') object.
    The returned string is dynamically allocated and needs to be xfree()'d.  */
@@ -523,7 +525,7 @@ thread_helper (void *arg)
 bool
 run_with_timeout (double seconds, void (*fun) (void *), void *arg)
 {
-  static HANDLE thread_hnd = NULL;
+  HANDLE thread_hnd;
   struct thread_data thread_arg;
   DWORD thread_id;
   bool rc;
@@ -537,9 +539,6 @@ run_with_timeout (double seconds, void (*fun) (void *), void *arg)
       return false;
     }
 
-  /* Should never happen, but test for recursivety anyway.  */
-  assert (thread_hnd == NULL);
-
   thread_arg.fun = fun;
   thread_arg.arg = arg;
   thread_arg.ws_error = WSAGetLastError ();