about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-16 11:44:36 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-16 11:44:36 +0000
commit50304ef0572fb41ba853262046dc7594f6a15241 (patch)
tree7bd5691f3d9acc632bdfcd61379cef9aeeb5b84b /sysdeps/generic
parente31cac9420203a4e01327eaffe1cc27f15463afb (diff)
downloadglibc-50304ef0572fb41ba853262046dc7594f6a15241.tar.gz
glibc-50304ef0572fb41ba853262046dc7594f6a15241.tar.xz
glibc-50304ef0572fb41ba853262046dc7594f6a15241.zip
Update.
1998-07-16 10:23  Ulrich Drepper  <drepper@cygnus.com>

	* argp/argp-fmtstream.c: Unify names of used global functions.
	* argp/argp-help.c: Likewise.
	* assert/assert-perr.c: Likewise
	* assert/assert.c: Likewise
	* dirent/scandir.c: Likewise
	* dirent/scandir64.c: Likewise
	* dirent/versionsort.c: Likewise
	* dirent/versionsort64.c: Likewise
	* gmon/bb_exit_func.c: Likewise.
	* gmon/gmon.c: Likewise.
	* grp/initgroups.c: Likewise.
	* iconv/gconv_conf.c: Likewise.
	* inet/getnameinfo.c: Likewise.
	* inet/getnetgrent_r.c: Likewise.
	* inet/inet_ntoa.c: Likewise.
	* inet/rcmd.c: Likewise.
	* inet/rexec.c: Likewise.
	* inet/ruserpass.c: Likewise.
	* io/fts.c: Likewise.
	* io/ftw.c: Likewise.
	* io/ftw64.c: Likewise.
	* io/getdirname.c: Likewise.
	* io/getwd.c: Likewise.
	* io/lockf.c: Likewise.
	* libio/iofdopen.c: Likewise.
	* libio/iopopen.c: Likewise.
	* login/utmp_daemon.c: Likewise.
	* malloc/mtrace.c: Likewise.
	* malloc/obstack.c
	* misc/daemon.c: Likewise.
	* misc/efgcvt_r.c: Likewise.
	* misc/err.c: Likewise.
	* misc/error.c: Likewise.
	* misc/fstab.c: Likewise.
	* misc/getpass.c: Likewise.
	* misc/getttyent.c: Likewise.
	* misc/mntent_r.c: Likewise.
	* misc/search.h: Likewise.
	* misc/syslog.c: Likewise.
	* nscd/nscd_getgr_r.c: Likewise.
	* nscd/nscd_getpw_r.c: Likewise.
	* posix/getpgrp.c: Likewise.
	* posix/wordexp.c: Likewise.
	* pwd/fgetpwent_r.c: Likewise.
	* pwd/getpw.c: Likewise.
	* resolv/herror.c: Likewise.
	* resolv/res_init.c: Likewise.
	* shadow/fgetspent_r.c: Likewise.
	* shadow/lckpwdf.c: Likewise.
	* signal/sigrelse.c: Likewise.
	* stdio-common/asprintf.c: Likewise.
	* stdio-common/dprintf.c: Likewise.
	* stdio-common/getw.c: Likewise.
	* stdio-common/putw.c: Likewise.
	* stdio-common/snprintf.c: Likewise.
	* stdio-common/sprintf.c: Likewise.
	* stdio-common/sscanf.c: Likewise.
	* stdlib/lrand48_r.c: Likewise.
	* stdlib/mrand48_r.c: Likewise.
	* string/argz-replace.c: Likewise.
	* string/envz.c: Likewise.
	* sunrpc/auth_des.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/bindrsvprt.c: Likewise.
	* sunrpc/clnt_gen.c: Likewise.
	* sunrpc/clnt_perr.c: Likewise.
	* sunrpc/clnt_simp.c: Likewise.
	* sunrpc/clnt_tcp.c: Likewise.
	* sunrpc/clnt_udp.c: Likewise.
	* sunrpc/get_myaddr.c: Likewise.
	* sunrpc/key_call.c: Likewise.
	* sunrpc/netname.c: Likewise.
	* sunrpc/openchild.c: Likewise.
	* sunrpc/pmap_rmt.c: Likewise.
	* sunrpc/rpc_dtable.c: Likewise.
	* sunrpc/rtime.c: Likewise.
	* sunrpc/svc_run.c: Likewise.
	* sunrpc/svc_simple.c: Likewise.
	* sunrpc/svc_tcp.c: Likewise.
	* sunrpc/svc_udp.c: Likewise.
	* sunrpc/svcauth_des.c: Likewise.
	* sunrpc/xdr_array.c: Likewise.
	* sunrpc/xdr_rec.c: Likewise.
	* sunrpc/xdr_ref.c: Likewise.
	* sunrpc/xdr_stdio.c: Likewise.
	* sysdeps/generic/abort.c: Likewise.
	* sysdeps/generic/dl-sysdep.c: Likewise.
	* sysdeps/generic/fstatfs64.c: Likewise.
	* sysdeps/generic/ftruncate64.c: Likewise.
	* sysdeps/generic/getrlimit64.c: Likewise.
	* sysdeps/generic/glob.c: Likewise.
	* sysdeps/generic/prof-freq.c: Likewise.
	* sysdeps/generic/putenv.c: Likewise.
	* sysdeps/generic/statfs64.c: Likewise.
	* sysdeps/generic/ttyname_r.c: Likewise.
	* sysdeps/generic/utmp_file.c: Likewise.
	* sysdeps/generic/vlimit.c: Likewise.
	* sysdeps/generic/vtimes.c: Likewise.
	* sysdeps/posix/cuserid.c: Likewise.
	* sysdeps/posix/euidaccess.c: Likewise.
	* sysdeps/posix/mkstemp.c: Likewise.
	* sysdeps/posix/mktemp.c: Likewise.
	* sysdeps/posix/pread.c: Likewise.
	* sysdeps/posix/pread64.c: Likewise.
	* sysdeps/posix/profil.c: Likewise.
	* sysdeps/posix/pwrite.c: Likewise.
	* sysdeps/posix/pwrite64.c: Likewise.
	* sysdeps/posix/sigblock.c: Likewise.
	* sysdeps/posix/sigpause.c: Likewise.
	* sysdeps/posix/ttyname.c: Likewise.
	* sysdeps/posix/ttyname_r.c: Likewise.
	* sysdeps/posix/waitid.c: Likewise.
	* sysdeps/unix/getlogin_r.c: Likewise.
	* sysdeps/unix/grantpt.c: Likewise.
	* sysdeps/unix/rewinddir.c: Likewise.
	* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
	* sysdeps/unix/sysv/linux/getpt.c: Likewise.
	* sysdeps/unix/sysv/linux/if_index.c: Likewise.
	* sysdeps/unix/sysv/linux/ptsname.c: Likewise.
	* sysdeps/unix/sysv/linux/sendmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/statvfs.c: Likewise.
	* sysdeps/unix/sysv/linux/ttyname.c: Likewise.
	* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
	* sysdeps/unix/sysv/linux/ulimit.c: Likewise.
	* sysdeps/unix/sysv/linux/unlockpt.c: Likewise.
	* sysvipc/sys/shm.h: Likewise.
	* time/ctime_r.c: Likewise.
	* time/strptime.c: Likewise.
	* wcsmbs/mbrlen.c: Likewise.
	* wcsmbs/wcsdup.c: Likewise.
	* wcsmbs/wcsxfrm.c: Likewise.
	* wctype/wcfuncs.c: Likewise.

	* sysdeps/unix/sysv/linux/i386/socker.S: Change to honor NO_WEAK_ALIAS.
	* sysdeps/unix/sysv/linux/accept.S: Don't generate __ name.
	* sysdeps/unix/sysv/linux/bind.S: Likewise.
	* sysdeps/unix/sysv/linux/getsockname.S: Likewise.
	* sysdeps/unix/sysv/linux/listen.S: Likewise.
	* sysdeps/unix/sysv/linux/recvfrom.S: Likewise.
	* sysdeps/unix/sysv/linux/sendto.S: Likewise.
	* sysdeps/unix/sysv/linux/setsockopt.S: Likewise.

	* grp/fgetgrent_r.c: Use explicit locking of the stream.

	* elf/Makefile (rtld-routines): Add dl-environ.
	* sysdeps/generic/dl-environ.c: New file.

	* libio/Makefile [REENTRANT] (routines): Add iofputs_u.
	* libio/Versions: Add fputs_unlocked.
	* libio/iofputs_u.c: New file.
	* libio/stdio.h: Add prototype for fputs_unlocked.

	* sunrpc/rpc/auth.h: Use __PMT instead of __P in type definitions.
	* sunrpc/rpc/clnt.h: Likewise.
	* sunrpc/rpc/pmap_clnt.h: Likewise.
	* sunrpc/rpc/svc.h: Likewise.
	* sunrpc/rpc/xdr.h: Likewise.

	* sysdeps/i386/memchr.S: Correct for more strict gas.
	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
	* sysdeps/libm-i387/i686/s_fdim.S: Likewise.
	* sysdeps/libm-i387/i686/s_fdimf.S: Likewise.
	* sysdeps/libm-i387/i686/s_fdiml.S: Likewise.

1998-07-15  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* configure.in: Change message for binutils version from
	2.8.1.0.17->2.8.1.0.23.

1998-07-15  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h: Define LOC.
	Patch by John Tobey <jtobey@banta-im.com>.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/abort.c6
-rw-r--r--sysdeps/generic/dl-environ.c69
-rw-r--r--sysdeps/generic/dl-sysdep.c46
-rw-r--r--sysdeps/generic/fstatfs64.c4
-rw-r--r--sysdeps/generic/ftruncate64.c4
-rw-r--r--sysdeps/generic/getrlimit64.c4
-rw-r--r--sysdeps/generic/glob.c7
-rw-r--r--sysdeps/generic/prof-freq.c4
-rw-r--r--sysdeps/generic/putenv.c7
-rw-r--r--sysdeps/generic/statfs64.c4
-rw-r--r--sysdeps/generic/ttyname_r.c6
-rw-r--r--sysdeps/generic/utmp_file.c44
-rw-r--r--sysdeps/generic/vlimit.c4
-rw-r--r--sysdeps/generic/vtimes.c4
14 files changed, 122 insertions, 91 deletions
diff --git a/sysdeps/generic/abort.c b/sysdeps/generic/abort.c
index a38022a1a9..91c504607a 100644
--- a/sysdeps/generic/abort.c
+++ b/sysdeps/generic/abort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -31,6 +31,10 @@
 # define ABORT_INSTRUCTION
 #endif
 
