sysconf [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume I
sysconf
Determine system configuration options.
#include <unistd.h>
long sysconf(int name);
Parameters
name specifies the system configuration option for which you want
to obtain the value. The value of name is given may be any
one of a set of symbols defined in <unistd.h>; each of these
symbols corresponds to an environment variable or manifest
constant which gives a system configuration option.
Return Values
sysconf() returns the value associated with the specified name. If name
is not recognized, or stands for a symbol which is undefined, then
sysconf() returns -1.
Description
The name argument may be any one of the following symbols:
_SC_ARG_MAX Stands for ARG_MAX defined in
<limits.h>--the maximum number of bytes of
arguments and environment data that can be
passed in an exec() call.
_SC_BC_BASE_MAX Stands for BC_BASE_MAX defined in
<unistd.h>--the maximum value for ibase and
obase in bc(1).
_SC_BC_DIM_MAX Stands for BC_DIM_MAX defined in
<unistd.h>--the maximum number of elements
in a bc(1) array.
_SC_BC_SCALE_MAX Stands for BC_SCALE_MAX defined in
<unistd.h>--the maximum scale in bc(1).
_SC_BC_STRING_MAX Stands for BC_STRING_MAX defined in
<unistd.h>--the maximum length of a string
accepted by bc(1).
_SC_CHILD_MAX Stands for CHILD_MAX defined in
<limits.h>--the maximum number of processes
that a real user ID may have executing
simultaneously.
_SC_CLK_TCK Stands for CLK_TCK defined in <time.h>--the
number of clock ticks in a second.
_SC_COLL_WEIGHTS_MAX Stands for COLL_WEIGHTS_MAX defined in
<unistd.h>--the maximum number of weights
that can be assigned to an entry of the
LC_COLLATE order keyword in the locale
definition file.
_SC_EXPR_NEST_MAX Stands for EXPR_NEST_MAX defined in
<unistd.h>--the largest number of
expressions that can be nested within
parentheses by expr(1).
_SC_JOB_CONTROL Stands for _POSIX_JOB_CONTROL which may be
defined in <unistd.h>--this indicates that
certain job control operations are
implemented by this version of the operating
system. If _POSIX_JOB_CONTROL is defined,
various functions (for example, setpgid())
have greater functionality than when it is
not defined.
_SC_LINE_MAX Stands for LINE_MAX defined in
<unistd.h>--the maximum length of a
utility's input line when the utility
processes text files. This length includes
the newline on the end of the line.
_SC_NGROUPS_MAX Stands for NGROUPS_MAX defined in
<limits.h>--the maximum number of
supplementary group IDs that may be
associated with a process.
_SC_OPEN_MAX Stands for OPEN_MAX defined in
<limits.h>--the maximum number of files that
a single process may have open at one time.
_SC_RE_DUP_MAX Stands for RE_DUP_MAX defined in
<unistd.h>--the largest number of repeated
occurrences of a regular expression that you
can use in the notation \{m,n\}.
_SC_SAVED_IDS Stands for _POSIX_SAVED_IDS which may be
defined in <unistd.h>--this indicates that
this POSIX implementation has a saved
set-user-ID and a saved set- group-ID. This
affects the behavior of functions like
setuid() and setgid().
_SC_STREAM_MAX Stands for _POSIX_STREAM_MAX which may be
defined in <limits.h>--the number of streams
that one process can have open at one time.
_SC_TZNAME_MAX Stands for _POSIX_TZNAME_MAX which may be
defined in <limits.h>--the maximum number of
bytes supported for the name of a time zone
(not of the TZ variable).
_SC_VERSION Stands for _POSIX_VERSION which may be
defined in <unistd.h>--this indicates the
version of the POSIX.1 standard to which the
system conforms.
_SC_2_C_BIND Stands for _POSIX2_C_BIND which may be
defined in <unistd.h>--if this is defined,
the system supports the C Language Bindings
Option of POSIX.2.
_SC_2_C_DEV Stands for _POSIX2_C_DEV which may be
defined in <unistd.h>--if this is defined,
the system supports the C Language
Development Utilities Option of POSIX.2.
_SC_2_CHAR_TERM Stands for _POSIX2_CHAR_TERM which may be
defined in <unistd.h>--if this is defined,
the system supports at least one terminal
type capable of all operations necessary for
the User Portability Utilities. This is
only on if _SC_2_UPE is on.
_SC_2_FORT_DEV Stands for _POSIX2_FORT_DEV which may be
defined in <unistd.h>--if this is defined,
the system supports the FORTRAN Development
Utilities Option of POSIX.2.
_SC_2_FORT_RUN Stands for _POSIX2_FORT_RUN which may be
defined in <unistd.h>--if this is defined,
the system supports the FORTRAN Runtime
Utilities Option of POSIX.2.
_SC_2_LOCALEDEF Stands for _POSIX2_LOCALEDEF which may be
defined in <unistd.h>--if this is defined,
the system supports the creation of locales.
_SC_2_SW_DEV; Stands for _POSIX2_SW_DEV which may be
defined in <unistd.h>--if this is defined,
the system supports the Software Development
Utilities Option of POSIX.2.
_SC_2_UPE Stands for _POSIX2_UPE which may be defined
in <unistd.h>--if this is defined, the
system supports the User Portability
Utilities Option.
_SC_2_VERSION Stands for _POSIX2_VERSION which may be
defined in <unistd.h>--this indicates the
version of the POSIX.2 standard to which the
system conforms.
Errors
If sysconf() fails to recognize name, it returns -1 and sets errno to the
value:
EINVAL CAUSE The value specified for the name argument was
invalid.
ACTION Specify a valid value for name.
See Also
bc(1), expr(1), paste(1)
MPE/iX 5.0 Documentation