about summary refs log tree commit diff
path: root/dirent
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-21 22:58:23 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-21 22:58:23 +0000
commit01cad722667c7b25535b2d248598f3d535e7caa9 (patch)
tree606a2436a10d7d48fcbb3e1097500d8a0b8144d1 /dirent
parent28f1c862ddaa3515d0f74102379301048c76cf0f (diff)
downloadglibc-01cad722667c7b25535b2d248598f3d535e7caa9.tar.gz
glibc-01cad722667c7b25535b2d248598f3d535e7caa9.tar.xz
glibc-01cad722667c7b25535b2d248598f3d535e7caa9.zip
Update.
1998-04-21 21:49  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* misc/sys/cdefs.h: New macro __REDIRECT to support changing the
	asm symbol name of functions.
	* include/features.h: Kill redundant test.

	* dirent/dirent.h: Use new macros to implement __USE_FILE_OFFSET64.
	* io/ftw.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statfs.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* libio/stdio.h: Likewise.
	* resource/sys/resource.h: Likewise.
	* rt/aio.h: Likewise.

	* posix/unistd.h: Use new macros for __USE_FILE_OFFSET64 and
	 __FAVOR_BSD.
	* signal/signal.h: Use new macros for BSD vs. SysV signal().

	* misc/Makefile: Drop bsd-compat.c.  Make libbsd-compat.a
	a dummy library.
	* misc/bsd-compat.c: Removed.
Diffstat (limited to 'dirent')
-rw-r--r--dirent/dirent.h54
1 files changed, 39 insertions, 15 deletions
diff --git a/dirent/dirent.h b/dirent/dirent.h
index 07d543b6e2..1ac68fa611 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -128,14 +128,18 @@ extern int closedir __P ((DIR *__dirp));
    If the Large File Support API is selected we have to use the
    appropriate interface.  */
 extern struct dirent *__readdir __P ((DIR *__dirp));
+extern struct dirent64 *__readdir64 __P ((DIR *__dirp));
 #ifndef __USE_FILE_OFFSET64
 extern struct dirent *readdir __P ((DIR *__dirp));
 #else
-extern struct dirent *readdir __P ((DIR *__dirp)) __asm__ ("readdir64");
+# ifdef __REDIRECT
+extern struct dirent *__REDIRECT (readdir, __P ((DIR *__dirp)), readdir64);
+# else
+#  define readdir readdir64
+# endif
 #endif
 
 #ifdef __USE_LARGEFILE64
-extern struct dirent64 *__readdir64 __P ((DIR *__dirp));
 extern struct dirent64 *readdir64 __P ((DIR *__dirp));
 #endif
 
@@ -148,9 +152,13 @@ extern int __readdir_r __P ((DIR *__dirp, struct dirent *__entry,
 extern int readdir_r __P ((DIR *__dirp, struct dirent *__entry,
 			   struct dirent **__result));
 # else
-extern int readdir_r __P ((DIR *__dirp, struct dirent *__entry,
-			   struct dirent **__result))
-     __asm__ ("readdir64_r");
+#  ifdef __REDIRECT
+extern int __REDIRECT (readdir_r, __P ((DIR *__dirp, struct dirent *__entry,
+				    struct dirent **__result)),
+		    readdir64_r);
+#  else
+#   define readdir_r readdir64_r
+#  endif
 # endif
 
 # ifdef __USE_LARGEFILE64
@@ -205,26 +213,37 @@ extern int scandir __P ((__const char *__dir, struct dirent ***__namelist,
 			 int (*__selector) (__const struct dirent *),
 			 int (*__cmp) (__const __ptr_t, __const __ptr_t)));
 # else
-extern int scandir __P ((__const char *__dir, struct dirent ***__namelist,
-			 int (*__selector) (__const struct dirent *),
-			 int (*__cmp) (__const __ptr_t, __const __ptr_t)))
-     __asm__ ("scandir64");
+#  ifdef __REDIRECT
+extern int __REDIRECT (scandir,
+		       __P ((__const char *__dir,
+			     struct dirent ***__namelist,
+			     int (*__selector) (__const struct dirent *),
+			     int (*__cmp) (__const __ptr_t, __const __ptr_t))),
+		       scandir64);
+#  else
+#   define scandir scandir64
+#  endif
 # endif
 
 # if defined __USE_GNU && defined __USE_LARGEFILE64
 /* This function is like `scandir' but it uses the 64bit dirent structure.
    Please note that the CMP function must now work with struct dirent64 **.  */
 extern int scandir64 __P ((__const char *__dir, struct dirent64 ***__namelist,
-			 int (*__selector) (__const struct dirent64 *),
-			 int (*__cmp) (__const __ptr_t, __const __ptr_t)));
+			   int (*__selector) (__const struct dirent64 *),
+			   int (*__cmp) (__const __ptr_t, __const __ptr_t)));
 # endif
 
 /* Function to compare two `struct dirent's alphabetically.  */
 # ifndef __USE_FILE_OFFSET64
 extern int alphasort __P ((__const __ptr_t __e1, __const __ptr_t __e2));
 # else
-extern int alphasort __P ((__const __ptr_t __e1, __const __ptr_t __e2))
-     __asm__ ("alphasort64");
+#  ifdef __REDIRECT
+extern int __REDIRECT (alphasort,
+		       __P ((__const __ptr_t __e1, __const __ptr_t __e2)),
+		       alphasort64);
+#  else
+#   define alphasort alphasort64
+#  endif
 # endif
 
 # if defined __USE_GNU && defined __USE_LARGEFILE64
@@ -236,8 +255,13 @@ extern int alphasort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2));
 #  ifndef __USE_FILE_OFFSET64
 extern int versionsort __P ((__const __ptr_t __e1, __const __ptr_t __e2));
 #  else
-extern int versionsort __P ((__const __ptr_t __e1, __const __ptr_t __e2))
-     __asm__ ("versionsort64");
+#   ifdef __REDIRECT
+extern int __REDIRECT (versionsort,
+		       __P ((__const __ptr_t __e1, __const __ptr_t __e2)),
+		       versionsort64);
+#   else
+#    define versionsort versionsort64
+#   endif
 #  endif
 
 #  ifdef __USE_LARGEFILE64