Skip to content

Commit

Permalink
configure: remove checks for 5 functions never used
Browse files Browse the repository at this point in the history
fork, getprotobyname, inet_addr, perror, uname

closes curl#1638
  • Loading branch information
bagder committed Jul 4, 2017
1 parent 7121a99 commit 909a5be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
7 changes: 1 addition & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
],[
Expand Down
13 changes: 0 additions & 13 deletions lib/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 909a5be

Please sign in to comment.