[git commit future 1/1] move __getdents[64] prototypes to dirent.h
Peter S. Mazinger
ps.m at gmx.net
Wed Mar 16 19:20:32 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=2e58e3c130687d18988530925d91906b1c144e2a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
include/dirent.h | 7 +++++++
libc/misc/dirent/dirstream.h | 5 -----
libc/sysdeps/linux/common/getdents.c | 5 +----
libc/sysdeps/linux/common/getdents64.c | 3 +--
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/include/dirent.h b/include/dirent.h
index e6d4164..37d528e 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -368,4 +368,11 @@ extern int versionsort64 (__const struct dirent64 **__e1,
__END_DECLS
+#ifdef _LIBC
+extern ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
+# ifdef __UCLIBC_HAS_LFS__
+extern ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
+# endif
+#endif
+
#endif /* dirent.h */
diff --git a/libc/misc/dirent/dirstream.h b/libc/misc/dirent/dirstream.h
index f0857f6..747064a 100644
--- a/libc/misc/dirent/dirstream.h
+++ b/libc/misc/dirent/dirstream.h
@@ -53,9 +53,4 @@ struct __dirstream {
__UCLIBC_MUTEX(dd_lock);
}; /* stream data from opendir() */
-extern ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
-#ifdef __UCLIBC_HAS_LFS__
-extern ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
-#endif
-
#endif /* dirent.h */
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
index 46f7b8e..a122d20 100644
--- a/libc/sysdeps/linux/common/getdents.c
+++ b/libc/sysdeps/linux/common/getdents.c
@@ -42,8 +42,6 @@ struct kernel_dirent
char d_name[256];
};
-ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden;
-
#define __NR___syscall_getdents __NR_getdents
static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count)
@@ -139,7 +137,6 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes)
#elif __WORDSIZE == 32
-extern __typeof(__getdents) __getdents64 attribute_hidden;
ssize_t __getdents (int fd, char *buf, size_t nbytes)
{
struct dirent *dp;
@@ -168,7 +165,7 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes)
#endif
#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
-attribute_hidden strong_alias(__getdents,__getdents64)
+strong_alias(__getdents,__getdents64)
#endif
#endif
diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c
index 30686f2..1e1e170 100644
--- a/libc/sysdeps/linux/common/getdents64.c
+++ b/libc/sysdeps/linux/common/getdents64.c
@@ -36,7 +36,6 @@ struct kernel_dirent64
# define __NR___syscall_getdents64 __NR_getdents64
static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count)
-ssize_t __getdents64 (int fd, char *buf, size_t nbytes) attribute_hidden;
ssize_t __getdents64 (int fd, char *buf, size_t nbytes)
{
struct dirent64 *dp;
@@ -99,7 +98,7 @@ ssize_t __getdents64 (int fd, char *buf, size_t nbytes)
#if __WORDSIZE == 64
/* since getdents doesnt give us d_type but getdents64 does, try and
* use getdents64 as much as possible */
-attribute_hidden strong_alias(__getdents64,__getdents)
+strong_alias(__getdents64,__getdents)
#endif
#endif
--
1.7.3.4
More information about the uClibc-cvs
mailing list