sysconf.2 (2010 09)

s
sysconf(2) sysconf(2)
confstr(). A return value of -1
indicates they are not supported.
XBS5_LP64_OFF64
(_SC_XBS5_LP64_OFF64
)
A flag that denotes whether
_CS_XBS5_LP64_OFF64_CFLAGS
,
_CS_XBS5_LP64_OFF64_LDFLAGS
,
_CS_XBS5_LP64_OFF64_LIBS
and
_CS_XBS5_LP64_OFF64_LINTFLAGS
are supported by confstr().
A return value of
-1 indicates they are not supported.
XBS5_LPBIG_OFFBIG
(_SC_XBS5_LPBIG_OFFBIG
)
A flag that denotes whether
_CS_XBS5_LPBIG_OFFBIG_CFLAGS
,
_CS_XBS5_LPBIG_OFFBIG_LDFLAGS
,
_CS_XBS5_LPBIG_OFFBIG_LIBS
and
_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
are supported by
confstr(). A return value of -1
indicates they are not supported.
__________________________________________________________________________________________________
RETURN VALUE
Upon successful completion,
sysconf() returns the value of the named variable. If the value of name
is not recognized,
sysconf() returns -1 and sets errno to [EINVAL]. If the value in name is defined
but is not supported in this environment,
sysconf() returns -1 but does not change errno
.
CPU_IS_PA_RISC() returns positive nonzero if cpuvers is an HP PA-RISC processor; zero if not.
ERRORS
If
sysconf() fails, the value of errno (see errno (2)) is set to:
[EINVAL] The value of name is not valid.
EXAMPLES
The following example determines the number of times the system clock ticks each second:
#include <unistd.h>
long ticks;
...
ticks = sysconf(_SC_CLK_TCK);
The following example determines if the current processor is an HP PA-RISC machine:
#include <unistd.h>
if (CPU_IS_PA_RISC(sysconf(_SC_CPU_VERSION)))
...
WARNINGS
CPU_IS_PA_RISC() is implemented as a macro.
Normally, the values returned from
sysconf() do not change during the lifetime of the calling process.
However, the value of the symbolic constant _POSIX_VERSION and thus the value of
sysconf(_SC_VERSION) can vary under certain circumstances. If either of the feature test macros
_POSIX1_1988 or _XPG3 is defined by the programmer prior to including <unistd.h>, the value of
_POSIX_VERSION is defined as 198808, in conformance with POSIX.1-1988, FIPS 151-1, and XPG3.
Otherwise, the value of _POSIX_VERSION is defined as 199009, in conformance with POSIX.1-1990.
Similarly, the value of the symbolic constant
_XOPEN_VERSION and thus the value of
sysconf(_SC_XOPEN_VERSION) can vary under certain circumstances. If the feature test macro
_XPG3 is defined by the programmer prior to including <unistd.h>, the value of _XOPEN_VERSION
is defined as 3, in conformance with XPG3. Otherwise, the value of _XOPEN_VERSION is defined as 4,
in conformance with XPG4.
See stdsyms (5) for more information about these feature test macros.
Any application that has a dependency on libdld.sl is a potential user of both archived and shared libc.
Applications that comprise both archived and shared components where
sysconf(_SC_LIBC_VERSION) may be invoked from both the archived and shared components may
get inconsistent return values from sysconf().
HP-UX 11i Version 3: September 2010 11 Hewlett-Packard Company 11