From eaff1728aebaf49a7bc6f1c8ff7bc85025fe1151 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 5 Oct 2008 16:58:03 +0200 Subject: [PATCH] Use getdtablesize module. --- ChangeLog | 10 ++++++++++ lib/spawn_faction_addclose.c | 7 +------ lib/spawn_faction_adddup2.c | 7 +------ lib/spawn_faction_addopen.c | 7 +------ modules/posix_spawn_file_actions_addclose | 1 + modules/posix_spawn_file_actions_adddup2 | 1 + modules/posix_spawn_file_actions_addopen | 1 + 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index f21c6fb69..70a415292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2008-10-05 Bruno Haible + * lib/spawn_faction_addclose.c (__sysconf): Use getdtablesize always. + * lib/spawn_faction_adddup2.c (__sysconf): Likewise. + * lib/spawn_faction_addopen.c (__sysconf): Likewise. + * modules/posix_spawn_file_actions_addclose (Depends-on): Add + getdtablesize. + * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise. + * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise. + +2008-10-05 Bruno Haible + * modules/getdtablesize-tests: New file. * tests/test-getdtablesize.c: New file. diff --git a/lib/spawn_faction_addclose.c b/lib/spawn_faction_addclose.c index d2a03e81a..356604722 100644 --- a/lib/spawn_faction_addclose.c +++ b/lib/spawn_faction_addclose.c @@ -23,12 +23,7 @@ #include #if !_LIBC -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# define __sysconf(open_max) _getmaxstdio () -# else -# define __sysconf(open_max) getdtablesize () -# endif +# define __sysconf(open_max) getdtablesize () #endif #include "spawn_int.h" diff --git a/lib/spawn_faction_adddup2.c b/lib/spawn_faction_adddup2.c index e86196009..688873fda 100644 --- a/lib/spawn_faction_adddup2.c +++ b/lib/spawn_faction_adddup2.c @@ -23,12 +23,7 @@ #include #if !_LIBC -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# define __sysconf(open_max) _getmaxstdio () -# else -# define __sysconf(open_max) getdtablesize () -# endif +# define __sysconf(open_max) getdtablesize () #endif #include "spawn_int.h" diff --git a/lib/spawn_faction_addopen.c b/lib/spawn_faction_addopen.c index 08482ba19..2f63bc3c2 100644 --- a/lib/spawn_faction_addopen.c +++ b/lib/spawn_faction_addopen.c @@ -23,12 +23,7 @@ #include #if !_LIBC -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# define __sysconf(open_max) _getmaxstdio () -# else -# define __sysconf(open_max) getdtablesize () -# endif +# define __sysconf(open_max) getdtablesize () #endif #include "spawn_int.h" diff --git a/modules/posix_spawn_file_actions_addclose b/modules/posix_spawn_file_actions_addclose index 865e6c508..b85eacfdb 100644 --- a/modules/posix_spawn_file_actions_addclose +++ b/modules/posix_spawn_file_actions_addclose @@ -9,6 +9,7 @@ m4/posix_spawn.m4 Depends-on: spawn +getdtablesize configure.ac: gl_POSIX_SPAWN diff --git a/modules/posix_spawn_file_actions_adddup2 b/modules/posix_spawn_file_actions_adddup2 index 3b8a7a012..35a67e85d 100644 --- a/modules/posix_spawn_file_actions_adddup2 +++ b/modules/posix_spawn_file_actions_adddup2 @@ -9,6 +9,7 @@ m4/posix_spawn.m4 Depends-on: spawn +getdtablesize configure.ac: gl_POSIX_SPAWN diff --git a/modules/posix_spawn_file_actions_addopen b/modules/posix_spawn_file_actions_addopen index 99656ce4d..c715c71cd 100644 --- a/modules/posix_spawn_file_actions_addopen +++ b/modules/posix_spawn_file_actions_addopen @@ -9,6 +9,7 @@ m4/posix_spawn.m4 Depends-on: spawn +getdtablesize configure.ac: gl_POSIX_SPAWN -- 2.11.0