confstr(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

confstr(3c)

Standard C Library Functions                                       confstr(3C)



NAME
       confstr - get configurable variables

SYNOPSIS
       #include <unistd.h>

       size_t confstr(int name, char *buf, size_t len);

DESCRIPTION
       The  confstr()  function provides a method for applications to get con‐
       figuration-defined string values. Its use and purpose  are  similar  to
       the  sysconf(3C)  function,  but  it is used where string values rather
       than numeric values are returned.


       The name argument represents the system variable to be queried.


       If len is not 0, and if name has a configuration-defined  value,  conf‐
       str()  copies that value into the len-byte buffer pointed to by buf. If
       the string to be returned is longer than len bytes, including the  ter‐
       minating  null,  then confstr() truncates the string to len−1 bytes and
       null-terminates the result. The application can detect that the  string
       was truncated by comparing the value returned by confstr() with len.


       If  len  is  0,  confstr()  still  returns the integer value as defined
       below, but does not return the string.


       The confstr() function supports the following values for name,  defined
       in <unistd.h>, for both SPARC and x86:

       _CS_LFS64_CFLAGS

           If _LFS64_LARGEFILE is defined in <unistd.h>, this value is the set
           of initial options to be given to the cc and c89 utilities to build
           an application using the Large File Summit transitional compilation
           environment (see lfcompile64(7)).


       _CS_LFS64_LDFLAGS

           If _LFS64_LARGEFILE is defined in <unistd.h>, this value is the set
           of  final  options to be given to the cc and c89 utilities to build
           an application using the Large File Summit transitional compilation
           environment (see lfcompile64(7)).


       _CS_LFS64_LIBS

           If _LFS64_LARGEFILE is defined in <unistd.h>, this value is the set
           of libraries to be given to the cc and c89 utilities  to  build  an
           application  using  the  Large File Summit transitional compilation
           environment (see lfcompile64(7)).


       _CS_LFS64_LINTFLAGS

           If _LFS64_LARGEFILE is defined in <unistd.h>, this value is the set
           of  options  to  be  given to the lint utility to check application
           source using the Large File Summit transitional  compilation  envi‐
           ronment (see lfcompile64(7)).


       _CS_LFS_CFLAGS

           If  _LFS_LARGEFILE  is defined in <unistd.h>, this value is the set
           of initial options to be given to the cc and c89 utilities to build
           an  application  using the Large File Summit large file compilation
           environment for 32-bit applications (see lfcompile(7)).


       _CS_LFS_LDFLAGS

           If _LFS_LARGEFILE is defined in <unistd.h>, this value is  the  set
           of  final  options to be given to the cc and c89 utilities to build
           an application using the Large File Summit large  file  compilation
           environment for 32-bit applications (see lfcompile(7)).


       _CS_LFS_LIBS

           If  _LFS_LARGEFILE  is defined in <unistd.h>, this value is the set
           of libraries to be given to the cc and c89 utilities  to  build  an
           application  using  the  Large  File  Summit large file compilation
           environment for 32-bit applications (see lfcompile(7)).


       _CS_LFS_LINTFLAGS

           If _LFS_LARGEFILE is defined in <unistd.h>, this value is  the  set
           of  options  to  be  given to the lint utility to check application
           source using the Large File Summit large file compilation  environ‐
           ment for 32-bit applications (see lfcompile(7)).


       _CS_PATH

           If the ISO POSIX.2 standard is supported, this is the value for the
           PATH environment variable that finds all standard utilities. Other‐
           wise the meaning of this value is unspecified.


       _CS_POSIX_V6_ILP32_OFF32_CFLAGS

           If  sysconf(_SC_V6_ILP32_OFF32)  returns  -1,  the  meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with 32-bit int, long, pointer, and off_t
           types.


       _CS_POSIX_V6_ILP32_OFF32_LDFLAGS

           If  sysconf(_SC_V6_ILP32_OFF32)  returns  -1,  the  meaning of this
           value is unspecified. Otherwise, this value is  the  set  of  final
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with 32-bit int, long, pointer, and off_t
           types.


       _CS_POSIX_V6_ILP32_OFF32_LIBS

           If  sysconf(_SC_V6_ILP32_OFF32)  returns  -1,  the  meaning of this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 32-bit int, long, pointer, and off_t types.


       _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS

           If sysconf(_SC_V6_ILP32_OFFBIG) returns -1,  the  meaning  of  this
           value  is  unspecified. Otherwise, this value is the set of initial
           options to be given to the c99  utility  to  build  an  application
           using a programming model with 32-bit int, long, and pointer types,
           and an off_t type using at least 64 bits.


       _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS

           If sysconf(_SC_V6_ILP32_OFFBIG) returns -1,  the  meaning  of  this
           value  is  unspecified.  Otherwise,  this value is the set of final
           options to be given to the c99  utility  to  build  an  application
           using a programming model with 32-bit int, long, and pointer types,
           and an off_t type using at least 64 bits.


       _CS_POSIX_V6_ILP32_OFFBIG_LIBS

           If sysconf(_SC_V6_ILP32_OFFBIG) returns -1,  the  meaning  of  this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the c99 utility to build an application using a pro‐
           gramming  model  with  32-bit  int, long, and pointer types, and an
           off_t type using at least 64 bits.


       _CS_POSIX_V6_LP64_OFF64_CFLAGS

           If sysconf(_SC_V6_LP64_OFF64) returns -1, the meaning of this value
           is unspecified. Otherwise, this value is the set of initial options
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 64-bit int, long, pointer, and off_t types.


       _CS_POSIX_V6_LP64_OFF64_LDFLAGS

           If sysconf(_SC_V6_LP64_OFF64) returns -1, the meaning of this value
           is unspecified. Otherwise, this value is the set of  final  options
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 64-bit int, long, pointer, and off_t types.


       _CS_POSIX_V6_LP64_OFF64_LIBS

           If sysconf(_SC_V6_LP64_OFF64) returns -1, the meaning of this value
           is unspecified. Otherwise, this value is the set of libraries to be
           given to the c99 utility to build an application using  a  program‐
           ming model with 64-bit int, long, pointer, and off_t types.


       _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS

           If  sysconf(_SC_V6_LPBIG_OFFBIG)  returns  -1,  the meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with an int type using at least  32  bits
           and long, pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS

           If  sysconf(_SC_V6_LPBIG_OFFBIG)  returns  -1,  the meaning of this
           value is unspecified. Otherwise, this value is  the  set  of  final
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with an int type using at least  32  bits
           and long, pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V6_LPBIG_OFFBIG_LIBS

           If  sysconf(_SC_V6_LPBIG_OFFBIG)  returns  -1,  the meaning of this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the c99 utility to build an application using a pro‐
           gramming model with an int type using at least 32  bits  and  long,
           pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS

           This  value  is  a <newline>-separated list of names of programming
           environments supported by the implementation in which the widths of
           the  blksize_t,  cc_t,  mode_t,  nfds_t,  pid_t, ptrdiff_t, size_t,
           speed_t, ssize_t, suseconds_t, tcflag_t, useconds_t,  wchar_t,  and
           wint_t types are no greater than the width of type long.


       _CS_XBS5_ILP32_OFF32_CFLAGS

           If  sysconf(_SC_XBS5_ILP32_OFF32)  returns  −1  the meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to be given to the cc and c89 utilities to build an appli‐
           cation using a programming model with 32-bit  int,  long,  pointer,
           and off_t types.


       _CS_XBS5_ILP32_OFF32_LDFLAGS

           If  sysconf(_SC_XBS5_ILP32_OFF32)  returns  −1  the meaning of this
           value is unspecified. Otherwise, this value is  the  set  of  final
           options  to be given to the cc and c89 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

           If  sysconf(_SC_XBS5_ILP32_OFF32)  returns  −1  the meaning of this
           value is unspecified. Otherwise, this value is 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

           If  sysconf(_SC_XBS5_ILP32_OFF32)  returns  −1  the meaning of this
           value is unspecified. Otherwise, this value is 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.


       _CS_XBS5_ILP32_OFFBIG_CFLAGS

           If sysconf(_SC_XBS5_ILP32_OFFBIG) returns −1 the  meaning  of  this
           value  is  unspecified. Otherwise, this value is the set of initial
           options to be given to the cc and c89 utilities to build an  appli‐
           cation using a programming model with 32-bit int, long, and pointer
           types, and an off_t type using at least 64 bits.


       _CS_XBS5_ILP32_OFFBIG_LDFLAGS

           If sysconf(SC_XBS5_ILP32_OFFBIG) returns −1  the  meaning  of  this
           value  is  unspecified.  Otherwise,  this value is the set of final
           options to be given to the cc and c89 utilities to build an  appli‐
           cation using a programming model with 32-bit int, long, and pointer
           types, and an off_t type using at least 64 bits.


       _CS_XBS5_ILP32_OFFBIG_LIBS

           If sysconf(_SC_XBS5_ILP32_OFFBIG) returns −1 the  meaning  of  this
           value is unspecified. Otherwise, this value is 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, and pointer types,
           and an off_t type using at least 64 bits.


       _CS_XBS5_ILP32_OFFBIG_LINTFLAGS

           If sysconf(_SC_XBS5_ILP32_OFFBIG) returns −1 the  meaning  of  this
           value  is  unspecified. Otherwise, this value is the set of options
           to be given to the lint utility to check  an  application  using  a
           programming  model with 32-bit int, long, and pointer types, and an
           off_t type using at least 64 bits.



       The confstr() function supports the following values for name,  defined
       in <unistd.h>, for SPARC only:

       _CS_XBS5_LP64_OFF64_CFLAGS

           If  sysconf(_SC_XBS5_LP64_OFF64)  returns  −1  the  meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to be given to the cc and c89 utilities to build an appli‐
           cation using a programming model with 64-bit  int,  long,  pointer,
           and off_t types.


       _CS_XBS5_LP64_OFF64_LDFLAGS

           If  sysconf(_SC_XBS5_LP64_OFF64)  returns  −1  the  meaning of this
           value is unspecified. Otherwise, this value is  the  set  of  final
           options  to be given to the cc and c89 utilities to build an appli‐
           cation using a programming model with 64-bit  int,  long,  pointer,
           and off_t types.


       _CS_XBS5_LP64_OFF64_LIBS

           If  sysconf(_SC_XBS5_LP64_OFF64)  returns  −1  the  meaning of this
           value is unspecified. Otherwise, this value is the set of libraries
           to  be  given  to  the cc and c89 utilities to build an application
           using a programming model with 64-bit int, long, pointer, and off_t
           types.


       _CS_XBS5_LP64_OFF64_LINTFLAGS

           If  sysconf(_SC_XBS5_LP64_OFF64)  returns  −1  the  meaning of this
           value is unspecified. Otherwise, this value is the set  of  options
           to be given to the lint utility to check application source using a
           programming model with 64-bit int, long, pointer, and off_t types.


       _CS_XBS5_LPBIG_OFFBIG_CFLAGS

           If sysconf(_SC_XBS5_LPBIG_OFFBIG) returns −1 the  meaning  of  this
           value  is  unspecified. Otherwise, this value is the set of initial
           options to be given to the cc and c89 utilities to build an  appli‐
           cation using a programming model with an int type using at least 32
           bits and long, pointer, and off_t types using at least 64 bits.


       _CS_XBS5_LPBIG_OFFBIG_LDFLAGS

           If sysconf(_SC_XBS5_LPBIG_OFFBIG) returns −1 the  meaning  of  this
           value  is  unspecified.  Otherwise,  this value is the set of final
           options to be given to the cc and c89 utilities to build an  appli‐
           cation using a programming model with an int type using at least 32
           bits and long, pointer, and off_t types using at least 64 bits.


       _CS_XBS5_LPBIG_OFFBIG_LIBS

           If sysconf(_SC_XBS5_LPBIG_OFFBIG) returns −1 the  meaning  of  this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the cc and c89 utilities  to  build  an  application
           using  a  programming model with an int type using at least 32 bits
           and long, pointer, and off_t types using at least 64 bits.


       _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS

           If sysconf(_SC_XBS5_LPBIG_OFFBIG) returns −1 the  meaning  of  this
           value  is  unspecified. Otherwise, this value is the set of options
           to be given to the lint utility to check application source using a
           programming model with an int type using at least 32 bits and long,
           pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V7_ILP32_OFF32_CFLAGS

           If sysconf(_SC_V7_ILP32_OFF32) returns  −1,  the  meaning  of  this
           value  is  unspecified. Otherwise, this value is the set of initial
           options to be given to the c99  utility  to  build  an  application
           using a programming model with 32-bit int, long, pointer, and off_t
           types.


       _CS_POSIX_V7_ILP32_OFF32_LDFLAGS

           If sysconf(_SC_V7_ILP32_OFF32) returns  −1,  the  meaning  of  this
           value  is  unspecified.  Otherwise,  this value is the set of final
           options to be given to the c99  utility  to  build  an  application
           using a programming model with 32-bit int, long, pointer, and off_t
           types.


       _CS_POSIX_V7_ILP32_OFF32_LIBS

           If sysconf(_SC_V7_ILP32_OFF32) returns  −1,  the  meaning  of  this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 32-bit int, long, pointer, and off_t types.


       _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS

           If  sysconf(_SC_V7_ILP32_OFFBIG)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with 32-bit int, long, and pointer types,
           and an off_t type using at least 64 bits.


       _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS

           If  sysconf(_SC_V7_ILP32_OFFBIG)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is  the  set  of  final
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with 32-bit int, long, and pointer types,
           and an off_t type using at least 64 bits.


       _CS_POSIX_V7_ILP32_OFFBIG_LIBS

           If  sysconf(_SC_V7_ILP32_OFFBIG)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 32-bit int, long, and  pointer  types,  and  an
           off_t type using at least 64 bits.


       _CS_POSIX_V7_LP64_OFF64_CFLAGS

           If sysconf(_SC_V7_LP64_OFF64) returns −1, the meaning of this value
           is unspecified. Otherwise, this value is the set of initial options
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 32-bit int and 64-bit long, pointer, and  off_t
           types.


       _CS_POSIX_V7_LP64_OFF64_LDFLAGS

           If sysconf(_SC_V7_LP64_OFF64) returns −1, the meaning of this value
           is unspecified. Otherwise, this value is the set of  final  options
           to be given to the c99 utility to build an application using a pro‐
           gramming model with 32-bit int and 64-bit long, pointer, and  off_t
           types.


       _CS_POSIX_V7_LP64_OFF64_LIBS

           If sysconf(_SC_V7_LP64_OFF64) returns −1, the meaning of this value
           is unspecified. Otherwise, this value is the set of libraries to be
           given  to  the c99 utility to build an application using a program‐
           ming model with 32-bit int and  64-bit  long,  pointer,  and  off_t
           types.


       _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS

           If  sysconf(_SC_V7_LPBIG_OFFBIG)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with an int type using at least  32  bits
           and long, pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS

           If  sysconf(_SC_V7_LPBIG_OFFBIG)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is  the  set  of  final
           options  to  be  given  to  the c99 utility to build an application
           using a programming model with an int type using at least  32  bits
           and long, pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V7_LPBIG_OFFBIG_LIBS

           If  sysconf(_SC_V7_LPBIG_OFFBIG)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is the set of libraries
           to be given to the c99 utility to build an application using a pro‐
           gramming model with an int type using at least 32  bits  and  long,
           pointer, and off_t types using at least 64 bits.


       _CS_POSIX_V7_THREADS_CFLAGS

           If  sysconf  (_SC_POSIX_THREADS)  returns  −1,  the meaning of this
           value is unspecified. Otherwise, this value is the set  of  initial
           options  to  be  given  to the c99 utility to build a multithreaded
           application. These flags are in addition to those  associated  with
           any  of  the other_CS_POSIX_V7_*_CFLAGS values used to specify par‐
           ticular type size programming environments.


       _CS_POSIX_V7_THREADS_LDFLAGS

           If sysconf (_SC_POSIX_THREADS) returns  −1,  the  meaning  of  this
           value  is  unspecified.  Otherwise,  this value is the set of final
           options to be given to the c99 utility  to  build  a  multithreaded
           application.  These  flags are in addition to those associated with
           any of the other _CS_POSIX_V7_*_LDFLAGS values used to specify par‐
           ticular type size programming environments.


       _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS

           This  value  is  a <newline>-separated list of names of programming
           environments supported by the implementation in which the widths of
           the  blksize_t,  cc_t,  mode_t,  nfds_t,  pid_t, ptrdiff_t, size_t,
           speed_t, ssize_t, suseconds_t, tcflag_t, wchar_t, and wint_t  types
           are  not  greater  than  the width of type long. The format of each
           name is suitable for use with the getconf  -v option.


       _CS_V7_ENV

           This is the value that provides the environment  variable  informa‐
           tion (other than that provided by _CS_PATH) that is required by the
           implementation to create a conforming environment.


RETURN VALUES
       If name has  a  configuration-defined  value,  the  confstr()  function
       returns the size of buffer that would be needed to hold the entire con‐
       figuration-defined value. If this return value is greater than len, the
       string returned in buf is truncated.


       If  name is invalid, confstr() returns 0 and sets errno to indicate the
       error.


       If name does not have a configuration-defined value, confstr()  returns
       0 and leaves errno unchanged.

ERRORS
       The confstr() function will fail if:

       EINVAL    The value of the name argument is invalid.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMt-Safe _  Stan‐
       dardSee standards(7).


SEE ALSO
       pathconf(2),  sysconf(3C), attributes(7), lfcompile(7), lfcompile64(7),
       standards(7)



Oracle Solaris 11.4               27 Nov 2017                      confstr(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3