svn commit: trunk/uClibc/libutil

psm at uclibc.org psm at uclibc.org
Mon Nov 21 20:40:17 UTC 2005


Author: psm
Date: 2005-11-21 12:40:14 -0800 (Mon, 21 Nov 2005)
New Revision: 12458

Log:
Use internal hidden versions of __login_tty/__openpty

Modified:
   trunk/uClibc/libutil/forkpty.c
   trunk/uClibc/libutil/login_tty.c
   trunk/uClibc/libutil/openpty.c


Changeset:
Modified: trunk/uClibc/libutil/forkpty.c
===================================================================
--- trunk/uClibc/libutil/forkpty.c	2005-11-21 20:14:49 UTC (rev 12457)
+++ trunk/uClibc/libutil/forkpty.c	2005-11-21 20:40:14 UTC (rev 12458)
@@ -23,12 +23,16 @@
 #include <utmp.h>
 #include <pty.h>
 
+extern int __openpty (int *amaster, int *aslave, char *name, struct termios *termp,
+						struct winsize *winp) attribute_hidden;
+extern int __login_tty(int fd) attribute_hidden;
+
 int forkpty (int *amaster, char *name, 
 	struct termios *termp, struct winsize *winp)
 {
     int master, slave, pid;
 
-    if (openpty (&master, &slave, name, termp, winp) == -1)
+    if (__openpty (&master, &slave, name, termp, winp) == -1)
 	return -1;
 
     switch (pid = fork ())
@@ -38,7 +42,7 @@
 	case 0:
 	    /* Child.  */
 	    close (master);
-	    if (login_tty (slave))
+	    if (__login_tty (slave))
 		_exit (1);
 
 	    return 0;

Modified: trunk/uClibc/libutil/login_tty.c
===================================================================
--- trunk/uClibc/libutil/login_tty.c	2005-11-21 20:14:49 UTC (rev 12457)
+++ trunk/uClibc/libutil/login_tty.c	2005-11-21 20:40:14 UTC (rev 12458)
@@ -36,7 +36,7 @@
 #include <fcntl.h>
 #include <utmp.h>
 
-int login_tty(int fd)
+int attribute_hidden __login_tty(int fd)
 {
 	(void) setsid();
 #ifdef TIOCSCTTY
@@ -67,3 +67,5 @@
 		(void) close(fd);
 	return (0);
 }
+
+strong_alias(__login_tty,login_tty)

Modified: trunk/uClibc/libutil/openpty.c
===================================================================
--- trunk/uClibc/libutil/openpty.c	2005-11-21 20:14:49 UTC (rev 12457)
+++ trunk/uClibc/libutil/openpty.c	2005-11-21 20:40:14 UTC (rev 12458)
@@ -90,8 +90,8 @@
 /* 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
-openpty (int *amaster, int *aslave, char *name, struct termios *termp,
+int attribute_hidden
+__openpty (int *amaster, int *aslave, char *name, struct termios *termp,
 	 struct winsize *winp)
 {
 #if 0
@@ -158,3 +158,5 @@
   close (master);
   return -1;
 }
+
+strong_alias(__openpty,openpty)




More information about the uClibc-cvs mailing list