]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libc/gen/check_utility_compat.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libc / gen / check_utility_compat.3
1 .\"
2 .\" Copyright 2002 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
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
14 .\" warranty.
15 .\"
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
27 .\" SUCH DAMAGE.
28 .\"
29 .\" $FreeBSD$
30 .\"
31 .Dd October 27, 2002
32 .Dt CHECK_UTILITY_COMPAT 3
33 .Os
34 .Sh NAME
35 .Nm check_utility_compat
36 .Nd "determine whether a utility should be compatible"
37 .Sh LIBRARY
38 .Lb libc
39 .Sh SYNOPSIS
40 .In unistd.h
41 .Ft int
42 .Fn check_utility_compat "const char *utility"
43 .Sh DESCRIPTION
44 The
45 .Fn check_utility_compat
46 function checks whether
47 .Fa utility
48 should behave in a traditional
49 .Pq Fx 4.7 Ns -compatible
50 manner, or in accordance with
51 .St -p1003.1-2001 .
52 The configuration is given as a comma-separated list of utility names;
53 if the list is present but empty, all supported utilities assume their
54 most compatible mode.
55 The
56 .Fn check_utility_compat
57 function first checks for an environment variable named
58 .Ev _COMPAT_FreeBSD_4 .
59 If that environment variable does not exist, then
60 .Fn check_utility_compat
61 will attempt to read the contents of a symbolic link named
62 .Pa /etc/compat-FreeBSD-4-util .
63 If no configuration is found, compatibility mode is disabled.
64 .Sh RETURN VALUES
65 The
66 .Fn check_utility_compat
67 function returns zero if
68 .Fa utility
69 should implement strict
70 .St -p1003.1-2001
71 behavior, and nonzero otherwise.
72 .Sh FILES
73 .Bl -tag -width ".Pa /etc/compat-FreeBSD-4-util"
74 .It Pa /etc/compat-FreeBSD-4-util
75 If present, a symbolic link whose expansion gives system-wide default settings
76 for the
77 .Fn check_utility_compat
78 function.
79 .El
80 .Sh ERRORS
81 No errors are detected.
82 .Sh HISTORY
83 The
84 .Fn check_utility_compat
85 function first appeared in
86 .Fx 5.0 .
87 .Sh AUTHORS
88 This manual page was written by
89 .An Garrett Wollman Aq wollman@FreeBSD.org .