summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-02-05 23:35:39 +0000
committerRoland McGrath <roland@redhat.com>1995-02-05 23:35:39 +0000
commit3f506aaf9041e890d1a1e71bdaedbc4718b20232 (patch)
tree43933365f7089553edcd4d7e2ea824604a8526ec /job.c
parent75ea6c3ce2407596e23aa6da237649869da12090 (diff)
downloadgunmake-3f506aaf9041e890d1a1e71bdaedbc4718b20232.tar.gz
[HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro using sysconf.
Diffstat (limited to 'job.c')
-rw-r--r--job.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/job.c b/job.c
index 94c2b8f..5b3af83 100644
--- 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 ();