Trying to keep Hal happy :)
[privoxy.git] / jbsockets.c
index 8a407e2..a385965 100644 (file)
@@ -1,10 +1,10 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.29 2002/03/26 22:29:54 swa Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.34 2002/04/08 20:31:41 swa Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
  *
  * Purpose     :  Contains wrappers for system-specific sockets code,
- *                so that the rest of JunkBuster can be more
+ *                so that the rest of Junkbuster can be more
  *                OS-independent.  Contains #ifdefs to make this work
  *                on many platforms.
  *
@@ -35,6 +35,21 @@ const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.29 2002/03/26 22:29:54 swa Ex
  *
  * Revisions   :
  *    $Log: jbsockets.c,v $
+ *    Revision 1.34  2002/04/08 20:31:41  swa
+ *    fixed JB spelling
+ *
+ *    Revision 1.33  2002/04/03 16:02:18  gliptak
+ *    Correcting compile warning with older gcc
+ *
+ *    Revision 1.32  2002/03/31 17:18:59  jongfoster
+ *    Win32 only: Enabling STRICT to fix a VC++ compile warning.
+ *
+ *    Revision 1.31  2002/03/29 03:33:13  david__schmidt
+ *    Fix Mac OSX compiler warnings
+ *
+ *    Revision 1.30  2002/03/27 14:32:43  david__schmidt
+ *    More compiler warning message maintenance
+ *
  *    Revision 1.29  2002/03/26 22:29:54  swa
  *    we have a new homepage!
  *
@@ -79,7 +94,7 @@ const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.29 2002/03/26 22:29:54 swa Ex
  *     - Fixed compiler warnings etc
  *
  *    Revision 1.23  2002/03/05 00:36:01  jongfoster
- *    Fixing bug 514988 - unable to restart JunkBuster
+ *    Fixing bug 514988 - unable to restart Junkbuster
  *
  *    Revision 1.22  2002/03/04 02:08:02  david__schmidt
  *    Enable web editing of actions file on OS/2 (it had been broken all this time!)
@@ -173,6 +188,9 @@ const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.29 2002/03/26 22:29:54 swa Ex
 
 #ifdef _WIN32
 
+#ifndef STRICT
+#define STRICT
+#endif
 #include <windows.h>
 #include <sys/timeb.h>
 #include <io.h>
@@ -554,11 +572,11 @@ int bind_port(const char *hostnam, int portnum, jb_socket *pfd)
 #ifndef _WIN32
    /*
     * This is not needed for Win32 - in fact, it stops
-    * duplicate instances of JunkBuster from being caught.
+    * duplicate instances of Junkbuster from being caught.
     *
     * On UNIX, we assume the user is sensible enough not
-    * to start JunkBuster multiple times on the same IP.
-    * Without this, stopping and restarting JunkBuster
+    * to start Junkbuster multiple times on the same IP.
+    * Without this, stopping and restarting Junkbuster
     * from a script fails.
     * Note: SO_REUSEADDR is meant to only take over
     * sockets which are *not* in listen state in Linux,
@@ -619,11 +637,11 @@ int accept_connection(struct client_state * csp, jb_socket fd)
    struct sockaddr_in client, server;
    struct hostent *host = NULL;
    jb_socket afd;
-#if defined(_WIN32) || defined(__OS2__)
+#if defined(_WIN32) || defined(__OS2__) || defined(__APPLE_CC__) || defined(AMIGA)
    /* Wierdness - fix a warning. */
    int c_length, s_length;
 #else
-   size_t c_length, s_length;
+   socklen_t c_length, s_length;
 #endif
 #if defined(HAVE_GETHOSTBYADDR_R_8_ARGS) ||  defined(HAVE_GETHOSTBYADDR_R_7_ARGS) || defined(HAVE_GETHOSTBYADDR_R_5_ARGS)
    struct hostent result;