cURL / Mailing Lists / curl-library / Single Mail

curl-library

Yet another minor patch

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 25 Nov 2005 01:51:45 +0100

This one, fixes the use of Curl_inet_ntop and Curl_inet_pton with no
prototypes on some platforms, ie IRIX 6.2 MIPS C 6.2

diff -urp c:\f\curl-old/curl/lib/inet_ntop.h c:\f\curl-new/curl/lib/inet_ntop.h
--- c:\f\curl-old/curl/lib/inet_ntop.h 2005-03-31 09:02:03.000000000 +0200
+++ c:\f\curl-new/curl/lib/inet_ntop.h 2005-11-25 01:26:41.922364800 +0100
@@ -25,13 +25,13 @@

 #include "setup.h"

+char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
+
 #ifdef HAVE_INET_NTOP
-#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,size)
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#else
-char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
+#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,size)
 #endif

 #endif /* __INET_NTOP_H */
diff -urp c:\f\curl-old/curl/lib/inet_pton.h c:\f\curl-new/curl/lib/inet_pton.h
--- c:\f\curl-old/curl/lib/inet_pton.h 2005-03-31 09:02:03.000000000 +0200
+++ c:\f\curl-new/curl/lib/inet_pton.h 2005-11-25 01:26:38.126907200 +0100
@@ -25,13 +25,13 @@

 #include "setup.h"

+int Curl_inet_pton(int, const char *, void *);
+
 #ifdef HAVE_INET_PTON
-#define Curl_inet_pton(x,y,z) inet_pton(x,y,z)
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#else
-int Curl_inet_pton(int, const char *, void *);
+#define Curl_inet_pton(x,y,z) inet_pton(x,y,z)
 #endif

 #endif /* __INET_PTON_H */

Regards,
Yang
Received on 2005-11-25