]> granicus.if.org Git - curl/commitdiff
configure: remove checks for 5 functions never used
authorDaniel Stenberg <daniel@haxx.se>
Tue, 4 Jul 2017 07:01:39 +0000 (09:01 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 4 Jul 2017 09:32:25 +0000 (11:32 +0200)
fork, getprotobyname, inet_addr, perror, uname

closes #1638

configure.ac
lib/connect.c

index c999e7555328ab3043c69cf77242eb0d0c57305b..5104c9ecd2c3fd8f3b995f9e4a864be8e3788bb8 100644 (file)
@@ -3281,23 +3281,18 @@ case $host in
     ;;
 esac
 
-AC_CHECK_FUNCS([fork \
-  geteuid \
+AC_CHECK_FUNCS([geteuid \
   getpass_r \
   getppid \
-  getprotobyname \
   getpwuid \
   getpwuid_r \
   getrlimit \
   gettimeofday \
   if_nametoindex \
-  inet_addr \
-  perror \
   pipe \
   setlocale \
   setmode \
   setrlimit \
-  uname \
   utime \
   utimes
 ],[
index d4fd52b9916073a5d7a6cae493d4a9c6cb56026c..e959c1e9bb05c33ba244e68b30819fe56a1d8038 100644 (file)
@@ -879,19 +879,6 @@ void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd)
   curl_socklen_t onoff = (curl_socklen_t) 1;
   int level = IPPROTO_TCP;
 
-#if 0
-  /* The use of getprotobyname() is disabled since it isn't thread-safe on
-     numerous systems. On these getprotobyname_r() should be used instead, but
-     that exists in at least one 4 arg version and one 5 arg version, and
-     since the proto number rarely changes anyway we now just use the hard
-     coded number. The "proper" fix would need a configure check for the
-     correct function much in the same style the gethostbyname_r versions are
-     detected. */
-  struct protoent *pe = getprotobyname("tcp");
-  if(pe)
-    level = pe->p_proto;
-#endif
-
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
   (void) conn;
 #endif