setrlimit always fails

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Tue Feb 16 18:33:43 GMT 2021


On 2021-02-16 08:22, Marco Atzeri via Cygwin wrote:
> On 16.02.2021 15:53, Patrick Chkoreff wrote:
>> Corinna Vinschen wrote on 2/15/21 3:48 PM:
>>
>>> On Feb 15 14:54, Patrick Chkoreff wrote:
>>>> Corinna Vinschen wrote on 2/15/21 4:14 AM:
>>>> To fix that, I must define _USE_XOPEN
>>>
>>> You really, really must not use this macro.
>>
>> I'm glad to hear something definitive about that.  I don't even remember
>> how I arrived at that hack.
> 
> FYI
> 
> /usr/include/sys/features.h
> 
> provides the full framework for the different options

Define both to allow everything:

_DEFAULT_SOURCE enables BSD and SysV features, is the default if *NO* others 
defined, and replaces old _BSD_SOURCE and/or _SVID_SOURCE
_GNU_SOURCE enables all the GNU, X/Open, POSIX, C, etc. features but original 
Unix SysV and BSD extensions

Search online for man 7 feature_test_macros, copy from a Linux system, or 
download, and install the man page under /usr/local/man/man7/ for reference.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin mailing list