+#ifdef USE_IN_LIBIO
+# define fflush(s) _IO_fflush (s)
+#endif
+
 /* We must avoid to run in circles.  Therefore we remember how far we
    already got.  */
 static int stage;
diff --git a/sysdeps/generic/dl-environ.c b/sysdeps/generic/dl-environ.c
new file mode 100644
index 0000000000..433102757c
--- /dev/null
+++ b/sysdeps/generic/dl-environ.c
@@ -0,0 +1,69 @@
+/*Environment handling for dynamic loader.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <string.h>
+
+
+extern char **_environ;
+
+/* Walk through the environment of the process and return all entries
+   starting with `LD_'.  */
+char *
+internal_function
+_dl_next_ld_env_entry (char ***position)
+{
+  char **current = *position;
+  char *result = NULL;
+
+  if (current == NULL)
+    /* We start over.  */
+    current = _environ;
+
+  while (result == NULL && *current != NULL)
+    {
+      if ((*current)[0] == 'L' && (*current)[1] == 'D' && (*current)[2] == '_')
+	result = *current;
+
+      ++current;
+    }
+
+  /* Save current position for next visit.  */
+  *position = current;
+
+  return result;
+}
+
+void
+unsetenv (const char *name)
+{
+  const size_t len = strlen (name);
+  char **ep;
+
+  for (ep = _environ; *ep != NULL; ++ep)
+    if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+      {
+	/* Found it.  Remove this pointer by moving later ones back.  */
+	char **dp = ep;
+
+	do
+	  dp[0] = dp[1];
+	while (*dp++);
+	/* Continue the loop in case NAME appears again.  */
+      }
+}
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index 6516ba9b1a..15f85550fe 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -252,52 +252,6 @@ _dl_show_auxv (void)
       }
 }
 
-/* Walk through the environment of the process and return all entries
-   starting with `LD_'.  */
-char *
-internal_function
-_dl_next_ld_env_entry (char ***position)
-{
-  char **current = *position;
-  char *result = NULL;
-
-  if (current == NULL)
-    /* We start over.  */
-    current = _environ;
-
-  while (result == NULL && *current != NULL)
-    {
-      if ((*current)[0] == 'L' && (*current)[1] == 'D' && (*current)[2] == '_')
-	result = *current;
-
-      ++current;
-    }
-
-  /* Save current position for next visit.  */
-  *position = current;
-
-  return result;
-}
-
-void
-unsetenv (const char *name)
-{
-  const size_t len = strlen (name);
-  char **ep;
-
-  for (ep = __environ; *ep != NULL; ++ep)
-    if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
-      {
-	/* Found it.  Remove this pointer by moving later ones back.  */
-	char **dp = ep;
-
-	do
-	  dp[0] = dp[1];
-	while (*dp++);
-	/* Continue the loop in case NAME appears again.  */
-      }
-}
-
 
 /* Return an array of useful/necessary hardware capability names.  */
 const struct r_strlenpair *
diff --git a/sysdeps/generic/fstatfs64.c b/sysdeps/generic/fstatfs64.c
index e34af2aa45..5ffdf9cd84 100644
--- a/sysdeps/generic/fstatfs64.c
+++ b/sysdeps/generic/fstatfs64.c
@@ -1,5 +1,5 @@
 /* Return information about the filesystem on which FD resides.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ fstatfs64 (int fd, struct statfs64 *buf)
 {
   struct statfs buf32;
 
-  if (fstatfs (fd, &buf32) < 0)
+  if (__fstatfs (fd, &buf32) < 0)
     return -1;
 
   buf->f_type = buf32.f_type;
diff --git a/sysdeps/generic/ftruncate64.c b/sysdeps/generic/ftruncate64.c
index 40c312c21b..a85293baf6 100644
--- a/sysdeps/generic/ftruncate64.c
+++ b/sysdeps/generic/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -31,5 +31,5 @@ ftruncate64 (fd, length)
       __set_errno (EINVAL);
       return -1;
     }
-  return ftruncate (fd, (off_t) length);
+  return __ftruncate (fd, (off_t) length);
 }
diff --git a/sysdeps/generic/getrlimit64.c b/sysdeps/generic/getrlimit64.c
index 742505f4b5..20b06d2154 100644
--- a/sysdeps/generic/getrlimit64.c
+++ b/sysdeps/generic/getrlimit64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
 {
   struct rlimit rlimits32;
 
-  if (getrlimit (resource, &rlimits32) < 0)
+  if (__getrlimit (resource, &rlimits32) < 0)
     return -1;
 
   if (rlimits32.rlim_cur == RLIM_INFINITY)
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index bc32d99359..70d125c200 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -239,6 +239,13 @@ extern char *alloca ();
 # endif
 #endif
 
+#ifdef _LIBC
+# define sysconf(id) __sysconf (id)
+# define closedir(dir) __closedir (dir)
+# define opendir(name) __opendir (name)
+# define readdir(str) __readdir (str)
+#endif
+
 #if !(defined STDC_HEADERS || defined __GNU_LIBRARY__)
 # undef	size_t
 # define size_t	unsigned int
diff --git a/sysdeps/generic/prof-freq.c b/sysdeps/generic/prof-freq.c
index ff085145b5..2755c1f9a2 100644
--- a/sysdeps/generic/prof-freq.c
+++ b/sysdeps/generic/prof-freq.c
@@ -49,8 +49,8 @@ __profile_frequency (void)
   tim.it_interval.tv_usec = 1;
   tim.it_value.tv_sec = 0;
   tim.it_value.tv_usec = 0;
-  setitimer(ITIMER_REAL, &tim, 0);
-  setitimer(ITIMER_REAL, 0, &tim);
+  __setitimer(ITIMER_REAL, &tim, 0);
+  __setitimer(ITIMER_REAL, 0, &tim);
   if (tim.it_interval.tv_usec < 2)
     return 0;
   return (1000000 / tim.it_interval.tv_usec);
diff --git a/sysdeps/generic/putenv.c b/sysdeps/generic/putenv.c
index d059c2f78c..3fcd5f93a8 100644
--- a/sysdeps/generic/putenv.c
+++ b/sysdeps/generic/putenv.c
@@ -45,9 +45,6 @@
 extern char *alloca ();
 #  endif /* __GNUC__ */
 # endif /* HAVE_ALLOCA_H */
