diff options
author | Eric Blake <eblake@redhat.com> | 2013-09-26 11:26:29 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2013-09-26 13:16:03 -0600 |
commit | 3bd0d48db800994cc10c3340c41d3242390dc68f (patch) | |
tree | c7dbaa2d28baa06e25645eaec87102fa32d83a58 /m4/unistd_h.m4 | |
parent | 883e87df0a2236794c97afdd985c3706074d3195 (diff) | |
download | gnulib-3bd0d48db800994cc10c3340c41d3242390dc68f.tar.gz |
getdtablesize: work around cygwin issue
Cygwin 1.7.25 has a bug that even though it claims to support
RLIMIT_NOFILE inheritance, there is no enforcement of the soft
limit, and getdtablesize() automatically grows until it reaches
the hard limit which cannot be changed by setrlimit(). Best is
to just treat things as an invariant limit, as several other
modules assume that getdtablesize() will not change without an
intervening setrlimit().
* m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Detect problem.
* modules/getdtablesize (configure.ac): Build replacement.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up a witness.
* modules/unistd (Makefile.am): Expose the witness.
* lib/unistd.in.h (getdtablesize): Declare replacement.
* lib/getdtablesize.c (rpl_getdtablesize): Work around it.
* tests/test-getdtablesize.c (main): Test it.
* doc/glibc-functions/getdtablesize.texi (getdtablesize): Document it.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'm4/unistd_h.m4')
-rw-r--r-- | m4/unistd_h.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index 32dcfa5820..4231578cf2 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 66 +# unistd_h.m4 serial 67 dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -160,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) + REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) |