summaryrefslogtreecommitdiff
path: root/usr/src/lib/libbc/libc/compat
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libbc/libc/compat')
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/ftime.c64
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/getpw.c56
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/nice.c53
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/rand.c41
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/times.c46
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/vlimit.c62
-rw-r--r--usr/src/lib/libbc/libc/compat/4.1/vtimes.c91
-rw-r--r--usr/src/lib/libbc/libc/compat/common/gtty.c40
-rw-r--r--usr/src/lib/libbc/libc/compat/common/lockf.c104
-rw-r--r--usr/src/lib/libbc/libc/compat/common/pause.c38
-rw-r--r--usr/src/lib/libbc/libc/compat/common/stty.c40
-rw-r--r--usr/src/lib/libbc/libc/compat/common/tell.c34
-rw-r--r--usr/src/lib/libbc/libc/compat/common/ulimit.c61
-rw-r--r--usr/src/lib/libbc/libc/compat/common/utime.c62
-rw-r--r--usr/src/lib/libbc/libc/compat/sys5/getpw.c60
-rw-r--r--usr/src/lib/libbc/libc/compat/sys5/mkepoch.c59
-rw-r--r--usr/src/lib/libbc/libc/compat/sys5/nice.c72
-rw-r--r--usr/src/lib/libbc/libc/compat/sys5/rand.c47
-rw-r--r--usr/src/lib/libbc/libc/compat/sys5/times.c45
19 files changed, 0 insertions, 1075 deletions
diff --git a/usr/src/lib/libbc/libc/compat/4.1/ftime.c b/usr/src/lib/libbc/libc/compat/4.1/ftime.c
deleted file mode 100644
index 0d3a625620..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/ftime.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1998 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-/*
- * Backwards compatible ftime.
- */
-/* these two ints are from libc */
-extern int _timezone;
-extern int _daylight;
-
-
-/* from old timeb.h */
-struct timeb {
- time_t time;
- u_short millitm;
- short timezone;
- short dstflag;
-};
-
-int
-ftime(struct timeb *tp)
-{
- struct timeval t;
-
- if (_gettimeofday(&t) < 0)
- return (-1);
-
- _ltzset(t.tv_sec);
-
- tp->time = t.tv_sec;
- tp->millitm = t.tv_usec / 1000;
- tp->timezone = _timezone / 60;
- tp->dstflag = _daylight;
-
- return (0);
-}
diff --git a/usr/src/lib/libbc/libc/compat/4.1/getpw.c b/usr/src/lib/libbc/libc/compat/4.1/getpw.c
deleted file mode 100644
index 27839574b0..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/getpw.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1984 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <pwd.h>
-
-int
-getpw(int uid, char buf[])
-{
- struct passwd *pw;
- char numbuf[20];
-
- pw = getpwuid(uid);
- if(pw == 0)
- return (1);
- strcpy(buf, pw->pw_name);
- strcat(buf, ":");
- strcat(buf, pw->pw_passwd);
- strcat(buf, ":");
- sprintf(numbuf, "%d", pw->pw_uid);
- strcat(buf, numbuf);
- strcat(buf, ":");
- sprintf(numbuf, "%d", pw->pw_gid);
- strcat(buf, numbuf);
- strcat(buf, ":");
- strcat(buf, pw->pw_gecos);
- strcat(buf, ":");
- strcat(buf, pw->pw_dir);
- strcat(buf, ":");
- strcat(buf, pw->pw_shell);
- return (0);
-}
diff --git a/usr/src/lib/libbc/libc/compat/4.1/nice.c b/usr/src/lib/libbc/libc/compat/4.1/nice.c
deleted file mode 100644
index e78077b956..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/nice.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1986 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
- /* from UCB 4.1 83/05/30 */
-
-#include <sys/time.h>
-#include <sys/resource.h>
-
-/*
- * Backwards compatible nice.
- */
-int
-nice(incr)
- int incr;
-{
- int prio;
- extern int errno;
- int serrno;
-
- serrno = errno;
- errno = 0;
- prio = getpriority(PRIO_PROCESS, 0);
- if (prio == -1 && errno)
- return (-1);
- if (setpriority(PRIO_PROCESS, 0, prio + incr) == -1)
- return (-1);
- errno = serrno;
- return (0);
-}
diff --git a/usr/src/lib/libbc/libc/compat/4.1/rand.c b/usr/src/lib/libbc/libc/compat/4.1/rand.c
deleted file mode 100644
index 31f3682f59..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/rand.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1990 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-static long randx = 1;
-
-void
-srand(unsigned x)
-{
- randx = x;
-}
-
-int
-rand(void)
-{
- return ((randx = randx * 1103515245 + 12345) & 0x7fffffff);
-}
diff --git a/usr/src/lib/libbc/libc/compat/4.1/times.c b/usr/src/lib/libbc/libc/compat/4.1/times.c
deleted file mode 100644
index 8d25509ef6..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/times.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <unistd.h>
-
-clock_t
-times(tmsp)
- register struct tms *tmsp;
-{
- int ret;
-
- ret = _times(tmsp);
-
- if (ret == -1)
- return(ret * _sysconf(_SC_CLK_TCK) / 60);
- else
- return(0);
-}
diff --git a/usr/src/lib/libbc/libc/compat/4.1/vlimit.c b/usr/src/lib/libbc/libc/compat/4.1/vlimit.c
deleted file mode 100644
index ef5d90d41a..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/vlimit.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1990 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * (Almost) backwards compatible vlimit.
- */
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <errno.h>
-
-/* LIM_NORAISE is not emulated */
-#define LIM_NORAISE 0 /* if <> 0, can't raise limits */
-#define LIM_CPU 1 /* max secs cpu time */
-#define LIM_FSIZE 2 /* max size of file created */
-#define LIM_DATA 3 /* max growth of data space */
-#define LIM_STACK 4 /* max growth of stack */
-#define LIM_CORE 5 /* max size of ``core'' file */
-#define LIM_MAXRSS 6 /* max desired data+stack core usage */
-
-#define NLIMITS 6
-
-int
-vlimit(int limit, int value)
-{
- struct rlimit rlim;
-
- if (limit <= 0 || limit > NLIMITS)
- return (EINVAL);
- if (value == -1) {
- if (getrlimit(limit - 1, &rlim) < 0)
- return (-1);
- return (rlim.rlim_cur);
- }
- rlim.rlim_cur = value;
- rlim.rlim_max = RLIM_INFINITY;
- return (setrlimit(limit - 1, &rlim));
-}
diff --git a/usr/src/lib/libbc/libc/compat/4.1/vtimes.c b/usr/src/lib/libbc/libc/compat/4.1/vtimes.c
deleted file mode 100644
index 2e497c4620..0000000000
--- a/usr/src/lib/libbc/libc/compat/4.1/vtimes.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1990 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/time.h>
-#include <sys/resource.h>
-
-/*
- * Backwards compatible vtimes.
- */
-struct vtimes {
- int vm_utime; /* user time (60'ths) */
- int vm_stime; /* system time (60'ths) */
- /* divide next two by utime+stime to get averages */
- unsigned vm_idsrss; /* integral of d+s rss */
- unsigned vm_ixrss; /* integral of text rss */
- int vm_maxrss; /* maximum rss */
- int vm_majflt; /* major page faults */
- int vm_minflt; /* minor page faults */
- int vm_nswap; /* number of swaps */
- int vm_inblk; /* block reads */
- int vm_oublk; /* block writes */
-};
-
-static void getvtimes(struct rusage *, struct vtimes *);
-static int scale60(struct timeval *);
-
-int
-vtimes(struct vtimes *par, struct vtimes *chi)
-{
- struct rusage ru;
-
- if (par) {
- if (getrusage(RUSAGE_SELF, &ru) < 0)
- return (-1);
- getvtimes(&ru, par);
- }
- if (chi) {
- if (getrusage(RUSAGE_CHILDREN, &ru) < 0)
- return (-1);
- getvtimes(&ru, chi);
- }
- return (0);
-}
-
-static void
-getvtimes(struct rusage *aru, struct vtimes *avt)
-{
-
- avt->vm_utime = scale60(&aru->ru_utime);
- avt->vm_stime = scale60(&aru->ru_stime);
- avt->vm_idsrss = ((aru->ru_idrss+aru->ru_isrss) / 100) * 60;
- avt->vm_ixrss = aru->ru_ixrss / 100 * 60;
- avt->vm_maxrss = aru->ru_maxrss;
- avt->vm_majflt = aru->ru_majflt;
- avt->vm_minflt = aru->ru_minflt;
- avt->vm_nswap = aru->ru_nswap;
- avt->vm_inblk = aru->ru_inblock;
- avt->vm_oublk = aru->ru_oublock;
-}
-
-static int
-scale60(struct timeval *tvp)
-{
-
- return (tvp->tv_sec * 60 + tvp->tv_usec / 16667);
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/gtty.c b/usr/src/lib/libbc/libc/compat/common/gtty.c
deleted file mode 100644
index 7252a50cf2..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/gtty.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1983 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Writearound to old gtty system call.
- */
-
-#include <sgtty.h>
-
-int
-gtty(int fd, struct sgttyb *ap)
-{
-
- return (ioctl(fd, TIOCGETP, ap));
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/lockf.c b/usr/src/lib/libbc/libc/compat/common/lockf.c
deleted file mode 100644
index b93300c70d..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/lockf.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1989 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/* Copyright (c) 1984 AT&T */
-/* All Rights Reserved */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/syscall.h>
-
-/*
- * convert lockf() into fcntl() for SystemV compatibility
- */
-
-/* New SVR4 values */
-#define SV_GETLK 5
-#define SV_SETLK 6
-#define SV_SETLKW 7
-
-int
-lockf(int fildes, int function, long size)
-{
- struct flock ld;
- int cmd;
-
- cmd = SV_SETLK; /* assume non-blocking operation */
- ld.l_type = F_WRLCK; /* lockf() only deals with exclusive locks */
- ld.l_whence = 1; /* lock always starts at current position */
- if (size < 0) {
- ld.l_start = size;
- ld.l_len = -size;
- } else {
- ld.l_start = 0L;
- ld.l_len = size;
- }
-
- switch (function) {
- case F_TEST:
- if (_syscall(SYS_fcntl, fildes, SV_GETLK, &ld) != -1) {
- if (ld.l_type == F_UNLCK) {
- ld.l_pid = ld.l_xxx;
- /* l_pid is the last field in the
- SVr3 flock structure */
- return (0);
- } else
- errno = EACCES; /* EAGAIN ?? */
- }
- return (-1);
-
- default:
- errno = EINVAL;
- return (-1);
-
- /* the rest fall thru to the fcntl() at the end */
- case F_ULOCK:
- ld.l_type = F_UNLCK;
- break;
-
- case F_LOCK:
- cmd = SV_SETLKW; /* block, if not available */
- break;
-
- case F_TLOCK:
- break;
- }
- if (_syscall(SYS_fcntl, fildes, cmd, &ld) == -1) {
- switch (errno) {
- /* this hack is purported to be for /usr/group compatibility */
- case ENOLCK:
- errno = EDEADLK;
- }
- return(-1);
- } else {
- ld.l_pid = ld.l_xxx; /* l_pid is the last field in the
- SVr3 flock structure */
- return(0);
- }
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/pause.c b/usr/src/lib/libbc/libc/compat/common/pause.c
deleted file mode 100644
index 9a38959550..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/pause.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1983 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Backwards compatible pause.
- */
-int
-pause(void)
-{
-
- sigpause(sigblock(0));
- return (-1);
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/stty.c b/usr/src/lib/libbc/libc/compat/common/stty.c
deleted file mode 100644
index 4cb2e8ebdb..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/stty.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1983 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Writearound to old stty system call.
- */
-
-#include <sgtty.h>
-
-int
-stty(int fd, struct sgttyb *ap)
-{
-
- return(ioctl(fd, TIOCSETP, ap));
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/tell.c b/usr/src/lib/libbc/libc/compat/common/tell.c
deleted file mode 100644
index dbdf3f36e5..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/tell.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
- /* from UCB 4.1 80/12/21 */
-
-/*
- * return offset in file.
- */
-
-long lseek();
-
-long tell(f)
-{
- return(lseek(f, 0L, 1));
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/ulimit.c b/usr/src/lib/libbc/libc/compat/common/ulimit.c
deleted file mode 100644
index 622c292d2a..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/ulimit.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1987 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <errno.h>
-
-long
-ulimit(int cmd, long newlimit)
-{
- struct rlimit rlimit;
-
- switch (cmd) {
-
- case 1:
- if (getrlimit(RLIMIT_FSIZE, &rlimit) < 0)
- return(-1);
- return (rlimit.rlim_cur / 512);
-
- case 2:
- rlimit.rlim_cur = rlimit.rlim_max = newlimit * 512;
- return (setrlimit(RLIMIT_FSIZE, &rlimit));
-
- case 3:
- if (getrlimit(RLIMIT_DATA, &rlimit) < 0)
- return(-1);
- return (rlimit.rlim_cur);
-
- case 4:
- return (getdtablesize());
-
- default:
- errno = EINVAL;
- return (-1);
- }
-}
diff --git a/usr/src/lib/libbc/libc/compat/common/utime.c b/usr/src/lib/libbc/libc/compat/common/utime.c
deleted file mode 100644
index 868dada150..0000000000
--- a/usr/src/lib/libbc/libc/compat/common/utime.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1987 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-/*
- * Backwards compatible utime.
- *
- * The System V system call allows any user with write permission
- * on a file to set the accessed and modified times to the current
- * time; they specify this by passing a null pointer to "utime".
- * This is done to simulate reading one byte from a file and
- * overwriting that byte with itself, which is the technique used
- * by older versions of the "touch" command. The advantage of this
- * hack in the system call is that it works correctly even if the file
- * is zero-length.
- *
- * The BSD system call never allowed a null pointer so there should
- * be no compatibility problem there.
- */
-
-int
-utime(char *name, time_t otv[2])
-{
- struct timeval tv[2];
-
- if (otv == 0) {
- return (utimes(name, (struct timeval *)0));
- } else {
- tv[0].tv_sec = (long)otv[0];
- tv[0].tv_usec = 0;
- tv[1].tv_sec = (long)otv[1];
- tv[1].tv_usec = 0;
- }
- return (utimes(name, tv));
-}
diff --git a/usr/src/lib/libbc/libc/compat/sys5/getpw.c b/usr/src/lib/libbc/libc/compat/sys5/getpw.c
deleted file mode 100644
index 8449707c58..0000000000
--- a/usr/src/lib/libbc/libc/compat/sys5/getpw.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1984 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <pwd.h>
-
-int
-getpw(int uid, char buf[])
-{
- struct passwd *pw;
- char numbuf[20];
-
- pw = getpwuid(uid);
- if(pw == 0)
- return (1);
- strcpy(buf, pw->pw_name);
- strcat(buf, ":");
- strcat(buf, pw->pw_passwd);
- if (*pw->pw_age != '\0') {
- strcat(buf, ",");
- strcat(buf, pw->pw_age);
- }
- strcat(buf, ":");
- sprintf(numbuf, "%d", pw->pw_uid);
- strcat(buf, numbuf);
- strcat(buf, ":");
- sprintf(numbuf, "%d", pw->pw_gid);
- strcat(buf, numbuf);
- strcat(buf, ":");
- strcat(buf, pw->pw_gecos);
- strcat(buf, ":");
- strcat(buf, pw->pw_dir);
- strcat(buf, ":");
- strcat(buf, pw->pw_shell);
- return (0);
-}
diff --git a/usr/src/lib/libbc/libc/compat/sys5/mkepoch.c b/usr/src/lib/libbc/libc/compat/sys5/mkepoch.c
deleted file mode 100644
index 1eacd8bbd9..0000000000
--- a/usr/src/lib/libbc/libc/compat/sys5/mkepoch.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Copyright (c) 1986 Sun Microsystems Inc.
- */
-
-/*
- * Put out a C declaration which initializes "epoch" to the time ("tv_sec"
- * portion) when this program was run.
- */
-
-#include <stdio.h>
-#include <sys/time.h>
-
-int gettimeofday();
-void perror();
-void exit();
-
-/*ARGSUSED*/
-int
-main(argc, argv)
- int argc;
- char **argv;
-{
- struct timeval now;
-
- if (gettimeofday(&now, (struct timezone *)NULL) < 0) {
- perror("mkepoch: gettimeofday failed");
- exit(1);
- }
-
- if (printf("static long epoch = %ld;\n", now.tv_sec) == EOF) {
- perror("mkepoch: can't write output");
- exit(1);
- }
-
- return (0);
-}
diff --git a/usr/src/lib/libbc/libc/compat/sys5/nice.c b/usr/src/lib/libbc/libc/compat/sys5/nice.c
deleted file mode 100644
index 926e79eb10..0000000000
--- a/usr/src/lib/libbc/libc/compat/sys5/nice.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1986 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
- /* from UCB 4.1 83/05/30 */
-
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <errno.h>
-
-/*
- * Backwards compatible nice.
- */
-int
-nice(incr)
- int incr;
-{
- register int prio;
- int serrno;
-
- /* put in brain-damaged upper range checking */
- if ((incr > 40) && (geteuid() != 0)) {
- errno = EPERM;
- return (-1);
- }
-
- serrno = errno;
- errno = 0;
- prio = getpriority(PRIO_PROCESS, 0);
- if (prio == -1 && errno)
- return (-1);
- prio += incr;
- if (prio < -20)
- prio = -20;
- else if (prio > 19)
- prio = 19;
- if (setpriority(PRIO_PROCESS, 0, prio) == -1) {
- /*
- * 4.3BSD stupidly returns EACCES on an attempt by a
- * non-super-user process to lower a priority; map
- * it to EPERM.
- */
- if (errno == EACCES)
- errno = EPERM;
- return (-1);
- }
- errno = serrno;
- return (prio);
-}
diff --git a/usr/src/lib/libbc/libc/compat/sys5/rand.c b/usr/src/lib/libbc/libc/compat/sys5/rand.c
deleted file mode 100644
index 1d9390ce71..0000000000
--- a/usr/src/lib/libbc/libc/compat/sys5/rand.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/* Copyright (c) 1984 AT&T */
-/* All Rights Reserved */
-
-/*
- * Portions of this source code were derived from Berkeley 4.3 BSD
- * under license from the Regents of the University of California.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*LINTLIBRARY*/
-
-static long randx=1;
-
-void
-srand(x)
-unsigned x;
-{
- randx = x;
-}
-
-int
-rand()
-{
- return(((randx = randx * 1103515245L + 12345)>>16) & 0x7fff);
-}
diff --git a/usr/src/lib/libbc/libc/compat/sys5/times.c b/usr/src/lib/libbc/libc/compat/sys5/times.c
deleted file mode 100644
index 94a8ee0aa3..0000000000
--- a/usr/src/lib/libbc/libc/compat/sys5/times.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/times.h>
-
-clock_t
-times(tmsp)
- register struct tms *tmsp;
-{
- int ret;
-
- ret = _times(tmsp);
-
- if (ret == -1)
- return(ret * _sysconf(_SC_CLK_TCK) / 60);
- else
- return(0);
-}