-
-# define setenv __setenv
-# define unsetenv __unsetenv
 #endif /* _LIBC */
 
 
@@ -67,9 +64,9 @@ putenv (string)
       memcpy (name, string, name_end - string);
       name[name_end - string] = '\0';
 #endif
-      return setenv (name, name_end + 1, 1);
+      return __setenv (name, name_end + 1, 1);
     }
 
-  unsetenv (string);
+  __unsetenv (string);
   return 0;
 }
diff --git a/sysdeps/generic/statfs64.c b/sysdeps/generic/statfs64.c
index 050c05d659..01640e3c4e 100644
--- a/sysdeps/generic/statfs64.c
+++ b/sysdeps/generic/statfs64.c
@@ -1,5 +1,5 @@
 /* Return information about the filesystem on which FILE resides.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ statfs64 (const char *file, struct statfs64 *buf)
 {
   struct statfs buf32;
 
-  if (statfs (file, &buf32) < 0)
+  if (__statfs (file, &buf32) < 0)
     return -1;
 
   buf->f_type = buf32.f_type;
diff --git a/sysdeps/generic/ttyname_r.c b/sysdeps/generic/ttyname_r.c
index 6e8a9d6179..2a09b685d1 100644
--- a/sysdeps/generic/ttyname_r.c
+++ b/sysdeps/generic/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
 /* Store at most BUFLEN characters the pathname of the terminal FD is
    open on in BUF.  Return 0 on success,  otherwise an error number.  */
 int
-ttyname_r (fd, buf, buflen)
+__ttyname_r (fd, buf, buflen)
      int fd;
      char *buf;
      size_t buflen;
@@ -31,7 +31,7 @@ ttyname_r (fd, buf, buflen)
   __set_errno (ENOSYS);
   return ENOSYS;
 }
-
+weak_alias (__ttyname_r, ttyname_r)
 
 stub_warning (ttyname_r)
 #include <stub-tag.h>
diff --git a/sysdeps/generic/utmp_file.c b/sysdeps/generic/utmp_file.c
index 1f7abb088b..ddf49467ef 100644
--- a/sysdeps/generic/utmp_file.c
+++ b/sysdeps/generic/utmp_file.c
@@ -59,23 +59,23 @@ static void timeout_handler (int signum) {};
   action.sa_handler = timeout_handler;                                  \
   sigemptyset (&action.sa_mask);                                        \
   action.sa_flags = 0;                                                  \
