summaryrefslogtreecommitdiff
path: root/dirent/scandir64.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 14:28:23 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 14:28:23 +0000
commitdc3064332cec5ca6edc9a44f5f6111e506eb037b (patch)
tree79686327822b075f3970aec7ef73372142760047 /dirent/scandir64.c
parent86af500777f45066aa6a6817d4b695cf4b626c38 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/cvs/exc2signal-template' into cvs/exc2signal-template
Diffstat (limited to 'dirent/scandir64.c')
-rw-r--r--dirent/scandir64.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/dirent/scandir64.c b/dirent/scandir64.c
index c64e454095..6bdd4628ad 100644
--- a/dirent/scandir64.c
+++ b/dirent/scandir64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 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
@@ -15,15 +15,18 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define scandir __no_scandir_decl
#include <dirent.h>
-
-/* scandir.c defines scandir64 as an alias if _DIRENT_MATCHES_DIRENT64. */
-#ifndef _DIRENT_MATCHES_DIRENT64
-
-# define SCANDIR scandir64
-# define SCANDIR_TAIL __scandir64_tail
-# define DIRENT_TYPE struct dirent64
-
-# include <dirent/scandir.c>
-
+#undef scandir
+
+int
+scandir64 (const char *dir, struct dirent64 ***namelist,
+ int (*select) (const struct dirent64 *),
+ int (*cmp) (const struct dirent64 **, const struct dirent64 **))
+{
+ return __scandir64_tail (__opendir (dir), namelist, select, cmp);
+}
+
+#if _DIRENT_MATCHES_DIRENT64
+weak_alias (scandir64, scandir)
#endif