mescc: Mes C Library: Add closedir, opendir, readdir.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 26 Aug 2018 16:34:53 +0000 (18:34 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 26 Aug 2018 16:34:53 +0000 (18:34 +0200)
commitfa4ba916eae416c6c38d0d01775b8f83ae29183c
tree70bf899d049cc1ad9d3ec41d41d71da0a4608c98
parent7ca72fefcd5d7f97be83808fc8b2c89f01abc130
mescc: Mes C Library: Add closedir, opendir, readdir.

* include/dirent.h: New file.  Import from glibc-2.2.5.
* include/dirstream.h: Likewise.
* lib/dirent/__getdirentries.c: Likewise.
* lib/dirent/closedir.c: Likewise.
* lib/dirent/readdir.c (readdir): Likewise.
* lib/libc+gnu.c: Include them.
* include/linux/x86/syscall.h (SYS_getdents): New macro.
* include/linux/x86_64/syscall.h (SYS_getdents): Likewise.
* lib/linux/gnu.c (getdents): New function.
* include/limits.h (NAME_MAX): New macro.
* include/fcntl.h (O_DIRECTORY): New macro.
* scaffold/tests/readdir.dir: New directory.
* scaffold/tests/99-readdir.c: New file, use it.
* build-aux/check-mescc.sh (tests): Run it.
18 files changed:
build-aux/check-mescc.sh
include/dirent.h [new file with mode: 0644]
include/dirstream.h [new file with mode: 0644]
include/fcntl.h
include/limits.h
include/linux/x86/syscall.h
include/linux/x86_64/syscall.h
include/sys/types.h
lib/dirent/__getdirentries.c [new file with mode: 0644]
lib/dirent/closedir.c [new file with mode: 0644]
lib/dirent/opendir.c [new file with mode: 0644]
lib/dirent/readdir.c [new file with mode: 0644]
lib/libc+gnu.c
lib/linux/gnu.c
scaffold/tests/99-readdir.c [new file with mode: 0644]
scaffold/tests/readdir.dir/dir/.keep [new file with mode: 0644]
scaffold/tests/readdir.dir/file [new file with mode: 0644]
scaffold/tests/readdir.dir/link [new symlink]