-  sigaction (SIGALRM, &action, &old_action);                            \
+  __sigaction (SIGALRM, &action, &old_action);                          \
                                                                         \
   alarm (TIMEOUT);                                                      \
                                                                         \
   /* Try to get the lock.  */                                           \
   memset (&fl, '\0', sizeof (struct flock));                            \
-  fl.l_type = (type);                                                 \
+  fl.l_type = (type);                                                   \
   fl.l_whence = SEEK_SET;                                               \
-  fcntl ((fd), F_SETLKW, &fl)
+  __fcntl ((fd), F_SETLKW, &fl)
 
 #define UNLOCK_FILE(fd) \
   /* Unlock the file.  */                                               \
   fl.l_type = F_UNLCK;                                                  \
-  fcntl ((fd), F_SETLKW, &fl);                                          \
+  __fcntl ((fd), F_SETLKW, &fl);                                        \
                                                                         \
   /* Reset the signal handler and alarm.  */                            \
-  sigaction (SIGALRM, &old_action, NULL);                               \
+  __sigaction (SIGALRM, &old_action, NULL);                             \
   alarm (old_timeout);                                                  \
 } while (0)
 
@@ -117,17 +117,17 @@ setutent_file (void)
 
       file_name = TRANSFORM_UTMP_FILE_NAME (__libc_utmp_file_name);
 
-      file_fd = open (file_name, O_RDWR);
+      file_fd = __open (file_name, O_RDWR);
       if (file_fd == -1)
 	{
 	  /* Hhm, read-write access did not work.  Try read-only.  */
-	  file_fd = open (file_name, O_RDONLY);
+	  file_fd = __open (file_name, O_RDONLY);
 	  if (file_fd == -1)
 	    return 0;
 	}
     }
 
-  lseek (file_fd, 0, SEEK_SET);
+  __lseek (file_fd, 0, SEEK_SET);
   file_offset = 0;
 
 #if _HAVE_UT_TYPE - 0
@@ -156,7 +156,7 @@ getutent_r_file (struct utmp *buffer, struct utmp **result)
   LOCK_FILE (file_fd, F_RDLCK);
 
   /* Read the next entry.  */
-  nbytes = read (file_fd, &last_entry, sizeof (struct utmp));
+  nbytes = __read (file_fd, &last_entry, sizeof (struct utmp));
 
   UNLOCK_FILE (file_fd);
 
