aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-13 22:17:17 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-13 22:17:17 +0000
commit2958e6cc5f39ac2487b4fcbc2db48462a34ce23d (patch)
tree6a55d2abeae2e9ba1b5412c591743fdd733832ab /sysdeps/unix
parentf1a26a85046fa11da2ea51aa6d4edfbfc8549c39 (diff)
downloadglibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.tar
glibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.tar.gz
glibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.tar.bz2
glibc-2958e6cc5f39ac2487b4fcbc2db48462a34ce23d.zip
Update.
* io/ftw.c: Always use readdir64. * io/ftw64.c: Likewise. * sysdeps/unix/sysv/linux/ttyname.c: Likewise. * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. * sysdeps/generic/glob.c: Likewise. Convert results if gl_readdir callback to dirent. Still allow compiling outside glibc. * sysdeps/gnu/glob64.c: Define COMPILE_GLOB64. * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. * malloc/mtrace.c: Use fopen64. * posix/spawni.c: Use __open64. * sysdeps/unix/opendir.c: Likewise. * sysdeps/unix/sysv/linux/gethostid.c: Likewise. * sysdeps/generic/ftruncate64.c: Define __ftruncate64 and make old name a weak alias. * sysdeps/unix/sysv/aix/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise. * resolv/res_data.c: Add cast to avoid warning. * include/unistd.h: Declare __ftruncate64. * sysdeps/generic/utmp_file.c: Use LFS functions and type.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/opendir.c4
-rw-r--r--sysdeps/unix/sysv/aix/ftruncate64.c5
-rw-r--r--sysdeps/unix/sysv/linux/ftruncate64.c5
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c8
-rw-r--r--sysdeps/unix/sysv/linux/i386/glob64.c2
-rw-r--r--sysdeps/unix/sysv/linux/mips/ftruncate64.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/ftruncate64.c5
-rw-r--r--sysdeps/unix/sysv/linux/ttyname.c10
-rw-r--r--sysdeps/unix/sysv/linux/ttyname_r.c10
9 files changed, 30 insertions, 24 deletions
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 927caab70f..4b21e642e8 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,98,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1996,98,2000,2001 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
@@ -110,7 +110,7 @@ __opendir (const char *name)
}
}
- fd = __open (name, O_RDONLY|O_NDELAY|EXTRA_FLAGS);
+ fd = __open64 (name, O_RDONLY|O_NDELAY|EXTRA_FLAGS);
if (__builtin_expect (fd, 0) < 0)
return NULL;
diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c
index 56a5ed58c1..f2c1578a18 100644
--- a/sysdeps/unix/sysv/aix/ftruncate64.c
+++ b/sysdeps/unix/sysv/aix/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 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
@@ -21,7 +21,8 @@
extern int kftruncate (int fd, long long int length);
int
-ftruncate64 (int fd, off64_t length)
+__ftruncate64 (int fd, off64_t length)
{
return kftruncate (fd, length);
}
+weak_alias (__ftruncate64, ftruncate64)
diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c
index f3f99c4ca2..6ff78d7e3d 100644
--- a/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -38,7 +38,7 @@ extern int __syscall_ftruncate64 (int fd, int high_length, int low_length);
/* Truncate the file FD refers to to LENGTH bytes. */
int
-ftruncate64 (int fd, off64_t length)
+__ftruncate64 (int fd, off64_t length)
{
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (! __have_no_truncate64)
@@ -71,6 +71,7 @@ ftruncate64 (int fd, off64_t length)
return __ftruncate (fd, (off_t) length);
#endif
}
+weak_alias (__ftruncate64, ftruncate64)
#else
/* Use the generic implementation. */
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index f19d515abd..f0420f3e22 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
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
@@ -40,7 +40,7 @@ sethostid (id)
}
/* Open file for writing. Everybody is allowed to read this file. */
- fd = __open (HOSTIDFILE, O_CREAT|O_WRONLY|O_TRUNC, 0644);
+ fd = __open64 (HOSTIDFILE, O_CREAT|O_WRONLY|O_TRUNC, 0644);
if (fd < 0)
return -1;
@@ -70,9 +70,9 @@ gethostid ()
int fd;
/* First try to get the ID from a former invocation of sethostid. */
- fd = __open (HOSTIDFILE, O_RDONLY);
+ fd = __open64 (HOSTIDFILE, O_RDONLY);
if (fd < 0)
- fd = __open (OLD_HOSTIDFILE, O_RDONLY);
+ fd = __open64 (OLD_HOSTIDFILE, O_RDONLY);
if (fd >= 0)
{
ssize_t n = __read (fd, &id, sizeof (id));
diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c
index 9f32742034..5d2349d26b 100644
--- a/sysdeps/unix/sysv/linux/i386/glob64.c
+++ b/sysdeps/unix/sysv/linux/i386/glob64.c
@@ -17,6 +17,8 @@
#define NO_GLOB_PATTERN_P 1
+#define COMPILE_GLOB64 1
+
#include <sysdeps/generic/glob.c>
#include "shlib-compat.h"
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index e45afbad7d..bc03e0c550 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001 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 @@ extern int __syscall_ftruncate64 (int fd, int dummy, int high_length,
/* Truncate the file FD refers to to LENGTH bytes. */
int
-ftruncate64 (int fd, off64_t length)
+__ftruncate64 (int fd, off64_t length)
{
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (! __have_no_truncate64)
@@ -72,6 +72,7 @@ ftruncate64 (int fd, off64_t length)
return __ftruncate (fd, (off_t) length);
#endif
}
+weak_alias (__ftruncate64, ftruncate64)
#else
/* Use the generic implementation. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c b/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c
index a39624b2af..bfdbf8b589 100644
--- a/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -36,7 +36,7 @@ extern int __syscall_ftruncate64 (int fd, off64_t length);
/* Truncate the file FD refers to to LENGTH bytes. */
int
-ftruncate64 (fd, length)
+__ftruncate64 (fd, length)
int fd;
off64_t length;
{
@@ -69,6 +69,7 @@ ftruncate64 (fd, length)
return __ftruncate (fd, (off_t) length);
#endif
}
+weak_alias (__ftruncate64, ftruncate64)
#else
/* Use the generic implementation. */
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c
index 9a5009932a..34ef12c205 100644
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,1996-1999,2000,2001 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
@@ -44,7 +44,7 @@ getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
static size_t namelen;
struct stat64 st;
DIR *dirstream;
- struct dirent *d;
+ struct dirent64 *d;
size_t devlen = strlen (dev) + 1;
dirstream = __opendir (dev);
@@ -54,8 +54,8 @@ getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
return NULL;
}
- while ((d = __readdir (dirstream)) != NULL)
- if (((ino_t) d->d_fileno == myino || *dostat)
+ while ((d = __readdir64 (dirstream)) != NULL)
+ if ((d->d_fileno == myino || *dostat)
&& strcmp (d->d_name, "stdin")
&& strcmp (d->d_name, "stdout")
&& strcmp (d->d_name, "stderr"))
@@ -80,7 +80,7 @@ getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
#ifdef _STATBUF_ST_RDEV
&& S_ISCHR (st.st_mode) && st.st_rdev == mydev
#else
- && (ino64_t) d->d_fileno == myino && st.st_dev == mydev
+ && d->d_fileno == myino && st.st_dev == mydev
#endif
)
{
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c
index 87dadc1dd7..4dedcd7e00 100644
--- a/sysdeps/unix/sysv/linux/ttyname_r.c
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,1995-1999,2000,2001 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 @@ getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
{
struct stat64 st;
DIR *dirstream;
- struct dirent *d;
+ struct dirent64 *d;
size_t devlen = strlen (buf);
dirstream = __opendir (buf);
@@ -49,8 +49,8 @@ getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
return errno;
}
- while ((d = __readdir (dirstream)) != NULL)
- if (((ino_t) d->d_fileno == myino || *dostat)
+ while ((d = __readdir64 (dirstream)) != NULL)
+ if ((d->d_fileno == myino || *dostat)
&& strcmp (d->d_name, "stdin")
&& strcmp (d->d_name, "stdout")
&& strcmp (d->d_name, "stderr"))
@@ -73,7 +73,7 @@ getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
#ifdef _STATBUF_ST_RDEV
&& S_ISCHR (st.st_mode) && st.st_rdev == mydev
#else
- && (ino64_t) d->d_fileno == myino && st.st_dev == mydev
+ && d->d_fileno == myino && st.st_dev == mydev
#endif
)
{