summaryrefslogtreecommitdiff
path: root/usr/src/lib/libcmd/sparc
diff options
context:
space:
mode:
authorchin <none@none>2007-08-17 12:01:52 -0700
committerchin <none@none>2007-08-17 12:01:52 -0700
commitda2e3ebdc1edfbc5028edf1354e7dd2fa69a7968 (patch)
tree5280d3b78e289fe9551371ab6e7f15ef9944ea14 /usr/src/lib/libcmd/sparc
parent073dbf9103ef2a2b05d8a16e2d26db04e0374b0e (diff)
downloadillumos-gate-da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968.tar.gz
6437624 RFE: Add ksh93 (as /usr/bin/ksh93) and libshell.so to OS/Net
6505835 AST tools and library (libpp) required for creating l10n messages for ksh93 PSARC/2006/550 Korn Shell 93 Integration PSARC/2006/587 /etc/ksh.kshrc for ksh93 PSARC/2007/035 ksh93 Amendments Contributed by Roland Mainz <roland.mainz@nrubsig.org> --HG-- rename : usr/src/lib/libcmd/common/mapfile-vers => deleted_files/usr/src/lib/libcmd/common/mapfile-vers rename : usr/src/lib/libcmd/common/placeholder.c => deleted_files/usr/src/lib/libcmd/common/placeholder.c
Diffstat (limited to 'usr/src/lib/libcmd/sparc')
-rw-r--r--usr/src/lib/libcmd/sparc/include/ast/cmd.h187
-rw-r--r--usr/src/lib/libcmd/sparc/include/ast/cmdext.h69
-rw-r--r--usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids15
-rw-r--r--usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets13
-rw-r--r--usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink8
-rw-r--r--usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname16
6 files changed, 308 insertions, 0 deletions
diff --git a/usr/src/lib/libcmd/sparc/include/ast/cmd.h b/usr/src/lib/libcmd/sparc/include/ast/cmd.h
new file mode 100644
index 0000000000..2484c17c5a
--- /dev/null
+++ b/usr/src/lib/libcmd/sparc/include/ast/cmd.h
@@ -0,0 +1,187 @@
+
+/* : : generated by proto : : */
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1992-2007 AT&T Knowledge Ventures *
+* and is licensed under the *
+* Common Public License, Version 1.0 *
+* by AT&T Knowledge Ventures *
+* *
+* A copy of the License is available at *
+* http://www.opensource.org/licenses/cpl1.0.txt *
+* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* *
+***********************************************************************/
+
+/*
+ * AT&T Research
+ *
+ * builtin cmd definitions
+ */
+
+#ifndef _CMD_H
+#if !defined(__PROTO__)
+#include <prototyped.h>
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _CMD_H
+
+#include <ast.h>
+#include <error.h>
+#include <stak.h>
+
+#define cmdinit _cmd_init
+#define cmdquit() 0
+
+#if _BLD_cmd && defined(__EXPORT__)
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__ __EXPORT__
+#endif
+
+#include <cmdext.h>
+
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__
+
+#if defined(CMD_BUILTIN) && !defined(CMD_STANDALONE)
+#define CMD_STANDALONE CMD_BUILTIN
+#endif
+
+#ifdef CMD_STANDALONE
+
+#if CMD_DYNAMIC
+
+#include <dlldefs.h>
+
+typedef int (*Builtin_f) __PROTO__((int, char**, __V_*));
+
+#else
+
+extern __MANGLE__ int CMD_STANDALONE __PROTO__((int, char**, __V_*));
+
+#endif
+
+#ifndef CMD_BUILTIN
+
+/*
+ * command initialization
+ */
+
+static int
+cmdinit __PARAM__((int argc, register char** argv, __V_* context, const char* catalog, int flags), (argc, argv, context, catalog, flags)) __OTORP__(int argc; register char** argv; __V_* context; const char* catalog; int flags;){
+ register char* cp;
+ register char* pp;
+
+ if (cp = strrchr(argv[0], '/'))
+ cp++;
+ else
+ cp = argv[0];
+ if (pp = strrchr(cp, '_'))
+ cp = pp + 1;
+ error_info.id = cp;
+ if (!error_info.catalog)
+ error_info.catalog = (char*)catalog;
+ opt_info.index = 0;
+ if (context)
+ error_info.flags |= flags;
+ return 0;
+}
+
+#endif
+
+int
+main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
+#if CMD_DYNAMIC
+ register char* s;
+ register char* t;
+ __V_* dll;
+ Builtin_f fun;
+ char buf[64];
+
+ if (s = strrchr(argv[0], '/'))
+ s++;
+ else if (!(s = argv[0]))
+ return 127;
+ if ((t = strrchr(s, '_')) && *++t)
+ s = t;
+ buf[0] = '_';
+ buf[1] = 'b';
+ buf[2] = '_';
+ strncpy(buf + 3, s, sizeof(buf) - 4);
+ buf[sizeof(buf) - 1] = 0;
+ if (t = strchr(buf, '.'))
+ *t = 0;
+ for (;;)
+ {
+ if (dll = dlopen(NiL, RTLD_LAZY))
+ {
+ if (fun = (Builtin_f)dlsym(dll, buf + 1))
+ break;
+ if (fun = (Builtin_f)dlsym(dll, buf))
+ break;
+ }
+ if (dll = dllfind("cmd", NiL, RTLD_LAZY))
+ {
+ if (fun = (Builtin_f)dlsym(dll, buf + 1))
+ break;
+ if (fun = (Builtin_f)dlsym(dll, buf))
+ break;
+ }
+ return 127;
+ }
+ return (*fun)(argc, argv, NiL);
+#else
+ return CMD_STANDALONE(argc, argv, NiL);
+#endif
+}
+
+#else
+
+#undef cmdinit
+#define cmdinit(a,b,c,d,e) do{if(_cmd_init(a,b,c,d,e))return -1;}while(0)
+
+#ifndef CMD_BUILTIN
+
+#undef cmdquit
+#define cmdquit() (_cmd_quit)
+
+#if _BLD_cmd && defined(__EXPORT__)
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__ __EXPORT__
+#endif
+#if !_BLD_cmd && defined(__IMPORT__)
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__ __IMPORT__
+#endif
+
+extern __MANGLE__ int _cmd_quit;
+
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__
+
+#endif
+
+#if _BLD_cmd && defined(__EXPORT__)
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__ __EXPORT__
+#endif
+
+extern __MANGLE__ int _cmd_init __PROTO__((int, char**, __V_*, const char*, int));
+
+#undef __MANGLE__
+#define __MANGLE__ __LINKAGE__
+
+#endif
+
+#endif
diff --git a/usr/src/lib/libcmd/sparc/include/ast/cmdext.h b/usr/src/lib/libcmd/sparc/include/ast/cmdext.h
new file mode 100644
index 0000000000..b5c58b5d04
--- /dev/null
+++ b/usr/src/lib/libcmd/sparc/include/ast/cmdext.h
@@ -0,0 +1,69 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1992-2007 AT&T Knowledge Ventures *
+* and is licensed under the *
+* Common Public License, Version 1.0 *
+* by AT&T Knowledge Ventures *
+* *
+* A copy of the License is available at *
+* http://www.opensource.org/licenses/cpl1.0.txt *
+* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* *
+***********************************************************************/
+
+/* : : generated by proto : : */
+
+#if !defined(__PROTO__)
+#include <prototyped.h>
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+extern __MANGLE__ int b_basename __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_cat __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_chgrp __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_chmod __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_chown __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_cksum __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_cmp __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_comm __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_cp __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_cut __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_date __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_dirname __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_expr __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_fds __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_fmt __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_fold __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_getconf __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_head __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_id __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_join __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_ln __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_logname __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_md5sum __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_mkdir __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_mkfifo __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_mv __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_paste __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_pathchk __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_rev __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_rm __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_rmdir __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_stty __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_sum __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_sync __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_tail __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_tee __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_tty __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_uname __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_uniq __PROTO__((int, char**, __V_*));
+extern __MANGLE__ int b_wc __PROTO__((int, char**, __V_*));
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids
new file mode 100644
index 0000000000..ee06a813a2
--- /dev/null
+++ b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids
@@ -0,0 +1,15 @@
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/src/lib/libcmd/features/ids by iffe version 2007-04-04 : : */
+#ifndef _def_ids_cmd
+#define _def_ids_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_m 1 /* -lm is a library */
+#define _lib_endgrent 1 /* endgrent() in default lib(s) */
+#define _lib_getgrent 1 /* getgrent() in default lib(s) */
+#define _lib_setgrent 1 /* setgrent() in default lib(s) */
+#define _sys_fss 1 /* #include <sys/fss.h> ok */
+#if !_lib_fsid && _mac_fsid
+#define _lib_fsid 1
+#endif
+
+#endif
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets
new file mode 100644
index 0000000000..9fbdd78fe1
--- /dev/null
+++ b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets
@@ -0,0 +1,13 @@
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/src/lib/libcmd/features/sockets by iffe version 2007-04-04 : : */
+#ifndef _def_sockets_cmd
+#define _def_sockets_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_m 1 /* -lm is a library */
+#define _sys_socket 1 /* #include <sys/socket.h> ok */
+#define _hdr_arpa_inet 1 /* #include <arpa/inet.h> ok */
+#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
+#define _lib_getsockname 1 /* getsockname() in default lib(s) */
+#define _lib_getsockopt 1 /* getsockopt() in default lib(s) */
+#define _lib_inet_ntoa 1 /* inet_ntoa() in default lib(s) */
+#endif
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink
new file mode 100644
index 0000000000..c06b9a3e85
--- /dev/null
+++ b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink
@@ -0,0 +1,8 @@
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/src/lib/libcmd/features/symlink by iffe version 2007-04-04 : : */
+#ifndef _def_symlink_cmd
+#define _def_symlink_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_m 1 /* -lm is a library */
+#define _lib_lchown 1 /* lchown implemented */
+#endif
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname
new file mode 100644
index 0000000000..37720b4530
--- /dev/null
+++ b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname
@@ -0,0 +1,16 @@
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/src/lib/libcmd/features/utsname by iffe version 2007-04-04 : : */
+#ifndef _def_utsname_cmd
+#define _def_utsname_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20070418/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_m 1 /* -lm is a library */
+#define _lib_getdomainname 1 /* getdomainname() in default lib(s) */
+#define _lib_gethostid 1 /* gethostid() in default lib(s) */
+#define _lib_gethostname 1 /* gethostname() in default lib(s) */
+#define _lib_sethostname 1 /* sethostname() in default lib(s) */
+#define _lib_syscall 1 /* syscall() in default lib(s) */
+#define _lib_uname 1 /* uname() in default lib(s) */
+#define _sys_utsname 1 /* #include <sys/utsname.h> ok */
+#define _sys_syscall 1 /* #include <sys/syscall.h> ok */
+#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
+#endif