xref: /titanic_51/usr/src/lib/libshell/common/data/solaris_cmdlist.h (revision 3e14f97f673e8a630f076077de35afdd43dc1587)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
24  */
25 
26 #ifndef _SOLARIS_KSH_CMDLIST_H
27 #define	_SOLARIS_KSH_CMDLIST_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 /*
34  * List builtins for Solaris.
35  * The list here is partially autogenerated and partially hand-picked
36  * based on compatibility with the native Solaris versions of these
37  * tools
38  */
39 
40 /*
41  * Commands which are 100% compatible with native Solaris versions (/bin is
42  * a softlink to ./usr/bin, ksh93 takes care about the lookup)
43  */
44 #define	BINCMDLIST(f)	\
45 	{ "/bin/"	#f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
46 #define	USRBINCMDLIST(f)	\
47 	{ "/usr/bin/"	#f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
48 #define	SBINCMDLIST(f)	\
49 	{ "/sbin/"	#f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
50 #define	SUSRBINCMDLIST(f)	\
51 	{ "/usr/sbin/"	#f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
52 /* POSIX compatible commands */
53 #define	XPG6CMDLIST(f)	\
54 	{ "/usr/xpg6/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
55 #define	XPG4CMDLIST(f)	\
56 	{ "/usr/xpg4/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
57 #ifdef SHOPT_USR_GNU_BIN_BUILTINS
58 /* GNU coreutils compatible commands */
59 #define	GNUCMDLIST(f)	\
60 	{ "/usr/gnu/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
61 #else
62 #define	GNUCMDLIST(f)
63 #endif
64 /*
65  * Make all ksh93 builtins accessible when /usr/ast/bin was added to
66  * /usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/bin:/opt/SUNWspro/bin
67  */
68 #define	ASTCMDLIST(f)	\
69 	{ "/usr/ast/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
70 
71 /* undo ast_map.h #defines to avoid collision */
72 #undef basename
73 #undef dirname
74 #undef mktemp
75 
76 /* Generated data, do not edit. */
77 ASTCMDLIST(basename)
78 GNUCMDLIST(basename)
79 XPG4CMDLIST(basename)
80 ASTCMDLIST(cat)
81 BINCMDLIST(cat)
82 ASTCMDLIST(chgrp)
83 // XPG4CMDLIST(chgrp)
84 ASTCMDLIST(chmod)
85 ASTCMDLIST(chown)
86 // XPG4CMDLIST(chown)
87 BINCMDLIST(chown)
88 ASTCMDLIST(cksum)
89 BINCMDLIST(cksum)
90 GNUCMDLIST(cksum)
91 ASTCMDLIST(cmp)
92 BINCMDLIST(cmp)
93 ASTCMDLIST(comm)
94 BINCMDLIST(comm)
95 GNUCMDLIST(comm)
96 ASTCMDLIST(cp)
97 // XPG4CMDLIST(cp)
98 ASTCMDLIST(cut)
99 BINCMDLIST(cut)
100 GNUCMDLIST(cut)
101 ASTCMDLIST(date)
102 // XPG4CMDLIST(date)
103 ASTCMDLIST(dirname)
104 BINCMDLIST(dirname)
105 GNUCMDLIST(dirname)
106 ASTCMDLIST(egrep)
107 XPG4CMDLIST(egrep)
108 ASTCMDLIST(expr)
109 GNUCMDLIST(expr)
110 XPG6CMDLIST(expr)
111 ASTCMDLIST(fds)
112 ASTCMDLIST(fgrep)
113 XPG4CMDLIST(fgrep)
114 ASTCMDLIST(fmt)
115 ASTCMDLIST(fold)
116 BINCMDLIST(fold)
117 GNUCMDLIST(fold)
118 ASTCMDLIST(grep)
119 XPG4CMDLIST(grep)
120 ASTCMDLIST(head)
121 BINCMDLIST(head)
122 ASTCMDLIST(id)
123 XPG4CMDLIST(id)
124 ASTCMDLIST(join)
125 BINCMDLIST(join)
126 GNUCMDLIST(join)
127 ASTCMDLIST(ln)
128 // XPG4CMDLIST(ln)
129 ASTCMDLIST(logname)
130 BINCMDLIST(logname)
131 GNUCMDLIST(logname)
132 ASTCMDLIST(md5sum)
133 ASTCMDLIST(mkdir)
134 BINCMDLIST(mkdir)
135 GNUCMDLIST(mkdir)
136 ASTCMDLIST(mkfifo)
137 BINCMDLIST(mkfifo)
138 GNUCMDLIST(mkfifo)
139 ASTCMDLIST(mktemp)
140 BINCMDLIST(mktemp)
141 GNUCMDLIST(mktemp)
142 ASTCMDLIST(mv)
143 // XPG4CMDLIST(mv)
144 ASTCMDLIST(paste)
145 BINCMDLIST(paste)
146 GNUCMDLIST(paste)
147 ASTCMDLIST(pathchk)
148 BINCMDLIST(pathchk)
149 GNUCMDLIST(pathchk)
150 ASTCMDLIST(readlink)
151 ASTCMDLIST(rev)
152 BINCMDLIST(rev)
153 ASTCMDLIST(rm)
154 XPG4CMDLIST(rm)
155 ASTCMDLIST(rmdir)
156 BINCMDLIST(rmdir)
157 GNUCMDLIST(rmdir)
158 GNUCMDLIST(sleep)
159 ASTCMDLIST(stty)
160 // XPG4CMDLIST(stty)
161 ASTCMDLIST(sum)
162 BINCMDLIST(sum)
163 ASTCMDLIST(sync)
164 BINCMDLIST(sync)
165 GNUCMDLIST(sync)
166 SBINCMDLIST(sync)
167 SUSRBINCMDLIST(sync)
168 ASTCMDLIST(tail)
169 BINCMDLIST(tail)
170 XPG4CMDLIST(tail)
171 ASTCMDLIST(tee)
172 BINCMDLIST(tee)
173 GNUCMDLIST(tee)
174 ASTCMDLIST(tty)
175 BINCMDLIST(tty)
176 GNUCMDLIST(tty)
177 ASTCMDLIST(uname)
178 ASTCMDLIST(uniq)
179 BINCMDLIST(uniq)
180 GNUCMDLIST(uniq)
181 ASTCMDLIST(wc)
182 BINCMDLIST(wc)
183 GNUCMDLIST(wc)
184 ASTCMDLIST(xgrep)
185 BINCMDLIST(xgrep)
186 
187 /* Mandatory for ksh93 test suite and AST scripts */
188 BINCMDLIST(getconf)
189 
190 #ifdef	__cplusplus
191 }
192 #endif
193 
194 #endif /* !_SOLARIS_KSH_CMDLIST_H */
195