]> sjero.net Git - wget/blobdiff - src/mswindows.c
[svn] Merge of fix for bugs 20341 and 20410.
[wget] / src / mswindows.c
index 986f1ba49ee6b8dd1c29fcacaa0a89e8bcb32d86..3aeafa33b9d62bed495d352238e571e43cfaf0a1 100644 (file)
@@ -1,11 +1,11 @@
 /* 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.
 
 GNU Wget is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
+the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
 GNU Wget is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software Foundation, Inc.,
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+along with Wget.  If not, see <http://www.gnu.org/licenses/>.
 
 In addition, as a special exception, the Free Software Foundation
 gives permission to link the code of its release of Wget with the
@@ -90,6 +89,7 @@ ws_cleanup (void)
   WSACleanup ();
 }
 
+#if defined(CTRLBREAK_BACKGND) || defined(CTRLC_BACKGND)
 static void
 ws_hangup (const char *reason)
 {
@@ -103,6 +103,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 +524,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 +538,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 ();