2 .\" Copyright 2000 Massachusetts Institute of Technology
4 .\" Permission to use, copy, modify, and distribute this software and
5 .\" its documentation for any purpose and without fee is hereby
6 .\" granted, provided that both the above copyright notice and this
7 .\" permission notice appear in all copies, that both the above
8 .\" copyright notice and this permission notice appear in all
9 .\" supporting documentation, and that the name of M.I.T. not be used
10 .\" in advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission. M.I.T. makes
12 .\" no representations about the suitability of this software for any
13 .\" purpose. It is provided "as is" without express or implied
16 .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
17 .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
18 .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
20 .\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .Dd September 15, 2017
36 .Nd retrieve standard configuration variables
42 .Op Fl v Ar environment
46 .Op Fl v Ar environment
51 utility prints the values of
55 path or system configuration variables to the standard output.
56 If a variable is undefined, the string
60 The first form of the command displays all of the path or system configuration
61 variables to standard output.
65 all path configuration variables are reported for
70 all system configuration variables are reported using
75 The second form of the command, with two mandatory
76 arguments, retrieves file- and file system-specific
77 configuration variables using
79 The third form, with a single argument, retrieves system
80 configuration variables using
84 depending on the type of variable.
85 As an extension, the second form can also be used to query static limits from
92 variables use the same name as the manifest constants defined in
93 the relevant standard C-language bindings, including any leading
106 .Dv _SC_POSIX_VERSION .
107 Variables retrieved from
117 .Ss Programming Environments
122 programming environment under which the values are to be queried.
123 This option currently does nothing, but may in the future be used
124 to select between 32-bit and 64-bit execution environments on platforms
126 Specifying an environment which is not supported on the current execution
127 platform gives undefined results.
129 The standard programming environments are as follows:
130 .Bl -tag -width ".Li POSIX_V6_LPBIG_OFFBIG" -offset indent
131 .It Li POSIX_V6_ILP32_OFF32
132 Exactly 32-bit integer, long, pointer, and file offset.
133 .Sy Supported platforms :
135 .It Li POSIX_V6_ILP32_OFFBIG
136 Exactly 32-bit integer, long, and pointer; at least 64-bit file offset.
137 .Sy Supported platforms :
140 .It Li POSIX_V6_LP64_OFF64
141 Exactly 32-bit integer; exactly 64-bit long, pointer, and file offset.
142 .Sy Supported platforms :
145 .It Li POSIX_V6_LPBIG_OFFBIG
146 At least 32-bit integer; at least 64-bit long, pointer, and file offset.
147 .Sy Supported platforms :
153 .Dl "getconf POSIX_V6_WIDTH_RESTRICTED_ENVS"
155 returns a newline-separated list of environments in which the width
156 of certain fundamental types is no greater than the width of the native
159 At present, all programming environments supported by
164 variables provide information on the necessary compiler and linker flags
165 to use the standard programming environments described above.
173 will display the system default setting for the
175 environment variable.
179 .Dl "getconf NAME_MAX /tmp"
181 will display the maximum length of a filename in the
187 .Dl "getconf -v POSIX_V6_LPBIG_OFFBIG LONG_MAX"
189 will display the maximum value of the C type
192 .Li POSIX_V6_LPBIG_OFFBIG
193 programming environment,
194 if the system supports that environment.
200 which is completely unrecognized is considered an error,
201 causing a diagnostic message to be written to standard error.
203 which is known but merely undefined does not result in an error
207 utility recognizes all of the variables defined for
209 including those which are not currently implemented.
217 utility is expected to be compliant with
222 utility first appeared in
225 .An Garrett A. Wollman Aq Mt wollman@lcs.mit.edu