From 6f2aa010fb0606d74907077e6004193046cffa08 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Mon, 16 Jan 2006 21:39:33 +0000 Subject: Convert to hidden_def --- libutil/forkpty.c | 6 +++--- libutil/login_tty.c | 6 +++--- libutil/openpty.c | 14 +++++--------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/libutil/forkpty.c b/libutil/forkpty.c index 6843221cd..572c22200 100644 --- a/libutil/forkpty.c +++ b/libutil/forkpty.c @@ -17,15 +17,15 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define openpty __openpty -#define login_tty __login_tty - #include #include #include #include #include +libutil_hidden_proto(openpty) +libutil_hidden_proto(login_tty) + int forkpty (amaster, name, termp, winp) int *amaster; diff --git a/libutil/login_tty.c b/libutil/login_tty.c index 5ae31c52d..3979adcec 100644 --- a/libutil/login_tty.c +++ b/libutil/login_tty.c @@ -36,7 +36,8 @@ #include #include -int attribute_hidden __login_tty(int fd) +libutil_hidden_proto(login_tty) +int login_tty(int fd) { (void) setsid(); #ifdef TIOCSCTTY @@ -67,5 +68,4 @@ int attribute_hidden __login_tty(int fd) (void) close(fd); return (0); } - -strong_alias(__login_tty,login_tty) +libutil_hidden_def(login_tty) diff --git a/libutil/openpty.c b/libutil/openpty.c index ac3e496ed..7c92bfb19 100644 --- a/libutil/openpty.c +++ b/libutil/openpty.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define _GNU_SOURCE #include #include #include @@ -27,11 +28,6 @@ #include #include -extern int getpt (void); -extern int grantpt (int fd); -extern int ptsname_r (int fd, char *buf, size_t buflen); -extern int unlockpt (int fd); - /* BCS: the following function is, IMO, overkill */ #if 0 /* Return the result of ptsname_r in the buffer pointed to by PTS, @@ -90,8 +86,9 @@ pts_name (int fd, char **pts, size_t buf_len) /* Create pseudo tty master slave pair and set terminal attributes according to TERMP and WINP. Return handles for both ends in AMASTER and ASLAVE, and return the name of the slave end in NAME. */ -int attribute_hidden -__openpty (int *amaster, int *aslave, char *name, struct termios *termp, +libutil_hidden_proto(openpty) +int +openpty (int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp) { #if 0 @@ -158,5 +155,4 @@ __openpty (int *amaster, int *aslave, char *name, struct termios *termp, close (master); return -1; } - -strong_alias(__openpty,openpty) +libutil_hidden_def(openpty) -- cgit v1.2.3