Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2012-02-22 05:58:24 +0400
committerYaakov Selkowitz <yselkowi@redhat.com>2012-02-22 05:58:24 +0400
commite587f14b6f60bbf702a1a13c4399446d9654b708 (patch)
tree9a4817c4093d18a2d8356c171b3533a01b570962 /winsup/cygwin/syscalls.cc
parentde6ebe0e8bf427356df9e3ecd9dc9fa9d2ca8053 (diff)
* cygwin.din (scandirat): Export.
* posix.sgml (std-gnu): Add scandirat. * syscalls.cc (scandirat): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * include/sys/dirent.h (scandirat): Declare.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 8cdadb2d7..21037fa10 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -39,6 +39,7 @@ details. */
#include <wctype.h>
#include <unistd.h>
#include <sys/wait.h>
+#include <dirent.h>
#include "ntdll.h"
#undef fstat
@@ -4437,6 +4438,21 @@ renameat (int olddirfd, const char *oldpathname,
}
extern "C" int
+scandirat (int dirfd, const char *pathname, struct dirent ***namelist,
+ int (*select) (const struct dirent *),
+ int (*compar) (const struct dirent **, const struct dirent **))
+{
+ tmp_pathbuf tp;
+ myfault efault;
+ if (efault.faulted (EFAULT))
+ return -1;
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ return -1;
+ return scandir (pathname, namelist, select, compar);
+}
+
+extern "C" int
symlinkat (const char *oldpath, int newdirfd, const char *newpathname)
{
tmp_pathbuf tp;