]> granicus.if.org Git - curl/commitdiff
geterrno() renamed to ourerrno() to prevent the name clash that occurred in
authorDaniel Stenberg <daniel@haxx.se>
Fri, 14 Feb 2003 09:01:01 +0000 (09:01 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 14 Feb 2003 09:01:01 +0000 (09:01 +0000)
AIX 3.2.5 and possibly other OSF-like system headers.

lib/connect.c

index b34d5776ac61e9649c2ef9a8d68b9ae060cb7c74..6e3df6627aea7ac23720e339101ac2e2cbc58b43 100644 (file)
 #include "memdebug.h"
 #endif
 
-/* The AIX 3.2.5 system headers define a function called geterrno() which
-   we won't need but that interferes with our function */
-#undef geterrno
-
 static
-int geterrno(void)
+int ourerrno(void)
 {
 #ifdef WIN32
   return (int)GetLastError();
@@ -350,7 +346,7 @@ int socketerror(int sockfd)
 
   if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
                        (void *)&err, &errSize))
-    err = geterrno();
+    err = ourerrno();
   
   return err;
 }
@@ -523,7 +519,7 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
       rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen);
 
       if(-1 == rc) {
-        int error=geterrno();
+        int error=ourerrno();
 
         switch (error) {
         case EINPROGRESS:
@@ -642,7 +638,7 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
                  sizeof(serv_addr));
 
     if(-1 == rc) {
-      int error=geterrno();
+      int error=ourerrno();
 
       switch (error) {
       case EINPROGRESS: