Deleted Added
full compact
getconf.1 (81687) getconf.1 (103591)
1.\"
2.\" Copyright 2000 Massachusetts Institute of Technology
3.\"
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

--- 12 unchanged lines hidden (view full) ---

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
27.\" SUCH DAMAGE.
28.\"
1.\"
2.\" Copyright 2000 Massachusetts Institute of Technology
3.\"
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

--- 12 unchanged lines hidden (view full) ---

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
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD: head/usr.bin/getconf/getconf.1 81687 2001-08-15 09:09:47Z ru $
29.\" $FreeBSD: head/usr.bin/getconf/getconf.1 103591 2002-09-19 03:39:03Z wollman $
30.\"
30.\"
31.Dd April 25, 2000
31.Dd September 18, 2002
32.Dt GETCONF 1
33.Os
34.Sh NAME
35.Nm getconf
36.Nd retrieve standard configuration variables
37.Sh SYNOPSIS
38.Nm
39.Op Fl v Ar environment

--- 20 unchanged lines hidden (view full) ---

60configuration variables using
61.Xr pathconf 2 .
62The second form, with a single argument, retrieves system
63configuration variables using
64.Xr confstr 3
65and
66.Xr sysconf 3 ,
67depending on the type of variable.
32.Dt GETCONF 1
33.Os
34.Sh NAME
35.Nm getconf
36.Nd retrieve standard configuration variables
37.Sh SYNOPSIS
38.Nm
39.Op Fl v Ar environment

--- 20 unchanged lines hidden (view full) ---

60configuration variables using
61.Xr pathconf 2 .
62The second form, with a single argument, retrieves system
63configuration variables using
64.Xr confstr 3
65and
66.Xr sysconf 3 ,
67depending on the type of variable.
68As an extension, the second form can also be used to query static limits from
69.Aq Pa limits.h .
68.Pp
70.Pp
69All variables use the same name as the manifest constants defined in
71All
72.Xr sysconf 3
73and
74.Xr pathconf 2
75variables use the same name as the manifest constants defined in
70the relevant standard C-language bindings, including any leading
71underscore or prefix.
72That is to say,
73.Ar system_var
74might be
75.Dv ARG_MAX
76or
77.Dv _POSIX_VERSION ,
78as opposed to the
79.Xr sysconf 3
80names
81.Dv _SC_ARG_MAX
82or
83.Dv _SC_POSIX_VERSION .
76the relevant standard C-language bindings, including any leading
77underscore or prefix.
78That is to say,
79.Ar system_var
80might be
81.Dv ARG_MAX
82or
83.Dv _POSIX_VERSION ,
84as opposed to the
85.Xr sysconf 3
86names
87.Dv _SC_ARG_MAX
88or
89.Dv _SC_POSIX_VERSION .
84(There is one exception: there is no corresponding manifest constant
85to
86.Dv _CS_PATH ,
87so a
90Variables retrieved from
91.Xr confstr 3
92have the leading
93.Ql _CS_
94stripped off; thus,
95.Dv _CS_PATH
96is queried by a
88.Ar system_var
89of
97.Ar system_var
98of
90.Dq Li PATH
91is used.)
92.Pp
99.Dq Li PATH .
100.Ss Programming Environments
93The
94.Fl v Ar environment
101The
102.Fl v Ar environment
95option is not supported, but provided for compatibility purposes.
103option specifies a
104.St -p1003.1-2001
105programming environment under which the values are to be queried.
106This option currently does nothing, but may in the future be used
107to select between 32-bit and 64-bit execution environments on platforms
108which support both.
109Specifying an environment which is not supported on the current execution
110platform gives undefined results.
111.Pp
112The standard programming environments are as follows:
113.Bl -tag -width ".Li POSIX_V6_LPBIG_OFFBIG" -offset indent
114.It Li POSIX_V6_ILP32_OFF32
115Exactly 32-bit integer, long, pointer, and file offset.
116.Sy Supported platforms :
117None.
118.It Li POSIX_V6_ILP32_OFFBIG
119Exactly 32-bit integer, long, and pointer; at least 64-bit file offset.
120.Sy Supported platforms :
121.Tn IA32 ,
122.Tn PowerPC .
123.It Li POSIX_V6_LP64_OFF64
124Exactly 32-bit integer; exactly 64-bit long, pointer, and file offset.
125.Sy Supported platforms :
126.Tn Alpha ,
127.Tn SPARC64 .
128.It Li POSIX_V6_LPBIG_OFFBIG
129At least 32-bit integer; at least 64-bit long, pointer, and file offset.
130.Sy Supported platforms :
131None.
132.El
133.Pp
134The command:
135.Bd -literal -offset indent
136getconf POSIX_V6_WIDTH_RESTRICTED_ENVS
137.Ed
138.Pp
139returns a newline-separated list of environments in which the width
140of certain fundamental types is no greater than the width of the native
141C type
142.Ql long .
143At present, all programming environments supported by
144.Fx
145have this property.
146Several of the
147.Xr confstr 3
148variables provide information on the necessary compiler and linker flags
149to use the standard programming environments described above.
96.Sh DIAGNOSTICS
97.Ex -std
98Use of a
99.Ar system_var
100or
101.Ar path_var
150.Sh DIAGNOSTICS
151.Ex -std
152Use of a
153.Ar system_var
154or
155.Ar path_var
102which is completely unknown to the system is considered an error,
103causing a diagnostic message to be written to standard error; one
156which is completely unrecognized is considered an error,
157causing a diagnostic message to be written to standard error.
158One
104which is known but merely undefined does not result in an error
105indication.
159which is known but merely undefined does not result in an error
160indication.
106.Pp
107Use of the unsupported
108.Fl v Ar environment
109option will result in a diagnostic message indicating that it is not
110supported.
161The
162.Nm
163command recognizes all of the variables defined for
164.St -p1003.1-2001 ,
165including those which are not currently implemented.
111.Sh EXAMPLES
112The command:
113.Bd -literal -offset indent
114getconf PATH
115.Ed
116.Pp
117will display the system default setting for the
118.Ev PATH
119environment variable.
120.Pp
121The command:
122.Bd -literal -offset indent
123getconf NAME_MAX /tmp
124.Ed
125.Pp
126will display the maximum length of a filename in the
127.Pa /tmp
128directory.
166.Sh EXAMPLES
167The command:
168.Bd -literal -offset indent
169getconf PATH
170.Ed
171.Pp
172will display the system default setting for the
173.Ev PATH
174environment variable.
175.Pp
176The command:
177.Bd -literal -offset indent
178getconf NAME_MAX /tmp
179.Ed
180.Pp
181will display the maximum length of a filename in the
182.Pa /tmp
183directory.
184.Pp
185The command:
186.Bd -literal -offset indent
187getconf -v POSIX_V6_LPBIG_OFFBIG LONG_MAX
188.Ed
189.Pp
190will display the maximum value of the C type
191.Ql long
192in the
193.Li POSIX_V6_LPBIG_OFFBIG
194programming environment,
195if the system supports that environment.
129.Sh SEE ALSO
130.Xr pathconf 2 ,
131.Xr confstr 3 ,
132.Xr sysconf 3
133.Sh STANDARDS
134The
135.Nm
136utility is expected to be compliant with
196.Sh SEE ALSO
197.Xr pathconf 2 ,
198.Xr confstr 3 ,
199.Xr sysconf 3
200.Sh STANDARDS
201The
202.Nm
203utility is expected to be compliant with
137.St -susv2 .
204.St -p1003.1-2001 .
138.Sh HISTORY
139The
140.Nm
141command first appeared in
142.Fx 5.0 .
143.Sh AUTHORS
144.An Garrett A. Wollman Aq wollman@lcs.mit.edu
205.Sh HISTORY
206The
207.Nm
208command first appeared in
209.Fx 5.0 .
210.Sh AUTHORS
211.An Garrett A. Wollman Aq wollman@lcs.mit.edu