summaryrefslogtreecommitdiff
path: root/libc/termios/tcgetattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/termios/tcgetattr.c')
-rw-r--r--libc/termios/tcgetattr.c20
1 files changed, 12 insertions, 8 deletions
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 <features.h>
#define __USE_GNU
#include <string.h>
@@ -26,18 +24,24 @@
#include <sys/ioctl.h>
#include <sys/types.h>
+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)