* 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.
This commit is contained in:
@@ -39,6 +39,7 @@ details. */
|
||||
#include <wctype.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <dirent.h>
|
||||
#include "ntdll.h"
|
||||
|
||||
#undef fstat
|
||||
@@ -4436,6 +4437,21 @@ renameat (int olddirfd, const char *oldpathname,
|
||||
return rename (oldpath, newpath);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user