summaryrefslogtreecommitdiff
path: root/dirent/scandirat64.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:31:37 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:31:37 +0000
commit74a412373b66a38b6ce8156f027ce26f89a7462f (patch)
treea59ce0af7ffd48641ca9124d697f7a6b57b26931 /dirent/scandirat64.c
parent2004eeba8fb2a92105bbf95b280fff6dc1d84144 (diff)
parent4cbfda396f7cd9e83116c28965ade73d80c1cb82 (diff)
Merge commit 'refs/top-bases/t/ONSTACK' into t/ONSTACK
Diffstat (limited to 'dirent/scandirat64.c')
-rw-r--r--dirent/scandirat64.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/dirent/scandirat64.c b/dirent/scandirat64.c
index c7888849e3..7e5e209cdf 100644
--- a/dirent/scandirat64.c
+++ b/dirent/scandirat64.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 scandirat __no_scandirat_decl
#include <dirent.h>
-
-/* scandirat.c defines scandirat64 as an alias if _DIRENT_MATCHES_DIRENT64. */
-#ifndef _DIRENT_MATCHES_DIRENT64
-
-# define SCANDIRAT scandirat64
-# define SCANDIR_TAIL __scandir64_tail
-# define DIRENT_TYPE struct dirent64
-
-# include <scandirat.c>
-
+#undef scandirat
+
+int
+scandirat64 (int dfd, const char *dir, struct dirent64 ***namelist,
+ int (*select) (const struct dirent64 *),
+ int (*cmp) (const struct dirent64 **, const struct dirent64 **))
+{
+ return __scandir64_tail (__opendirat (dfd, dir), namelist, select, cmp);
+}
+
+#if _DIRENT_MATCHES_DIRENT64
+weak_alias (scandirat64, scandirat)
#endif