[klibc] [klibc:master] Remove obsolete getpt() function

klibc-bot for H. Peter Anvin hpa at linux.intel.com
Tue Jan 5 18:39:03 PST 2016


Commit-ID:  7671eacc1ad3b8582dce1ec6f1e295c517f514ff
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=7671eacc1ad3b8582dce1ec6f1e295c517f514ff
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 5 Jan 2016 18:01:55 -0800
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 5 Jan 2016 18:01:55 -0800

[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 at linux.intel.com>

---
 usr/include/stdlib.h |  1 -
 usr/klibc/Kbuild     |  2 +-
 usr/klibc/getpt.c    | 16 ----------------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/usr/include/stdlib.h b/usr/include/stdlib.h
index 856c647..c2d6264 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 7d95e87..5521038 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 8d2a536..0000000
--- 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);
-}


More information about the klibc mailing list