From 5e295b8d94208a1a6a4cf9f5fa54f9e9bce9462c Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 8 Jun 2014 15:30:33 +0200 Subject: [PATCH] Honor feature macros in . --- libc/include/arpa/inet.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libc/include/arpa/inet.h b/libc/include/arpa/inet.h index 501a4107..9fb2486b 100644 --- a/libc/include/arpa/inet.h +++ b/libc/include/arpa/inet.h @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2013. + Copyright(C) Jonas 'Sortie' Termansen 2013, 2014. This file is part of the Sortix C Library. @@ -31,11 +31,23 @@ __BEGIN_DECLS +/* Functions from POSIX that is considered obsolete due to bad design. */ +#if __USE_POSIX in_addr_t inet_addr(const char*); char* inet_ntoa(struct in_addr); +#endif + +/* Functions from POSIX. */ +#if __USE_SORTIX || __USE_POSIX const char* inet_ntop(int, const void* __restrict, char* __restrict, socklen_t); int inet_pton(int, const char* __restrict, void* __restrict); -/* TODO: Also provide the various extensions supported by glibc. */ +#endif + +/* Functions copied from elsewhere. */ +#if __USE_SORTIX +/* TODO: int inet_aton(const char*, struct in_addr*); */ +/* TODO: char* inet_neta(in_addr_t, char*, size_t); */ +#endif __END_DECLS