On Mar 2 12:45, Brian Inglis wrote: > On 2022-03-02 01:25, Corinna Vinschen wrote: > > Hi Brian, > > > > On Mar 1 13:20, Brian Inglis wrote: > > > Interested in a patch for sysconf.cc to return: > > > > > > _SC_TZNAME_MAX => TZNAME_MAX and > > > _SC_MONOTONIC_CLOCK => _POSIX_MONOTONIC_CLOCK? > > > > not sure I understand the question. Both are already implemented. > > > > $ getconf -a | egrep '(TZNAME_MAX|MONOTONIC_CLOCK)' > > _POSIX_TZNAME_MAX 6 > > TZNAME_MAX undefined > > _POSIX_MONOTONIC_CLOCK 200809 > > Sorry, must have been looking at very *OLD* version online, as > _SC_CLOCK_SELECTION and _SC_MONOTONIC_CLOCK were not defined. > > Why did you not define _SC_TZNAME_MAX => _POSIX_TZNAME_MAX when you tweaked > it?
Because it's wrong. _POSIX_TZNAME_MAX is just a minimum value required by POSIX, not the correct value to return for TZNAME_MAX. > My rereading of the man and POSIX pages leads me to believe that for all > known values of _SC_... the entries now showing {nsup, {c:0}} should be > {cons, {c:-1L}} supported but undefined, and only out of range values for > the parameter should be treated as {nsup, {c:-1L}}? These are really not undefined, but not supported on Cygwin. That's why they return with EINVAL. I see what you mean, though, let me think about it. while looking into this I see at least one obvious bug. While adding POSIX per-process timers in 2019 I added a valid DELAYTIMER_MAX value, but I neglected to add this to sysconf. I'm going to fix this. Corinna