1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Honor feature macros in <arpa/inet.h>.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-06-08 15:30:33 +02:00
parent d56dcafd27
commit 5e295b8d94

View file

@ -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. This file is part of the Sortix C Library.
@ -31,11 +31,23 @@
__BEGIN_DECLS __BEGIN_DECLS
/* Functions from POSIX that is considered obsolete due to bad design. */
#if __USE_POSIX
in_addr_t inet_addr(const char*); in_addr_t inet_addr(const char*);
char* inet_ntoa(struct in_addr); 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); const char* inet_ntop(int, const void* __restrict, char* __restrict, socklen_t);
int inet_pton(int, const char* __restrict, void* __restrict); 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 __END_DECLS