aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-05-01 13:37:05 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-05-01 13:37:05 +0000
commiteb6130baa76ad0689de5eb4a24f5717eed1baa89 (patch)
treecfe8d2171b219b30e3bada788bb4dabfa3a1cbc8 /lib
parentf69ea2c68acc223ea70b2366f247299618dd7d7a (diff)
ourerrno became Curl_ourerrno() and is now available to all libcurl
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c11
-rw-r--r--lib/connect.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/connect.c b/lib/connect.c
index ab38f60dd..1b7a55b5a 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -81,8 +81,7 @@
#include "memdebug.h"
#endif
-static
-int ourerrno(void)
+int Curl_ourerrno(void)
{
#ifdef WIN32
return (int)GetLastError();
@@ -350,7 +349,7 @@ int socketerror(int sockfd)
if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
(void *)&err, &errSize))
- err = ourerrno();
+ err = Curl_ourerrno();
return err;
}
@@ -414,7 +413,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
return CURLE_COULDNT_CONNECT;
}
else if(1 != rc) {
- int error = ourerrno();
+ int error = Curl_ourerrno();
failf(data, "Failed connect to %s:%d, errno: %d",
conn->hostname, conn->port, error);
return CURLE_COULDNT_CONNECT;
@@ -526,7 +525,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen);
if(-1 == rc) {
- int error=ourerrno();
+ int error=Curl_ourerrno();
switch (error) {
case EINPROGRESS:
@@ -645,7 +644,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
sizeof(serv_addr));
if(-1 == rc) {
- int error=ourerrno();
+ int error=Curl_ourerrno();
switch (error) {
case EINPROGRESS:
diff --git a/lib/connect.h b/lib/connect.h
index df3147ec0..5e40232c3 100644
--- a/lib/connect.h
+++ b/lib/connect.h
@@ -37,4 +37,6 @@ CURLcode Curl_connecthost(struct connectdata *conn,
Curl_ipconnect **addr, /* the one we used */
bool *connected /* truly connected? */
);
+
+int Curl_ourerrno(void);
#endif