HP-UX Reference (11i v2 03/08) - 3 Library Functions A-M (vol 6)

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
Identifier for each physical machine. Returned as an opaque string of printable ascii
characters. This string has the same value for all partitions in a physical 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 avail-
able; this is expected to be the case only for prototype machines or other systems
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 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 as found labeled on the external machine chassis. 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(1) and c89(1) utilities to build an
application 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(1) and c89(1) utilities to build an appli-
cation 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(1) and c89(1) utilities to build an applica-
tion using a programming model with 32-bit int, long, pointer, and off_t types.
Section 3108 Hewlett-Packard Company 1 HP-UX 11i Version 2: August 2003