MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                          confstr(3C)



NAME
     confstr - get configurable variables

SYNOPSIS
     #include 

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


DESCRIPTION
     The confstr() function provides a method for applications to
     get  configuration-defined  string values.  Its use and pur-
     pose 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, confstr() 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  terminating  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 , for both SPARC and x86:

     CSLFS64CFLAGS

         If LFS64LARGEFILE is defined in , 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(5)).


     CSLFS64LDFLAGS

         If LFS64LARGEFILE is defined in , 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



SunOS 5.11          Last change: 15 Dec 2003                    1






Standard C Library Functions                          confstr(3C)



         lfcompile64(5)).


     CSLFS64LIBS

         If LFS64LARGEFILE is defined in , 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 lfcom-
         pile64(5)).


     CSLFS64LINTFLAGS

         If LFS64LARGEFILE is defined in , 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   environment   (see   lfcom-
         pile64(5)).


     CSLFSCFLAGS

         If LFSLARGEFILE is defined in ,  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(5)).


     CSLFSLDFLAGS

         If LFSLARGEFILE is defined in ,  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(5)).


     CSLFSLIBS

         If LFSLARGEFILE is defined in ,  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(5)).


     CSLFSLINTFLAGS

         If LFSLARGEFILE is defined in ,  this  value
         is the set of options to be given to the lint utility to



SunOS 5.11          Last change: 15 Dec 2003                    2






Standard C Library Functions                          confstr(3C)



         check application source using  the  Large  File  Summit
         large  file  compilation environment for 32-bit applica-
         tions (see lfcompile(5)).


     CSPATH

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


     CSPOSIXV6ILP32OF32CFLAGS

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


     CSPOSIXV6ILP32OF32LDFLAGS

         If sysconf(SCV6ILP32OF32) 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 offt types.


     CSPOSIXV6ILP32OF32LIBS

         If sysconf(SCV6ILP32OF32) 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 programming model with 32-
         bit int, long, pointer, and offt types.


     CSPOSIXV6ILP32OFBIGCFLAGS

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


     CSPOSIXV6ILP32OFBIGLDFLAGS




SunOS 5.11          Last change: 15 Dec 2003                    3






Standard C Library Functions                          confstr(3C)



         If sysconf(SCV6ILP32OFBIG) 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  offt  type
         using at least 64 bits.


     CSPOSIXV6ILP32OFBIGLIBS

         If sysconf(SCV6ILP32OFBIG) 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 programming model with 32-
         bit int, long, and pointer  types,  and  an  offt  type
         using at least 64 bits.


     CSPOSIXV6LP64OF64CFLAGS

         If sysconf(SCV6LP64OF64) 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 64-
         bit int, long, pointer, and offt types.


     CSPOSIXV6LP64OF64LDFLAGS

         If sysconf(SCV6LP64OF64) 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 64-
         bit int, long, pointer, and offt types.


     CSPOSIXV6LP64OF64LIBS

         If sysconf(SCV6LP64OF64) 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  programming model with 64-bit
         int, long, pointer, and offt types.


     CSPOSIXV6LPBIGOFBIGCFLAGS

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



SunOS 5.11          Last change: 15 Dec 2003                    4






Standard C Library Functions                          confstr(3C)



         pointer, and offt types using at least 64 bits.


     CSPOSIXV6LPBIGOFBIGLDFLAGS

         If sysconf(SCV6LPBIGOFBIG) 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 offt types using at least 64 bits.


     CSPOSIXV6LPBIGOFBIGLIBS

         If sysconf(SCV6LPBIGOFBIG) 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 programming model with an
         int type using at least 32 bits and long,  pointer,  and
         offt types using at least 64 bits.


     CSPOSIXV6WIDTHRESTRICTEDENVS

         This value is a -separated  list  of  names  of
         programming  environments  supported  by the implementa-
         tion in which the widths of the blksizet, cct, modet,
         nfdst,  pidt,  ptrdifft,  sizet,  speedt,  ssizet,
         susecondst, tcflagt, usecondst, wchart,  and  wintt
         types are no greater than the width of type long.


     CSXBS5ILP32OF32CFLAGS

         If sysconf(SCXBS5ILP32OF32) 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 application using a programming
         model with 32-bit int, long, pointer, and offt types.


     CSXBS5ILP32OF32LDFLAGS

         If sysconf(SCXBS5ILP32OF32) 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 application using a programming
         model with 32-bit int, long, pointer, and offt types.