@@ -221,7 +221,7 @@ internal_getut_r (const struct utmp *id, struct utmp *buffer)
       while (1)
 	{
 	  /* Read the next entry.  */
-	  if (read (file_fd, buffer, sizeof (struct utmp))
+	  if (__read (file_fd, buffer, sizeof (struct utmp))
 	      != sizeof (struct utmp))
 	    {
 	      __set_errno (ESRCH);
@@ -243,7 +243,7 @@ internal_getut_r (const struct utmp *id, struct utmp *buffer)
       while (1)
 	{
 	  /* Read the next entry.  */
-	  if (read (file_fd, buffer, sizeof (struct utmp))
+	  if (__read (file_fd, buffer, sizeof (struct utmp))
 	      != sizeof (struct utmp))
 	    {
 	      __set_errno (ESRCH);
@@ -312,7 +312,7 @@ getutline_r_file (const struct utmp *line, struct utmp *buffer,
   while (1)
     {
       /* Read the next entry.  */
-      if (read (file_fd, &last_entry, sizeof (struct utmp))
+      if (__read (file_fd, &last_entry, sizeof (struct utmp))
 	  != sizeof (struct utmp))
 	{
 	  __set_errno (ESRCH);
@@ -373,13 +373,13 @@ pututline_file (const struct utmp *data)
   if (found < 0)
     {
       /* We append the next entry.  */
-      file_offset = lseek (file_fd, 0, SEEK_END);
+      file_offset = __lseek (file_fd, 0, SEEK_END);
       if (file_offset % sizeof (struct utmp) != 0)
 	{
 	  file_offset -= file_offset % sizeof (struct utmp);
 	  __ftruncate (file_fd, file_offset);
 
-	  if (lseek (file_fd, 0, SEEK_END) < 0)
+	  if (__lseek (file_fd, 0, SEEK_END) < 0)
 	    {
 	      pbuf = NULL;
 	      goto unlock_return;
@@ -390,11 +390,11 @@ pututline_file (const struct utmp *data)
     {
       /* We replace the just read entry.  */
       file_offset -= sizeof (struct utmp);
-      lseek (file_fd, file_offset, SEEK_SET);
+      __lseek (file_fd, file_offset, SEEK_SET);
     }
 
   /* Write the new data.  */
-  if (write (file_fd, data, sizeof (struct utmp)) != sizeof (struct utmp))
+  if (__write (file_fd, data, sizeof (struct utmp)) != sizeof (struct utmp))
     {
       /* If we appended a new record this is only partially written.
 	 Remove it.  */
@@ -420,7 +420,7 @@ endutent_file (void)
 {
   assert (file_fd >= 0);
 
-  close (file_fd);
+  __close (file_fd);
   file_fd = -1;
 }
 
@@ -433,27 +433,27 @@ updwtmp_file (const char *file, const struct utmp *utmp)
   int fd;
 
   /* Open WTMP file.  */
-  fd = open (file, O_WRONLY);
+  fd = __open (file, O_WRONLY);
   if (fd < 0)
     return -1;
 
   LOCK_FILE (fd, F_WRLCK);
 
   /* Remember original size of log file.  */
-  offset = lseek (fd, 0, SEEK_END);
+  offset = __lseek (fd, 0, SEEK_END);
   if (offset % sizeof (struct utmp) != 0)
     {
       offset -= offset % sizeof (struct utmp);
       __ftruncate (fd, offset);
 
-      if (lseek (fd, 0, SEEK_END) < 0)
+      if (__lseek (fd, 0, SEEK_END) < 0)
 	goto unlock_return;
     }
 
   /* Write the entry.  If we can't write all the bytes, reset the file
      size back to the original size.  That way, no partial entries
      will remain.  */
-  if (write (fd, utmp, sizeof (struct utmp)) != sizeof (struct utmp))
+  if (__write (fd, utmp, sizeof (struct utmp)) != sizeof (struct utmp))
     {
       __ftruncate (fd, offset);
       goto unlock_return;
@@ -465,7 +465,7 @@ unlock_return:
   UNLOCK_FILE (fd);
 
   /* Close WTMP file.  */
-  close (fd);
+  __close (fd);
 
   return result;
 }
diff --git a/sysdeps/generic/vlimit.c b/sysdeps/generic/vlimit.c
index 5654be1205..68addbce7a 100644
--- a/sysdeps/generic/vlimit.c
+++ b/sysdeps/generic/vlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@ vlimit (resource, value)
 	(enum __rlimit_resource) ((int) resource - 1);
       struct rlimit lims;
 
-      if (getrlimit (rlimit_res, &lims) < 0)
+      if (__getrlimit (rlimit_res, &lims) < 0)
 	return -1;
 
       lims.rlim_cur = value;
diff --git a/sysdeps/generic/vtimes.c b/sysdeps/generic/vtimes.c
index e448da6de1..0af59ca342 100644
--- a/sysdeps/generic/vtimes.c
+++ b/sysdeps/generic/vtimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ vtimes_one (struct vtimes *vt, enum __rusage_who who)
     {
       struct rusage usage;
 
-      if (getrusage (who, &usage) < 0)
+      if (__getrusage (who, &usage) < 0)
 	return -1;
 
       vt->vm_utime = TIMEVAL_TO_VTIMES (usage.ru_utime);