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 30extern "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. */ 77ASTCMDLIST(basename) 78GNUCMDLIST(basename) 79XPG4CMDLIST(basename) 80ASTCMDLIST(cat) 81BINCMDLIST(cat) 82ASTCMDLIST(chgrp) 83// XPG4CMDLIST(chgrp) 84ASTCMDLIST(chmod) 85ASTCMDLIST(chown) 86// XPG4CMDLIST(chown) 87BINCMDLIST(chown) 88ASTCMDLIST(cksum) 89BINCMDLIST(cksum) 90GNUCMDLIST(cksum) 91ASTCMDLIST(cmp) 92BINCMDLIST(cmp) 93ASTCMDLIST(comm) 94BINCMDLIST(comm) 95GNUCMDLIST(comm) 96ASTCMDLIST(cp) 97// XPG4CMDLIST(cp) 98ASTCMDLIST(cut) 99BINCMDLIST(cut) 100GNUCMDLIST(cut) 101ASTCMDLIST(date) 102// XPG4CMDLIST(date) 103ASTCMDLIST(dirname) 104BINCMDLIST(dirname) 105GNUCMDLIST(dirname) 106ASTCMDLIST(egrep) 107XPG4CMDLIST(egrep) 108ASTCMDLIST(expr) 109GNUCMDLIST(expr) 110XPG6CMDLIST(expr) 111ASTCMDLIST(fds) 112ASTCMDLIST(fgrep) 113XPG4CMDLIST(fgrep) 114ASTCMDLIST(fmt) 115ASTCMDLIST(fold) 116BINCMDLIST(fold) 117GNUCMDLIST(fold) 118ASTCMDLIST(grep) 119XPG4CMDLIST(grep) 120ASTCMDLIST(head) 121BINCMDLIST(head) 122ASTCMDLIST(id) 123XPG4CMDLIST(id) 124ASTCMDLIST(join) 125BINCMDLIST(join) 126GNUCMDLIST(join) 127ASTCMDLIST(ln) 128// XPG4CMDLIST(ln) 129ASTCMDLIST(logname) 130BINCMDLIST(logname) 131GNUCMDLIST(logname) 132ASTCMDLIST(md5sum) 133ASTCMDLIST(mkdir) 134BINCMDLIST(mkdir) 135GNUCMDLIST(mkdir) 136ASTCMDLIST(mkfifo) 137BINCMDLIST(mkfifo) 138GNUCMDLIST(mkfifo) 139ASTCMDLIST(mktemp) 140BINCMDLIST(mktemp) 141GNUCMDLIST(mktemp) 142ASTCMDLIST(mv) 143// XPG4CMDLIST(mv) 144ASTCMDLIST(paste) 145BINCMDLIST(paste) 146GNUCMDLIST(paste) 147ASTCMDLIST(pathchk) 148BINCMDLIST(pathchk) 149GNUCMDLIST(pathchk) 150ASTCMDLIST(readlink) 151ASTCMDLIST(rev) 152BINCMDLIST(rev) 153ASTCMDLIST(rm) 154XPG4CMDLIST(rm) 155ASTCMDLIST(rmdir) 156BINCMDLIST(rmdir) 157GNUCMDLIST(rmdir) 158GNUCMDLIST(sleep) 159ASTCMDLIST(stty) 160// XPG4CMDLIST(stty) 161ASTCMDLIST(sum) 162BINCMDLIST(sum) 163ASTCMDLIST(sync) 164BINCMDLIST(sync) 165GNUCMDLIST(sync) 166SBINCMDLIST(sync) 167SUSRBINCMDLIST(sync) 168ASTCMDLIST(tail) 169BINCMDLIST(tail) 170XPG4CMDLIST(tail) 171ASTCMDLIST(tee) 172BINCMDLIST(tee) 173GNUCMDLIST(tee) 174ASTCMDLIST(tty) 175BINCMDLIST(tty) 176GNUCMDLIST(tty) 177ASTCMDLIST(uname) 178ASTCMDLIST(uniq) 179BINCMDLIST(uniq) 180GNUCMDLIST(uniq) 181ASTCMDLIST(wc) 182BINCMDLIST(wc) 183GNUCMDLIST(wc) 184ASTCMDLIST(xgrep) 185BINCMDLIST(xgrep) 186 187/* Mandatory for ksh93 test suite and AST scripts */ 188BINCMDLIST(getconf) 189 190#ifdef __cplusplus 191} 192#endif 193 194#endif /* !_SOLARIS_KSH_CMDLIST_H */ 195