Use util/mklink.pl instead of util/mklink.sh.
[oweals/openssl.git] / crypto / bio / b_sock.c
index 328394efe42614d41e20af26e19a0e405268a155..cc9c1254780e1236951bfd38f9deee9d31a5f586 100644 (file)
@@ -65,8 +65,6 @@
 #include "cryptlib.h"
 #include <openssl/bio.h>
 
-/*     BIOerr(BIO_F_WSASTARTUP,BIO_R_WSASTARTUP ); */
-
 #ifdef WIN16
 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
 #else
@@ -96,16 +94,9 @@ static struct ghbn_cache_st
        unsigned long order;
        } ghbn_cache[GHBN_NUM];
 
-#ifndef NOPROTO
 static int get_ip(const char *str,unsigned char *ip);
 static void ghbn_free(struct hostent *a);
 static struct hostent *ghbn_dup(struct hostent *a);
-#else
-static int get_ip();
-static void ghbn_free();
-static struct hostent *ghbn_dup();
-#endif
-
 int BIO_get_host_ip(const char *str, unsigned char *ip)
        {
        int i;
@@ -199,8 +190,12 @@ int BIO_sock_error(int sock)
        int size;
                 
        size=sizeof(int);
-
-       i=getsockopt(sock,SOL_SOCKET,SO_ERROR,&j,&size);
+       /* Note: under Windows the third parameter is of type (char *)
+        * whereas under other systems it is (void *) if you don't have
+        * a cast it will choke the compiler: if you do have a cast then
+        * you can either go for (char *) or (void *).
+        */
+       i=getsockopt(sock,SOL_SOCKET,SO_ERROR,(void *)&j,&size);
        if (i < 0)
                return(1);
        else