Mail archive
alpine-devel

Re: [alpine-devel] Non-standard C library

From: Shiz <hi_at_shiz.me>
Date: Tue, 31 Jan 2017 23:42:39 +0100

> On 31 Jan 2017, at 22:33, Harald Arnesen <harald_at_skogtun.org> wrote:
>
> William Pitcock [2017-01-31 20:25]:
>
>> I asked about it on the musl list for you. They rejected the change
>> request, citing POSIX:
>>
>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netdb.h.html
>>
>> which explicitly says:
>>
>> "The <netdb.h> header shall define the IPPORT_RESERVED symbolic
>> constant with the value of the highest reserved Internet port number."
>>
>> Including both <netinet/in.h> and <netdb.h> is likely more portable
>> than the Snobol maintainer's current approach, as well.
>
> And which operating systems follow that Posix standard?

#include <stdio.h>
#include <netdb.h>

int main(void)
{
    printf("%d\n", IPPORT_RESERVED);
    return 0;
}

ยป uname ; ./ttt
Darwin
1024
$ uname ; ls /lib | grep ld-linux ; ./ttt
Linux
ld-linux-x86-64.so.2
1024
# uname ; ls /lib | grep ld-musl ; ./ttt
Linux
ld-musl-x86_64.so.1
1024

- Shiz




---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Jan 31 2017 - 23:42:39 UTC