From af0172162f7c653cad6a11ed1c1a5459bc154465 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 00:58:03 +0000 Subject: hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed --- libc/termios/tcgetattr.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'libc/termios/tcgetattr.c') diff --git a/libc/termios/tcgetattr.c b/libc/termios/tcgetattr.c index 3fd6d29d6..bc160248d 100644 --- a/libc/termios/tcgetattr.c +++ b/libc/termios/tcgetattr.c @@ -16,8 +16,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define mempcpy __mempcpy - #include #define __USE_GNU #include @@ -26,18 +24,24 @@ #include #include +libc_hidden_proto(ioctl) +libc_hidden_proto(memset) +libc_hidden_proto(memcpy) +libc_hidden_proto(mempcpy) +libc_hidden_proto(tcgetattr) + /* The difference here is that the termios structure used in the kernel is not the same as we use in the libc. Therefore we must translate it here. */ #include "kernel_termios.h" /* Put the state of FD into *TERMIOS_P. */ -int attribute_hidden __tcgetattr (int fd, struct termios *termios_p) +int tcgetattr (int fd, struct termios *termios_p) { struct __kernel_termios k_termios; int retval; - retval = __ioctl (fd, TCGETS, &k_termios); + retval = ioctl (fd, TCGETS, &k_termios); termios_p->c_iflag = k_termios.c_iflag; termios_p->c_oflag = k_termios.c_oflag; @@ -55,18 +59,18 @@ int attribute_hidden __tcgetattr (int fd, struct termios *termios_p) if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0 || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1) { - __memset (mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], + memset (mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], __KERNEL_NCCS * sizeof (cc_t)), _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t)); #if 0 - __memset ( (__memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], + memset ( (memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], __KERNEL_NCCS * sizeof (cc_t)) + (__KERNEL_NCCS * sizeof (cc_t))) , _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t)); #endif } else { size_t cnt; - __memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], + memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0], __KERNEL_NCCS * sizeof (cc_t)); for (cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt) @@ -75,4 +79,4 @@ int attribute_hidden __tcgetattr (int fd, struct termios *termios_p) return retval; } -strong_alias(__tcgetattr,tcgetattr) +libc_hidden_def(tcgetattr) -- cgit v1.2.3