diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-02-14 09:01:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-02-14 09:01:01 +0000 |
commit | 498f3985b3a887dd76a2445076d8c0f5e1175d56 (patch) | |
tree | 8c117b4363ed7f89011d8e650662a1ba8a7d4f4b /lib | |
parent | 977175d4fd42090a9f462f991d8b3dabacbbb752 (diff) |
geterrno() renamed to ourerrno() to prevent the name clash that occurred in
AIX 3.2.5 and possibly other OSF-like system headers.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connect.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/connect.c b/lib/connect.c index b34d5776a..6e3df6627 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -81,12 +81,8 @@ #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: |