aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2016-01-05 18:01:55 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2016-01-05 18:01:55 -0800
commit7671eacc1ad3b8582dce1ec6f1e295c517f514ff (patch)
tree9a78230f97704ff9927183c2a3e4e0d5404c06c9
parent0016a343f734cfe002dd45ab97a67b857ffe2e6d (diff)
downloadklibc-7671eacc1ad3b8582dce1ec6f1e295c517f514ff.tar.gz
[klibc] Remove obsolete getpt() function
getpt() has long since been obsolete; instead use posix_openpt(O_RDWR|O_NOCTTY). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--usr/include/stdlib.h1
-rw-r--r--usr/klibc/Kbuild2
-rw-r--r--usr/klibc/getpt.c16
3 files changed, 1 insertions, 18 deletions
diff --git a/usr/include/stdlib.h b/usr/include/stdlib.h
index 856c64721976e..c2d62640f6b95 100644
--- a/usr/include/stdlib.h
+++ b/usr/include/stdlib.h
@@ -83,7 +83,6 @@ static __inline__ void srandom(unsigned int __s)
__extern int unlockpt(int);
__extern char *ptsname(int);
-__extern int getpt(void);
__extern int posix_openpt(int);
static __inline__ int grantpt(int __fd)
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 7d95e8755286c..55210382637db 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -52,7 +52,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \
getenv.o setenv.o putenv.o __put_env.o unsetenv.o \
clearenv.o nullenv.o \
getopt.o getopt_long.o readdir.o scandir.o alphasort.o remove.o \
- syslog.o closelog.o pty.o getpt.o posix_openpt.o isatty.o reboot.o \
+ syslog.o closelog.o pty.o posix_openpt.o isatty.o reboot.o \
time.o utime.o lseek.o nice.o getpriority.o \
qsort.o bsearch.o \
lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \
diff --git a/usr/klibc/getpt.c b/usr/klibc/getpt.c
deleted file mode 100644
index 8d2a5364bb654..0000000000000
--- a/usr/klibc/getpt.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * getpt.c
- *
- * GNU extension to the standard Unix98 pty suite
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <termios.h>
-#include <fcntl.h>
-
-int getpt(void)
-{
- return open("/dev/ptmx", O_RDWR | O_NOCTTY);
-}