1 /* sysconf.c POSIX 4.8.1
2 * long int sysconf(int name);
4 * POSIX allows some of the values in <limits.h> to be increased at
5 * run time. The sysconf() function allows such values to be checked
6 * at run time. MINIX does not use this facility - the run time
7 * limits are those given in <limits.h>.
10 #include "namespace.h"
19 __weak_alias(sysconf
, __sysconf
)
22 static u32_t
get_hz(void)
28 if ((fp
= fopen(_PATH_PROC
"hz", "r")) != NULL
)
30 r
= fscanf(fp
, "%u", &hz
);
41 long int sysconf(name
)
42 int name
; /* property being inspected */
46 return (long) ARG_MAX
;
49 return (long) CHILD_MAX
;
52 return (long) get_hz();
55 return (long) NGROUPS_MAX
;
58 return (long) OPEN_MAX
;
61 return -1L; /* no job control */
64 return -1L; /* no saved uid/gid */
67 return (long) _POSIX_VERSION
;
70 return (long) STREAM_MAX
;
73 return (long) TZNAME_MAX
;