confstr.3c (2010 09)
c
confstr(3C) confstr(3C)
NAME
confstr( ) - get string-valued configuration values
SYNOPSIS
#include <unistd.h>
size_t confstr(int name, char *buf, size_t len);
DESCRIPTION
confstr() provides a method for applications to get configuration-defined string values. Its use and
purpose are similar to sysconf() (see sysconf (2)), except that it is used where string values rather than
numeric values are returned.
The name parameter can take on the following name values, which are defined in
<unistd.h>.
_CS_PATH A default value for the PATH environment variable which can be used to locate com-
mands in Section 1 of the HP-UX Reference and utilities defined in the POSIX.2
standard that are currently implemented in the HP-UX operating system.
_CS_HW_CPU_SUPP_BITS
Which kernel is supported on the hardware. Current values returned include "32",
"32/64" or "64".
_CS_KERNEL_BITS
Whether the kernel is 32-bit or 64-bit. Current values returned include "32" or "64".
_CS_MACHINE_MODEL
The hardware model string.
_CS_MACHINE_IDENT
Unique identifier for each machine. Returned as an opaque string of printable
ASCII characters. This string has the same value for all partitions in a physical
machine. Refer to _CS_PARTITION_IDENT
for a unique identifier for partitions
in a machine. For hardware classes first released with HP-UX 11i or later, this ID
is unique across all hardware classes. For earlier hardware classes, the ID number
is unique only within the hardware class. A null string is returned if no ID number
is available; this is expected to be the case only for prototype machines or other sys-
tems improperly configured in manufacturing. Comparisons of this value must be
made using the string compare functions, see string (3C).
_CS_PARTITION_IDENT
Identifier for each partition existing on a machine. Returned as an opaque string of
printable ASCII characters. For any machine not supporting partitions this value
will be the same as _CS_MACHINE_IDENT
. Comparisons of this value must be
made using the string compare functions, see string (3C).
_CS_MACHINE_SERIAL
Machine serial number. The value will be a printable ASCII string. This string is
not available on all classes of machines; if unavailable, the string will be empty.
This string is not a unique identifier of the machine, since machines of different
classes can have the same serial number.
If a unique identifier is needed, use
_CS_MACHINE_IDENT or
_CS_PARTITION_IDENT.
_CS_XBS5_ILP32_OFF32_CFLAGS
The set of initial options to be given to the cc and c89 utilities to build an applica-
tion using a programming model with 32-bit int, long, pointer, and off_t types.
_CS_XBS5_ILP32_OFF32_LDFLAGS
The set of final options to be given to the cc and c89 utilities to build an applica-
tion using a programming model with 32-bit int, long, pointer, and off_t types.
_CS_XBS5_ILP32_OFF32_LIBS
The set of libraries to be given to the cc and c89 utilities to build an application
using a programming model with 32-bit int, long, pointer, and off_t types.
_CS_XBS5_ILP32_OFF32_LINTFLAGS
The set of options to be given to the lint utility to check application source using a
programming model with 32-bit int, long, pointer, and off_t types.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1