SunOS 5.11          Last change: 15 Dec 2003                    5






Standard C Library Functions                          confstr(3C)



     CSXBS5ILP32OF32LIBS

         If sysconf(SCXBS5ILP32OF32) 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 util-
         ities  to build an application using a programming model
         with 32-bit int, long, pointer, and offt types.


     CSXBS5ILP32OF32LINTFLAGS

         If sysconf(SCXBS5ILP32OF32) 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 offt types.


     CSXBS5ILP32OFBIGCFLAGS

         If sysconf(SCXBS5ILP32OFBIG) 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 application using a programming
         model with 32-bit int, long, and pointer types,  and  an
         offt type using at least 64 bits.


     CSXBS5ILP32OFBIGLDFLAGS

         If sysconf(SCXBS5ILP32OFBIG) 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 application using a programming
         model with 32-bit int, long, and pointer types,  and  an
         offt type using at least 64 bits.


     CSXBS5ILP32OFBIGLIBS

         If sysconf(SCXBS5ILP32OFBIG) 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 util-
         ities  to build an application using a programming model
         with 32-bit int, long, and pointer types, and  an  offt
         type using at least 64 bits.


     CSXBS5ILP32OFBIGLINTFLAGS

         If sysconf(SCXBS5ILP32OFBIG) returns -1 the meaning
         of  this value is unspecified.  Otherwise, this value is



SunOS 5.11          Last change: 15 Dec 2003                    6






Standard C Library Functions                          confstr(3C)



         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  offt  type
         using at least 64 bits.



     The confstr() function supports  the  following  values  for
     name, defined in , for SPARC only:

     CSXBS5LP64OF64CFLAGS

         If sysconf(SCXBS5LP64OF64) 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 application using a programming
         model with 64-bit int, long, pointer, and offt types.


     CSXBS5LP64OF64LDFLAGS

         If sysconf(SCXBS5LP64OF64) 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 application using a programming
         model with 64-bit int, long, pointer, and offt types.


     CSXBS5LP64OF64LIBS

         If sysconf(SCXBS5LP64OF64) 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 util-
         ities  to build an application using a programming model
         with 64-bit int, long, pointer, and offt types.


     CSXBS5LP64OF64LINTFLAGS

         If sysconf(SCXBS5LP64OF64) 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 offt types.


     CSXBS5LPBIGOFBIGCFLAGS

         If sysconf(SCXBS5LPBIGOFBIG) 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 application using a programming



SunOS 5.11          Last change: 15 Dec 2003                    7






Standard C Library Functions                          confstr(3C)



         model with an int type using at least 32 bits and  long,
         pointer, and offt types using at least 64 bits.


     CSXBS5LPBIGOFBIGLDFLAGS

         If sysconf(SCXBS5LPBIGOFBIG) 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 application using a programming
         model with an int type using at least 32 bits and  long,
         pointer, and offt types using at least 64 bits.


     CSXBS5LPBIGOFBIGLIBS

         If sysconf(SCXBS5LPBIGOFBIG) 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 util-
         ities  to build an application using a programming model
         with an int type  using  at  least  32  bits  and  long,
         pointer, and offt types using at least 64 bits.


     CSXBS5LPBIGOFBIGLINTFLAGS

         If sysconf(SCXBS5LPBIGOFBIG) 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 offt types using at least 64 bits.


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 configuration-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.

ERORS
     The confstr() function will fail if:




SunOS 5.11          Last change: 15 Dec 2003                    8






Standard C Library Functions                          confstr(3C)



     EINVAL    The value of the name argument is invalid.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Standard                    
    
     MT-Level                     Mt-Safe                     
    


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


































SunOS 5.11          Last change: 15 Dec 2003                    9



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™