Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/sysconf.cc')
-rw-r--r--winsup/cygwin/sysconf.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
index 678d978a9..944afdd41 100644
--- a/winsup/cygwin/sysconf.cc
+++ b/winsup/cygwin/sysconf.cc
@@ -35,7 +35,12 @@ sysconf (int in)
case _SC_OPEN_MAX:
return getdtablesize ();
case _SC_PAGESIZE:
- return getpagesize ();
+ {
+ long max = getdtablesize ();
+ if (max < OPEN_MAX)
+ max = OPEN_MAX;
+ return max;
+ }
case _SC_CLK_TCK:
return CLOCKS_PER_SEC;
case _SC_JOB_CONTROL: