summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-08-08 23:57:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-08-08 23:57:59 -0700
commitfea30ac1c84d0c3d2fff34a309980c53e3db2fe8 (patch)
tree9ab468b3dcb00741623a02575d498765a82221fe /lib
parentb2164af4705e141662e3fbf22605fe842182e20d (diff)
downloademacs-fea30ac1c84d0c3d2fff34a309980c53e3db2fe8.tar.gz
Merge from gnulib.
This incorporates: 2014-08-07 getdtablesize: fall back on sysconf (_SC_OPEN_MAX) 2014-08-05 sys_select: fix FD_ZERO problem on Solaris 10 * lib/getdtablesize.c, lib/sys_select.in.h: Update from gnulib.
Diffstat (limited to 'lib')
-rw-r--r--lib/getdtablesize.c8
-rw-r--r--lib/sys_select.in.h15
2 files changed, 16 insertions, 7 deletions
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index 946738cdb68..f0c62713a65 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -104,4 +104,12 @@ rpl_getdtablesize(void)
return getdtablesize ();
}
+#elif defined _SC_OPEN_MAX
+
+int
+getdtablesize (void)
+{
+ return sysconf (_SC_OPEN_MAX);
+}
+
#endif
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index a876b9caa3f..58508b0c5e5 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -24,8 +24,8 @@
On Cygwin, <sys/time.h> includes <sys/select.h>.
Simply delegate to the system's header in this case. */
#if (@HAVE_SYS_SELECT_H@ \
+ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H \
&& ((defined __osf__ && defined _SYS_TYPES_H_ \
- && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
&& defined _OSF_SOURCE) \
|| (defined __sun && defined _SYS_TYPES_H \
&& (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
@@ -36,12 +36,13 @@
#elif (@HAVE_SYS_SELECT_H@ \
&& (defined _CYGWIN_SYS_TIME_H \
- || (defined __osf__ && defined _SYS_TIME_H_ \
- && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
- && defined _OSF_SOURCE) \
- || (defined __sun && defined _SYS_TIME_H \
- && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
- || defined __EXTENSIONS__))))
+ || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
+ && ((defined __osf__ && defined _SYS_TIME_H_ \
+ && defined _OSF_SOURCE) \
+ || (defined __sun && defined _SYS_TIME_H \
+ && (! (defined _XOPEN_SOURCE \
+ || defined _POSIX_C_SOURCE) \
+ || defined __EXTENSIONS__))))))
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@