Skip to content

Commit

Permalink
ntoa() and inet_ntoa_r() no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed Sep 24, 2008
1 parent 95df5d0 commit 4e909ee
Show file tree
Hide file tree
Showing 31 changed files with 11 additions and 226 deletions.
22 changes: 0 additions & 22 deletions acinclude.m4
Expand Up @@ -2601,28 +2601,6 @@ fi
])


AC_DEFUN([CURL_CHECK_INET_NTOA_R],
[
dnl determine if function definition for inet_ntoa_r exists.
AC_CHECK_FUNCS(inet_ntoa_r,[
AC_MSG_CHECKING(whether inet_ntoa_r is declared)
AC_EGREP_CPP(inet_ntoa_r,[
#undef _REENTRANT
#include <arpa/inet.h>],[
AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
AC_MSG_RESULT(yes)],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(whether inet_ntoa_r with -D_REENTRANT is declared)
AC_EGREP_CPP(inet_ntoa_r,[
#undef _REENTRANT
#define _REENTRANT
#include <arpa/inet.h>],[
AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])])
])


dnl **********************************************************************
dnl CURL_DETECT_ICC ([ACTION-IF-YES])
dnl
Expand Down
1 change: 0 additions & 1 deletion ares/Makefile.netware
Expand Up @@ -357,7 +357,6 @@ endif
@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Expand Up @@ -1881,7 +1881,7 @@ else
dnl fi

dnl poke around for inet_ntoa_r()
CURL_CHECK_INET_NTOA_R()
dnl the old inet_ntoa_r check was done here

dnl is there a localtime_r()
dnl the old localtime_r check was done here
Expand Down Expand Up @@ -2116,7 +2116,6 @@ AC_CHECK_FUNCS([basename \
getrlimit \
gettimeofday \
inet_addr \
inet_ntoa \
inet_pton \
perror \
pipe \
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.inc
Expand Up @@ -14,7 +14,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h \
getinfo.h strequal.h krb4.h memdebug.h inet_ntoa_r.h http_chunks.h \
getinfo.h strequal.h krb4.h memdebug.h http_chunks.h \
strtok.h connect.h llist.h hash.h content_encoding.h share.h \
curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h \
strtoofft.h strerror.h inet_ntop.h curlx.h memory.h setup.h \
Expand Down
1 change: 0 additions & 1 deletion lib/Makefile.netware
Expand Up @@ -457,7 +457,6 @@ endif
@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
@echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
Expand Down
3 changes: 0 additions & 3 deletions lib/amigaos.h
Expand Up @@ -40,9 +40,6 @@
#ifndef select
# define select(args...) WaitSelect( args, NULL)
#endif
#ifndef inet_ntoa
# define inet_ntoa(x) Inet_NtoA( x ## .s_addr)
#endif
#ifndef ioctl
# define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
#endif
Expand Down
1 change: 0 additions & 1 deletion lib/config-amigaos.h
Expand Up @@ -28,7 +28,6 @@
#define HAVE_ARPA_INET_H 1
#define HAVE_GETHOSTBYADDR 1
#define HAVE_INET_ADDR 1
#define HAVE_INET_NTOA 1
#define HAVE_INTTYPES_H 1
#define HAVE_IOCTLSOCKET_CASE 1
#define HAVE_LIBCRYPTO 1
Expand Down
1 change: 0 additions & 1 deletion lib/config-mac.h
Expand Up @@ -31,7 +31,6 @@
#define HAVE_ALARM 1
#define HAVE_STRDUP 1
#define HAVE_UTIME 1
#define HAVE_INET_NTOA 1
#define HAVE_SETVBUF 1
#define HAVE_STRFTIME 1
#define HAVE_INET_ADDR 1
Expand Down
12 changes: 0 additions & 12 deletions lib/config-os400.h
Expand Up @@ -33,12 +33,6 @@
/* Define if you have the gethostbyname_r() function with 6 arguments */
#undef HAVE_GETHOSTBYNAME_R_6

/* Define if you have the inet_ntoa_r function declared. */
#define HAVE_INET_NTOA_R_DECL

/* Define if the inet_ntoa_r function returns an int. */
#define HAVE_INT_INET_NTOA_R

/* Define if you need the _REENTRANT define for some functions */
#undef NEED_REENTRANT

Expand Down Expand Up @@ -127,12 +121,6 @@
/* Define if you have the `inet_addr' function. */
#define HAVE_INET_ADDR

/* Define if you have the `inet_ntoa' function. */
#define HAVE_INET_NTOA

/* Define if you have the `inet_ntoa_r' function. */
#define HAVE_INET_NTOA_R

/* Define if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H

Expand Down
9 changes: 0 additions & 9 deletions lib/config-riscos.h
Expand Up @@ -29,9 +29,6 @@
/* Define if you have the gethostbyname_r() function with 6 arguments */
#undef HAVE_GETHOSTBYNAME_R_6

/* Define if you have the inet_ntoa_r function declared. */
#undef HAVE_INET_NTOA_R_DECL

/* Define if you need the _REENTRANT define for some functions */
#undef NEED_REENTRANT

Expand Down Expand Up @@ -122,12 +119,6 @@
/* Define if you have the `inet_addr' function. */
#undef HAVE_INET_ADDR

/* Define if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA

/* Define if you have the `inet_ntoa_r' function. */
#undef HAVE_INET_NTOA_R

/* Define if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H

Expand Down
9 changes: 0 additions & 9 deletions lib/config-symbian.h
Expand Up @@ -222,15 +222,6 @@
/* Define to 1 if you have the `inet_addr' function. */
/*#define HAVE_INET_ADDR 1*/

/* Define to 1 if you have the `inet_ntoa' function. */
/*#define HAVE_INET_NTOA 1*/

/* Define to 1 if you have the `inet_ntoa_r' function. */
/* #undef HAVE_INET_NTOA_R */

/* inet_ntoa_r() is declared */
/* #undef HAVE_INET_NTOA_R_DECL */

/* Define to 1 if you have the `inet_pton' function. */
#define HAVE_INET_PTON 1

Expand Down
9 changes: 0 additions & 9 deletions lib/config-tpf.h
Expand Up @@ -208,15 +208,6 @@
/* Define to 1 if you have the `inet_addr' function. */
#define HAVE_INET_ADDR 1

/* Define to 1 if you have the `inet_ntoa' function. */
#define HAVE_INET_NTOA 1

/* Define to 1 if you have the `inet_ntoa_r' function. */
/* #undef HAVE_INET_NTOA_R */

/* inet_ntoa_r() is declared */
/* #undef HAVE_INET_NTOA_R_DECL */

/* Define to 1 if you have the `inet_pton' function. */
/* #undef HAVE_INET_PTON */

Expand Down
3 changes: 0 additions & 3 deletions lib/config-win32.h
Expand Up @@ -157,9 +157,6 @@
/* Define if you have the inet_addr function. */
#define HAVE_INET_ADDR 1

/* Define if you have the inet_ntoa function. */
#define HAVE_INET_NTOA 1

/* Define if you have the ioctlsocket function. */
#define HAVE_IOCTLSOCKET 1

Expand Down
3 changes: 0 additions & 3 deletions lib/config-win32ce.h
Expand Up @@ -145,9 +145,6 @@
/* Define if you have the inet_addr function. */
#define HAVE_INET_ADDR 1

/* Define if you have the inet_ntoa function. */
#define HAVE_INET_NTOA 1

/* Define if you have the ioctlsocket function. */
#define HAVE_IOCTLSOCKET 1

Expand Down
14 changes: 7 additions & 7 deletions lib/formdata.c
Expand Up @@ -56,14 +56,14 @@ Content-Type: application/octet-stream
vlue for PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE
(or you might see v^@lue at the start)
Content-Disposition: form-data; name="FILE1_+_CONTENTTYPE"; filename="inet_ntoa_r.h"
Content-Disposition: form-data; name="FILE1_+_CONTENTTYPE"; filename="formdata.h"
Content-Type: text/html
...
Content-Disposition: form-data; name="FILE1_+_FILE2"
Content-Type: multipart/mixed, boundary=curlz1s0dkticx49MV1KGcYP5cvfSsz
...
Content-Disposition: attachment; filename="inet_ntoa_r.h"
Content-Disposition: attachment; filename="formdata.h"
Content-Type: application/octet-stream
...
Content-Disposition: attachment; filename="Makefile.b32"
Expand All @@ -73,27 +73,27 @@ Content-Type: application/octet-stream
Content-Disposition: form-data; name="FILE1_+_FILE2_+_FILE3"
Content-Type: multipart/mixed, boundary=curlirkYPmPwu6FrJ1vJ1u1BmtIufh1
...
Content-Disposition: attachment; filename="inet_ntoa_r.h"
Content-Disposition: attachment; filename="formdata.h"
Content-Type: application/octet-stream
...
Content-Disposition: attachment; filename="Makefile.b32"
Content-Type: application/octet-stream
...
Content-Disposition: attachment; filename="inet_ntoa_r.h"
Content-Disposition: attachment; filename="formdata.h"
Content-Type: application/octet-stream
...
Content-Disposition: form-data; name="ARRAY: FILE1_+_FILE2_+_FILE3"
Content-Type: multipart/mixed, boundary=curlirkYPmPwu6FrJ1vJ1u1BmtIufh1
...
Content-Disposition: attachment; filename="inet_ntoa_r.h"
Content-Disposition: attachment; filename="formdata.h"
Content-Type: application/octet-stream
...
Content-Disposition: attachment; filename="Makefile.b32"
Content-Type: application/octet-stream
...
Content-Disposition: attachment; filename="inet_ntoa_r.h"
Content-Disposition: attachment; filename="formdata.h"
Content-Type: application/octet-stream
...
Expand Down Expand Up @@ -1562,7 +1562,7 @@ int main(int argc, argv_item_t argv[])
char value4[] = "value for simple PTRCONTENTS";
char value5[] = "value for PTRCONTENTS + CONTENTSLENGTH";
char value6[] = "value for PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE";
char value7[] = "inet_ntoa_r.h";
char value7[] = "formdata.h";
char value8[] = "Makefile.b32";
char type2[] = "image/gif";
char type6[] = "text/plain";
Expand Down
8 changes: 1 addition & 7 deletions lib/ftp.c
Expand Up @@ -84,25 +84,19 @@
#include "sslgen.h"
#include "connect.h"
#include "strerror.h"
#include "memory.h"
#include "inet_ntop.h"
#include "select.h"
#include "parsedate.h" /* for the week day and month names */
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
#include "multiif.h"
#include "url.h"

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#include "memory.h"
/* The last #include file should be: */
#ifdef CURLDEBUG
#include "memdebug.h"
#endif

#ifdef HAVE_NI_WITHSCOPEID
#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID
Expand Down
5 changes: 0 additions & 5 deletions lib/hostares.c
Expand Up @@ -80,12 +80,7 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#include "memory.h"

/* The last #include file should be: */
#include "memdebug.h"

Expand Down
4 changes: 0 additions & 4 deletions lib/hostasyn.c
Expand Up @@ -71,10 +71,6 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#include "memory.h"
/* The last #include file should be: */
#include "memdebug.h"
Expand Down
4 changes: 0 additions & 4 deletions lib/hostip.c
Expand Up @@ -72,10 +72,6 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#include "memory.h"
/* The last #include file should be: */
#include "memdebug.h"
Expand Down
4 changes: 0 additions & 4 deletions lib/hostip4.c
Expand Up @@ -73,10 +73,6 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#include "memory.h"
/* The last #include file should be: */
#include "memdebug.h"
Expand Down
4 changes: 0 additions & 4 deletions lib/hostip6.c
Expand Up @@ -73,10 +73,6 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#include "memory.h"
/* The last #include file should be: */
#include "memdebug.h"
Expand Down
4 changes: 0 additions & 4 deletions lib/hostsyn.c
Expand Up @@ -71,10 +71,6 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif

#include "memory.h"
/* The last #include file should be: */
#include "memdebug.h"
Expand Down
44 changes: 0 additions & 44 deletions lib/inet_ntoa_r.h

This file was deleted.

0 comments on commit 4e909ee

Please sign in to comment.