]> sjero.net Git - wget/blobdiff - src/connect.c
[svn] Merge of fix for bugs 20341 and 20410.
[wget] / src / connect.c
index 9cf84f22c6e41721c08222a646a305971f49aea2..ab1fd08e7a03e7430136622db3ab54e3b274ac05 100644 (file)
@@ -1,11 +1,11 @@
 /* Establishing and handling network connections.
-   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
@@ -764,7 +763,7 @@ fd_register_transport (int fd, struct transport_implementation *imp, void *ctx)
   info->ctx = ctx;
   if (!transport_map)
     transport_map = hash_table_new (0, NULL, NULL);
-  hash_table_put (transport_map, (void *) fd, info);
+  hash_table_put (transport_map, (void *)(intptr_t) fd, info);
   ++transport_map_modified_tick;
 }
 
@@ -775,7 +774,7 @@ fd_register_transport (int fd, struct transport_implementation *imp, void *ctx)
 void *
 fd_transport_context (int fd)
 {
-  struct transport_info *info = hash_table_get (transport_map, (void *) fd);
+  struct transport_info *info = hash_table_get (transport_map, (void *)(intptr_t) fd);
   return info->ctx;
 }
 
@@ -798,7 +797,7 @@ fd_transport_context (int fd)
     info = last_info;                                                  \
   else                                                                 \
     {                                                                  \
-      info = hash_table_get (transport_map, (void *) fd);              \
+      info = hash_table_get (transport_map, (void *)(intptr_t) fd);    \
       last_fd = fd;                                                    \
       last_info = info;                                                        \
       last_tick = transport_map_modified_tick;                         \
@@ -916,7 +915,7 @@ fd_errstr (int fd)
      in case of error, never in a tight loop.  */
   struct transport_info *info = NULL;
   if (transport_map)
-    info = hash_table_get (transport_map, (void *) fd);
+    info = hash_table_get (transport_map, (void *)(intptr_t) fd);
 
   if (info && info->imp->errstr)
     {
@@ -941,7 +940,7 @@ fd_close (int fd)
      per socket, so that particular optimization wouldn't work.  */
   info = NULL;
   if (transport_map)
-    info = hash_table_get (transport_map, (void *) fd);
+    info = hash_table_get (transport_map, (void *)(intptr_t) fd);
 
   if (info && info->imp->closer)
     info->imp->closer (fd, info->ctx);
@@ -950,7 +949,7 @@ fd_close (int fd)
 
   if (info)
     {
-      hash_table_remove (transport_map, (void *) fd);
+      hash_table_remove (transport_map, (void *)(intptr_t) fd);
       xfree (info);
       ++transport_map_modified_tick;
     }