aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/Makefile17
-rw-r--r--io/bug-ftw5.c25
-rw-r--r--io/fstat.c12
-rw-r--r--io/fstat64.c9
-rw-r--r--io/fstatat.c9
-rw-r--r--io/fstatat64.c9
-rw-r--r--io/ftw.c28
-rw-r--r--io/lstat.c12
-rw-r--r--io/lstat64.c9
-rw-r--r--io/mknod.c12
-rw-r--r--io/mknodat.c10
-rw-r--r--io/stat.c12
-rw-r--r--io/stat64.c9
13 files changed, 32 insertions, 141 deletions
diff --git a/io/Makefile b/io/Makefile
index 6623551769..18287b201a 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2002,2003,2005,2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1992-2002,2003,2005,2006 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
@@ -66,7 +66,7 @@ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
tst-openat tst-unlinkat tst-fstatat tst-futimesat \
tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \
- tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5
+ tst-mknodat tst-mkfifoat tst-ttyname_r
distribute := ftwtest-sh
@@ -90,19 +90,6 @@ CFLAGS-posix_fallocate64.c = -fexceptions
CFLAGS-test-stat.c = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CFLAGS-test-lfs.c = -D_LARGEFILE64_SOURCE
-ifeq (yes,$(have-protected))
-CFLAGS-stat.c = -DHAVE_DOT_HIDDEN
-CFLAGS-fstat.c = -DHAVE_DOT_HIDDEN
-CFLAGS-lstat.c = -DHAVE_DOT_HIDDEN
-CFLAGS-mknod.c = -DHAVE_DOT_HIDDEN
-CFLAGS-stat64.c = -DHAVE_DOT_HIDDEN
-CFLAGS-fstat64.c = -DHAVE_DOT_HIDDEN
-CFLAGS-lstat64.c = -DHAVE_DOT_HIDDEN
-CFLAGS-fstatat.c = -DHAVE_DOT_HIDDEN
-CFLAGS-fstatat64.c = -DHAVE_DOT_HIDDEN
-CFLAGS-mknodat.c = -DHAVE_DOT_HIDDEN
-endif
-
test-stat2-ARGS = Makefile . $(objpfx)test-stat2
tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp
diff --git a/io/bug-ftw5.c b/io/bug-ftw5.c
deleted file mode 100644
index c1cd81d30e..0000000000
--- a/io/bug-ftw5.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <errno.h>
-#include <ftw.h>
-#include <stdio.h>
-
-static int
-fn (const char *file, const struct stat *sb, int flag, struct FTW *s)
-{
- puts (file);
- return FTW_STOP;
-}
-
-static int
-do_test (void)
-{
- if (nftw ("/", fn, 0, FTW_CHDIR | FTW_ACTIONRETVAL) < 0)
- {
- printf ("nftw / FTW_CHDIR: %m\n");
- return 1;
- }
-
- return 0;
-}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
diff --git a/io/fstat.c b/io/fstat.c
index 0f95c1a6e2..e2f9abd384 100644
--- a/io/fstat.c
+++ b/io/fstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2001, 2006 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
@@ -47,16 +47,10 @@
#undef fstat
#undef __fstat
int
+attribute_hidden
__fstat (int fd, struct stat *buf)
{
return __fxstat (_STAT_VER, fd, buf);
}
-weak_alias (__fstat, fstat)
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tfstat");
-asm (".hidden\t__fstat");
-#endif
+weak_hidden_alias (__fstat, fstat)
diff --git a/io/fstat64.c b/io/fstat64.c
index 79bd967d8f..fe655444b2 100644
--- a/io/fstat64.c
+++ b/io/fstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
@@ -46,13 +46,8 @@
#undef fstat64
int
+attribute_hidden
fstat64 (int fd, struct stat64 *buf)
{
return __fxstat64 (_STAT_VER, fd, buf);
}
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tfstat64");
-#endif
diff --git a/io/fstatat.c b/io/fstatat.c
index 1ac80597a0..abf083c72e 100644
--- a/io/fstatat.c
+++ b/io/fstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 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
@@ -46,13 +46,8 @@
#undef fstatat
int
+attribute_hidden
fstatat (int fd, const char *file, struct stat *buf, int flag)
{
return __fxstatat (_STAT_VER, fd, file, buf, flag);
}
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tfstatat");
-#endif
diff --git a/io/fstatat64.c b/io/fstatat64.c
index a14b42d42e..6fdf709af5 100644
--- a/io/fstatat64.c
+++ b/io/fstatat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 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
@@ -46,13 +46,8 @@
#undef fstatat64
int
+attribute_hidden
fstatat64 (int fd, const char *file, struct stat64 *buf, int flag)
{
return __fxstatat64 (_STAT_VER, fd, file, buf, flag);
}
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tfstatat64");
-#endif
diff --git a/io/ftw.c b/io/ftw.c
index 5495bc7ecc..413871744e 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -1,5 +1,5 @@
/* File tree walker functions.
- Copyright (C) 1996-2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -348,17 +348,8 @@ open_dir_stream (int *dfdp, struct ftw_data *data, struct dir_data *dirp)
}
else
{
- const char *name;
-
- if (data->flags & FTW_CHDIR)
- {
- name = data->dirbuf + data->ftw.base;
- if (name[0] == '\0')
- name = ".";
- }
- else
- name = data->dirbuf;
-
+ const char *name = ((data->flags & FTW_CHDIR)
+ ? data->dirbuf + data->ftw.base: data->dirbuf);
dirp->stream = __opendir (name);
}
@@ -730,16 +721,9 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
/* Get stat info for start directory. */
if (result == 0)
{
- const char *name;
-
- if (data.flags & FTW_CHDIR)
- {
- name = data.dirbuf + data.ftw.base;
- if (name[0] == '\0')
- name = ".";
- }
- else
- name = data.dirbuf;
+ const char *name = ((data.flags & FTW_CHDIR)
+ ? data.dirbuf + data.ftw.base
+ : data.dirbuf);
if (((flags & FTW_PHYS)
? LXSTAT (_STAT_VER, name, &st)
diff --git a/io/lstat.c b/io/lstat.c
index c4d7abe2c2..620e47877a 100644
--- a/io/lstat.c
+++ b/io/lstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
@@ -47,16 +47,10 @@
#undef lstat
#undef __lstat
int
+attribute_hidden
__lstat (const char *file, struct stat *buf)
{
return __lxstat (_STAT_VER, file, buf);
}
-weak_alias (__lstat, lstat)
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tlstat");
-asm (".hidden\t__lstat");
-#endif
+weak_hidden_alias (__lstat, lstat)
diff --git a/io/lstat64.c b/io/lstat64.c
index 8a994e4867..3e4ba2d972 100644
--- a/io/lstat64.c
+++ b/io/lstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
@@ -46,13 +46,8 @@
#undef lstat64
int
+attribute_hidden
lstat64 (const char *file, struct stat64 *buf)
{
return __lxstat64 (_STAT_VER, file, buf);
}
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tlstat64");
-#endif
diff --git a/io/mknod.c b/io/mknod.c
index 7d43593a25..cc5fd26105 100644
--- a/io/mknod.c
+++ b/io/mknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 2001, 2006 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
@@ -47,16 +47,10 @@
all callers. */
int
+attribute_hidden
__mknod (const char *path, mode_t mode, dev_t dev)
{
return __xmknod (_MKNOD_VER, path, mode, &dev);
}
-weak_alias (__mknod, mknod)
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tmknod");
-asm (".hidden\t__mknod");
-#endif
+weak_hidden_alias (__mknod, mknod)
diff --git a/io/mknodat.c b/io/mknodat.c
index ac515b5b48..b02ba695f9 100644
--- a/io/mknodat.c
+++ b/io/mknodat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 2001, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 2001, 2005, 2006 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
@@ -47,14 +47,8 @@
all callers. */
int
+attribute_hidden
mknodat (int fd, const char *path, mode_t mode, dev_t dev)
{
return __xmknodat (_MKNOD_VER, fd, path, mode, &dev);
}
-
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tmknodat");
-#endif
diff --git a/io/stat.c b/io/stat.c
index 6af604957e..6f1c28fc56 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
@@ -46,16 +46,10 @@
#undef stat
int
+attribute_hidden
__stat (const char *file, struct stat *buf)
{
return __xstat (_STAT_VER, file, buf);
}
-weak_alias (__stat, stat)
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tstat");
-asm (".hidden\t__stat");
-#endif
+weak_hidden_alias (__stat, stat)
diff --git a/io/stat64.c b/io/stat64.c
index cadf1e1f1d..14e036a700 100644
--- a/io/stat64.c
+++ b/io/stat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2006 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
@@ -46,13 +46,8 @@
#undef stat64
int
+attribute_hidden
stat64 (const char *file, struct stat64 *buf)
{
return __xstat64 (_STAT_VER, file, buf);
}
-
-/* Hide the symbol so that no definition but the one locally in the
- executable or DSO is used. */
-#ifdef HAVE_DOT_HIDDEN
-asm (".hidden\tstat64");
-#endif