summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-11-20 19:29:03 +0000
committerEric Andersen <andersen@codepoet.org>2001-11-20 19:29:03 +0000
commit62b9d33a219177bbd7f6a9406e16d3dc6294e8f1 (patch)
tree472492572488aa5743c44a2fc1146356196d51d9 /libc
parent342a6da429b9241b71a96704e3f7912ee2de9616 (diff)
Can't use CLK_TCK in here since /usr/include/bits/time.h now
defines that as __sysconf(_SC_CLK_TCK) causing infinite recursion. -Erik
Diffstat (limited to 'libc')
-rw-r--r--libc/unistd/sysconf.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c
index 1ed2a4c0c..53d991f8a 100644
--- a/libc/unistd/sysconf.c
+++ b/libc/unistd/sysconf.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define _XOPEN_SOURCE 500
#include <features.h>
#include <errno.h>
#include <limits.h>
@@ -24,13 +23,16 @@
#include <pwd.h>
#include <stddef.h>
#include <stdio.h>
-#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <sys/sysinfo.h>
#include <sys/types.h>
#include <regex.h>
+#ifndef SYSTEM_CLK_TCK
+# define SYSTEM_CLK_TCK 100
+#endif
+
extern int getpagesize (void);
extern int getdtablesize (void);
@@ -89,11 +91,8 @@ long int __sysconf(int name)
#endif
case _SC_CLK_TCK:
-#ifdef CLK_TCK
- return CLK_TCK;
-#else
- return 60;
-#endif
+ /* Can't use CLK_TCK here since that calls __sysconf(_SC_CLK_TCK) */
+ return SYSTEM_CLK_TCK;
case _SC_NGROUPS_MAX:
#ifdef NGROUPS_MAX