public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: sysconf: _SC_TZNAME_MAX: return -1 as valid value
Date: Tue,  1 Mar 2022 10:44:26 +0000 (GMT)	[thread overview]
Message-ID: <20220301104426.DFBBF3858C78@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3e11a002b3eb78784190ebdd382ef3720afbb16a

commit 3e11a002b3eb78784190ebdd382ef3720afbb16a
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Mar 1 10:14:42 2022 +0100

    Cygwin: sysconf: _SC_TZNAME_MAX: return -1 as valid value
    
    sysconf incorrectly sets errno to EINVAL for _SC_TZNAME_MAX.
    Don't do that.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/sysconf.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
index a78302805..dfd8b33b1 100644
--- a/winsup/cygwin/sysconf.cc
+++ b/winsup/cygwin/sysconf.cc
@@ -505,7 +505,7 @@ static struct
   {cons, {c:SEM_VALUE_MAX}},		/*  17, _SC_SEM_VALUE_MAX */
   {cons, {c:SIGQUEUE_MAX}},		/*  18, _SC_SIGQUEUE_MAX */
   {cons, {c:TIMER_MAX}},		/*  19, _SC_TIMER_MAX */
-  {nsup, {c:0}},			/*  20, _SC_TZNAME_MAX */
+  {cons, {c:-1L}},			/*  20, _SC_TZNAME_MAX */
   {cons, {c:_POSIX_ASYNCHRONOUS_IO}},	/*  21, _SC_ASYNCHRONOUS_IO */
   {cons, {c:_POSIX_FSYNC}},		/*  22, _SC_FSYNC */
   {cons, {c:_POSIX_MAPPED_FILES}},	/*  23, _SC_MAPPED_FILES */


                 reply	other threads:[~2022-03-01 10:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220301104426.DFBBF3858C78@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).