aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-03-01 10:14:42 +0100
committerCorinna Vinschen <corinna@vinschen.de>2022-03-01 11:43:52 +0100
commit3e11a002b3eb78784190ebdd382ef3720afbb16a (patch)
treed2993b4bbce1238ee91fc2eaf587ecb0b4852251
parent1e6c51d74136d47b1d961a9d8d8ccb6478cfd3a8 (diff)
downloadnewlib-3e11a002b3eb78784190ebdd382ef3720afbb16a.zip
newlib-3e11a002b3eb78784190ebdd382ef3720afbb16a.tar.gz
newlib-3e11a002b3eb78784190ebdd382ef3720afbb16a.tar.bz2
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>
-rw-r--r--winsup/cygwin/sysconf.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
index a783028..dfd8b33 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 */