[HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro using sysconf.
authorRoland McGrath <roland@redhat.com>
Sun, 5 Feb 1995 23:35:39 +0000 (23:35 +0000)
committerRoland McGrath <roland@redhat.com>
Sun, 5 Feb 1995 23:35:39 +0000 (23:35 +0000)
job.c

diff --git a/job.c b/job.c
index 94c2b8f8c23ee1acae798a79951bb21e94cf40f4..5b3af833a6485be487776b7676447c0084a1e876 100644 (file)
--- a/job.c
+++ b/job.c
@@ -122,6 +122,9 @@ extern int setgid (), getgid ();
 #ifdef HAVE_GETDTABLESIZE
 extern int getdtablesize ();
 #else
+#ifdef HAVE_SYSCONF_OPEN_MAX
+#define getdtablesize()                ((int) sysconf (_SC_OPEN_MAX))
+#else
 #include <sys/param.h>
 #define getdtablesize() NOFILE
 #if !defined (NOFILE) && defined (NOFILES_MAX)
@@ -130,6 +133,7 @@ extern int getdtablesize ();
 #endif
 #endif
 #endif
+#endif
 
 extern int getloadavg ();
 extern int start_remote_job_p ();