Deprecate inet_addr(3) and inet_ntoa(3).

This commit is contained in:
Jonas 'Sortie' Termansen 2016-07-01 19:39:06 +02:00
parent a53dd5d29d
commit e5eed18cf4
2 changed files with 23 additions and 0 deletions

View File

@ -149,6 +149,27 @@ This function is rather pointless. If we use a character encoding that wasn't
ascii compatible, then it doesn't make sense. If we use a sane character
encoding such as UTF-8, then you can simply check if the value is at most 127.
inet_addr
---------
This function only supports IPv4 and it supports a variety of weird ways to type
IPv4 addresses. Use inet_pton instead, which supports other address families as
well and only support standard address notations.
Soritx currently implements a stub of this function that calls abort(), this is
for compatibility to get some ports to compile (the ports should be patched to
use inet_pton instead).
inet_ntoa
---------
This function only supports IPv4 and it isn't thread safe. Use inet_ntop instead
which is thread safe and supports other address families.
Soritx currently implements a stub of this function that calls abort(), this is
for compatibility to get some ports to compile (the ports should be patched to
use inet_ntop instead).
lockf
-----

View File

@ -30,7 +30,9 @@ extern "C" {
/* Functions from POSIX that is considered obsolete due to bad design. */
#if __USE_SORTIX || __USE_POSIX
__attribute__((__warning__("inet_addr is deprecated by inet_pton")))
in_addr_t inet_addr(const char*);
__attribute__((__warning__("inet_ntoa is deprecated by inet_ntop")))
char* inet_ntoa(struct in_addr);
#endif