mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-29 05:50:27 +00:00
Improve getservbyname and getservbyport (#207)
- support aliases in /etc/services - use case insensitive comparisons - add tests
This commit is contained in:
parent
58fb2fb3d3
commit
c0bec24fa2
7 changed files with 202 additions and 58 deletions
|
@ -6,9 +6,10 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int LookupServicesByPort(const int, char **, char *, size_t)
|
||||
int LookupServicesByPort(const int, char **, char *, size_t, const char *)
|
||||
paramsnonnull((2, 3));
|
||||
int LookupServicesByName(const char *, char **) paramsnonnull((1, 2));
|
||||
int LookupServicesByName(const char *, char **, char *, size_t, const char *)
|
||||
paramsnonnull((1, 2, 3));
|
||||
|
||||
/* TODO: implement like struct HostsTxt? */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue