Re: [dev] [sbase][RFC] Add a simplistic version of tr

From: Silvan Jegen <s.jegen_AT_gmail.com>
Date: Fri, 29 Nov 2013 09:54:54 +0100

On Thu, Nov 28, 2013 at 8:21 PM, Gregor Best <gbe_AT_ring0.de> wrote:
>> [...]
>> anon = (char*)mmap(NULL, 4096, PROT_READ|PROT_WRITE,
>> MAP_ANON|MAP_SHARED, -1, 0);
>>
>> that probably means it may not be that portable after all. Thanks for
>> making me aware of it in any case.
>> [...]
>
> *BSD has it, and one of the Gentoo machines I have access to has it too,
> and so does an Ubuntu server for work. Manpages on all machines contain
> at least a small paragraph about anonymous mappings and both mention
> that fd should be -1 in that case. Looks portable enough.

Turns out I was looking at the wrong section. The mmap (3p) man page
does not mention it (since it's not a POSIX conform function), but
mmap (2) does. My bad.
Received on Fri Nov 29 2013 - 09:54:54 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 29 2013 - 10:00:09 CET