public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@redhat.com>
To: libc-hacker@sourceware.org
Subject: [PATCH] Clean up PLT use for scandirat
Date: Wed, 10 Aug 2011 12:23:00 -0000	[thread overview]
Message-ID: <m3hb5pv4jn.fsf@hase.home> (raw)

2011-08-10  Andreas Schwab  <schwab@redhat.com>

	* include/dirent.h: Add libc_hidden_proto for scandirat and
	scandirat64.  Don't declare __scandirat64.
	* dirent/scandirat.c: Add libc_hidden_def.
	* dirent/scandirat64.c (SCANDIRAT): Remove underscores.
	* sysdeps/unix/sysv/linux/i386/scandir64.c (SCANDIRAT): Likewise.
---
 dirent/scandirat.c                       |    1 +
 dirent/scandirat64.c                     |    4 +---
 include/dirent.h                         |    7 ++-----
 sysdeps/unix/sysv/linux/i386/scandir64.c |    2 +-
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/dirent/scandirat.c b/dirent/scandirat.c
index e6f5ece..3eda970 100644
--- a/dirent/scandirat.c
+++ b/dirent/scandirat.c
@@ -141,3 +141,4 @@ SCANDIRAT (dfd, dir, namelist, select, cmp)
 
   return c.cnt;
 }
+libc_hidden_def (SCANDIRAT)
diff --git a/dirent/scandirat64.c b/dirent/scandirat64.c
index c4afb90..d41bdd1 100644
--- a/dirent/scandirat64.c
+++ b/dirent/scandirat64.c
@@ -18,11 +18,9 @@
 
 #include <dirent.h>
 
-#define SCANDIRAT __scandirat64
+#define SCANDIRAT scandirat64
 #define READDIR __readdir64
 #define DIRENT_TYPE struct dirent64
 #define SKIP_SCANDIR_CANCEL 1
 
 #include "scandirat.c"
-
-weak_alias (__scandirat64, scandirat64)
diff --git a/include/dirent.h b/include/dirent.h
index 9ed5876..7dbf622 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -27,11 +27,6 @@ extern int __scandir64 (__const char * __dir,
 			int (*__selector) (__const struct dirent64 *),
 			int (*__cmp) (__const struct dirent64 **,
 				      __const struct dirent64 **));
-extern int __scandirat64 (int __dfd, __const char * __dir,
-			  struct dirent64 *** __namelist,
-			  int (*__selector) (__const struct dirent64 *),
-			  int (*__cmp) (__const struct dirent64 **,
-					__const struct dirent64 **));
 extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
      internal_function;
 extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
@@ -47,5 +42,7 @@ extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
 extern void __scandir_cancel_handler (void *arg);
 
 libc_hidden_proto (rewinddir)
+libc_hidden_proto (scandirat)
+libc_hidden_proto (scandirat64)
 
 #endif
diff --git a/sysdeps/unix/sysv/linux/i386/scandir64.c b/sysdeps/unix/sysv/linux/i386/scandir64.c
index dacac0a..ae1970e 100644
--- a/sysdeps/unix/sysv/linux/i386/scandir64.c
+++ b/sysdeps/unix/sysv/linux/i386/scandir64.c
@@ -19,7 +19,7 @@
 #include <dirent.h>
 
 #define SCANDIR __scandir64
-#define SCANDIRAT __scandirat64
+#define SCANDIRAT scandirat64
 #define READDIR __readdir64
 #define DIRENT_TYPE struct dirent64
 #define SKIP_SCANDIR_CANCEL 1
-- 
1.7.6


-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

                 reply	other threads:[~2011-08-10 12:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3hb5pv4jn.fsf@hase.home \
    --to=schwab@redhat.com \
    --cc=libc-hacker@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).