SYNOPSIS
#include <unistd.h>
size_t confstr(int name, char *buf, size_t len);
DESCRIPTION
The
The following system variables may be queried:
- _CS_BINDIR
-
Returns the directory which contains the most common utility programs.
- _CS_CPP
-
Returns the path to the C pre-processor command.
- _CS_ETCDIR
-
Returns the directory where various system-level configuration files are stored.
- _CS_LIBDIR
-
Returns the directory where various application-level configuration files are stored.
- _CS_MANPATH
-
Returns the directory where manual pages are located.
- _CS_NLSDIR
-
Returns the directory where Natural Language Support files are stored.
- _CS_NULLDEV
-
Returns the path to the null device (for example, /dev/null).
- _CS_PATH
-
Returns a setting for the PATH environment variable that finds all standard utilities.
- _CS_SHELL
-
Returns the path to the shell interpreter.
- _CS_SPOOLDIR
-
Returns the directory which serves as the system spool directory.
- _CS_TMPDIR
-
Returns the directory where temporary files should be created.
- _CS_TTYDEV
-
Returns the path to the controlling terminal device (for example, /dev/tty).
- _CS_XBS5_ILP32_OFF32_CFLAGS
- _CS_XBS5_ILP32_OFF32_LDFLAGS
- _CS_XBS5_ILP32_OFF32_LIBS
- _CS_XBS5_ILP32_OFF32_LINTFLAGS
-
Returns the values for the compile-time flags, link-time flags, link-time libraries, and flags for the lint command, respectively, to build an application using a programming model with 32-bit int, long, pointer and off_t types.
- _CS_XBS5_ILP32_OFFBIG_CFLAGS
- _CS_XBS5_ILP32_OFFBIG_LDFLAGS
- _CS_XBS5_ILP32_OFFBIG_LIBS
- _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
-
Returns the values for the compile-time flags, link-time flags, link-time libraries, and flags for the lint command, respectively, to build an application using a programming model with 32-bit int, long, and pointer types, and an off_t type that supports at least 64-bit offsets.
- _CS_XBS5_LP64_OFF64_CFLAGS
- _CS_XBS5_LP64_OFF64_LDFLAGS
- _CS_XBS5_LP64_OFF64_LIBS
- _CS_XBS5_LP64_OFF64_LINTFLAGS
-
Returns the values for the compile-time flags, link-time flags, link-time libraries, and flags for the lint command, respectively, to build an application using a programming model with 64-bit int, long, pointer and off_t types.
- _CS_XBS5_LPBIG_OFFBIG_CFLAGS
- _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
- _CS_XBS5_LPBIG_OFFBIG_LIBS
- _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
-
Returns the values for the compile-time flags, link-time flags, link-time libraries, and flags for the lint command, respectively, to build an application using a programming model with an int type supporting at least 32 bits, and long, pointer and off_t types supporting at least 64 bits.
If len is not zero and if name has a
configuration-defined value,
If len is zero and buf is NULL,
PARAMETERS
- name
-
Specifies the system variable to be queried.
- buf
-
Points to the buffer where len-byte values are stored.
- len
-
Is the length of the string.
RETURN VALUES
If name does not have a configuration-defined value,
CONFORMANCE
UNIX 98, with exceptions.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
Several of the values for name listed above are PTC MKS Toolkit UNIX APIs extensions. Because these may not be available on all platforms, to ensure that code is portable, the value should be used in a compile-time check, such as:
#if defined(_CS_TMPDIR) ret = confstr(_CS_PATH, buf, buflen); #else strcmp(buf, "/tmp"); #endif
The
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutConfStr() ,fpathconf() ,pathconf() ,sysconf()
PTC MKS Toolkit 10.5 Documentation Build 40.