From e40f48a421a9176e3e298b5bac75f0355b219e58 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 25 Jun 2013 21:35:49 -0400 Subject: implement inet_lnaof, inet_netof, and inet_makeaddr also move all legacy inet_* functions into a single file to avoid wasting object file and compile time overhead on them. the added functions are legacy interfaces for working with classful ipv4 network addresses. they have no modern usefulness whatsoever, but some programs unconditionally use them anyway, and they're tiny. --- src/network/inet_addr.c | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/network/inet_addr.c (limited to 'src/network/inet_addr.c') diff --git a/src/network/inet_addr.c b/src/network/inet_addr.c deleted file mode 100644 index 84137281..00000000 --- a/src/network/inet_addr.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include -#include "__dns.h" - -in_addr_t inet_addr(const char *p) -{ - struct sockaddr_in sin; - if (__ipparse(&sin, AF_INET, p)) return -1; - return sin.sin_addr.s_addr; -} -- cgit v1.2.1