diff --git a/ap/libc/glibc/glibc-2.23/dirent/Makefile b/ap/libc/glibc/glibc-2.23/dirent/Makefile
new file mode 100644
index 0000000..26bfb43
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/Makefile
@@ -0,0 +1,43 @@
+# Copyright (C) 1991-2016 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
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+#
+#	Sub-makefile for dirent portion of the library.
+#
+subdir		:= dirent
+
+include ../Makeconfig
+
+headers		:= dirent.h bits/dirent.h
+routines	:= opendir closedir readdir readdir_r rewinddir \
+		   seekdir telldir scandir alphasort versionsort \
+		   getdents getdents64 dirfd readdir64 readdir64_r scandir64 \
+		   alphasort64 versionsort64 fdopendir \
+		   scandirat scandirat64 \
+		   scandir-cancel scandir-tail scandir64-tail
+
+tests	   := list tst-seekdir opendir-tst1 bug-readdir1 tst-fdopendir \
+	      tst-fdopendir2 tst-scandir tst-scandir64
+
+CFLAGS-scandir.c = $(uses-callbacks)
+CFLAGS-scandir64.c = $(uses-callbacks)
+CFLAGS-scandir-tail.c = $(uses-callbacks)
+CFLAGS-scandir64-tail.c = $(uses-callbacks)
+
+include ../Rules
+
+opendir-tst1-ARGS = --test-dir=${common-objpfx}dirent
diff --git a/ap/libc/glibc/glibc-2.23/dirent/Versions b/ap/libc/glibc/glibc-2.23/dirent/Versions
new file mode 100644
index 0000000..d976d37
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/Versions
@@ -0,0 +1,50 @@
+libc {
+  GLIBC_2.0 {
+    # a*
+    alphasort;
+
+    # c*
+    closedir;
+
+    # d*
+    dirfd;
+
+    # g*
+    getdirentries;
+
+    # o*
+    opendir;
+
+    # r*
+    readdir; readdir_r; rewinddir;
+
+    # s*
+    scandir; seekdir;
+
+    # t*
+    telldir;
+  }
+  GLIBC_2.1 {
+    # a*
+    alphasort64;
+
+    # r*
+    readdir64; readdir64_r;
+
+    # s*
+    scandir64;
+
+    # v*
+    versionsort; versionsort64;
+  }
+  GLIBC_2.2 {
+    # g*
+    getdirentries64;
+  }
+  GLIBC_2.4 {
+    fdopendir;
+  }
+  GLIBC_2.15 {
+    scandirat; scandirat64;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.23/dirent/alphasort.c b/ap/libc/glibc/glibc-2.23/dirent/alphasort.c
new file mode 100644
index 0000000..8255e8d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/alphasort.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* We need to avoid the header declaration of alphasort64, because
+   the types don't match alphasort and then the compiler will
+   complain about the mismatch when we do the alias below.  */
+#define alphasort64     __renamed_alphasort64
+
+#include <dirent.h>
+
+#undef  alphasort64
+
+#include <string.h>
+
+int
+alphasort (const struct dirent **a, const struct dirent **b)
+{
+  return strcoll ((*a)->d_name, (*b)->d_name);
+}
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (alphasort, alphasort64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/alphasort64.c b/ap/libc/glibc/glibc-2.23/dirent/alphasort64.c
new file mode 100644
index 0000000..7247b58
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/alphasort64.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+#include <string.h>
+
+/* alphasort.c defines alphasort64 as an alias if _DIRENT_MATCHES_DIRENT64.  */
+#ifndef _DIRENT_MATCHES_DIRENT64
+
+int
+alphasort64 (const struct dirent64 **a, const struct dirent64 **b)
+{
+  return strcoll ((*a)->d_name, (*b)->d_name);
+}
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/bug-readdir1.c b/ap/libc/glibc/glibc-2.23/dirent/bug-readdir1.c
new file mode 100644
index 0000000..4c3521d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/bug-readdir1.c
@@ -0,0 +1,38 @@
+#include <dirent.h>
+#include <errno.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+
+int
+main (void)
+{
+  DIR *dirp;
+  struct dirent* ent;
+
+  /* open a dir stream */
+  dirp = opendir ("/tmp");
+  if (dirp == NULL)
+    {
+      if (errno == ENOENT)
+	exit (0);
+
+      perror ("opendir");
+      exit (1);
+    }
+
+  /* close the directory file descriptor, making it invalid */
+  if (close (dirfd (dirp)) != 0)
+    {
+      puts ("could not close directory file descriptor");
+      /* This is not an error.  It is not guaranteed this is possible.  */
+      return 0;
+    }
+
+  ent = readdir (dirp);
+
+  return ent != NULL || errno != EBADF;
+}
diff --git a/ap/libc/glibc/glibc-2.23/dirent/closedir.c b/ap/libc/glibc/glibc-2.23/dirent/closedir.c
new file mode 100644
index 0000000..9d43588
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/closedir.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+
+/* Close the directory stream DIRP.
+   Return 0 if successful, -1 if not.  */
+int
+__closedir (DIR *dirp)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__closedir, closedir)
+
+stub_warning (closedir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/dirent.h b/ap/libc/glibc/glibc-2.23/dirent/dirent.h
new file mode 100644
index 0000000..9a4b6bf
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/dirent.h
@@ -0,0 +1,403 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/*
+ *	POSIX Standard: 5.1.2 Directory Operations	<dirent.h>
+ */
+
+#ifndef	_DIRENT_H
+#define	_DIRENT_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+#include <bits/types.h>
+
+#ifdef __USE_XOPEN
+# ifndef __ino_t_defined
+#  ifndef __USE_FILE_OFFSET64
+typedef __ino_t ino_t;
+#  else
+typedef __ino64_t ino_t;
+#  endif
+#  define __ino_t_defined
+# endif
+# if defined __USE_LARGEFILE64 && !defined __ino64_t_defined
+typedef __ino64_t ino64_t;
+#  define __ino64_t_defined
+# endif
+#endif
+
+/* This file defines `struct dirent'.
+
+   It defines the macro `_DIRENT_HAVE_D_NAMLEN' iff there is a `d_namlen'
+   member that gives the length of `d_name'.
+
+   It defines the macro `_DIRENT_HAVE_D_RECLEN' iff there is a `d_reclen'
+   member that gives the size of the entire directory entry.
+
+   It defines the macro `_DIRENT_HAVE_D_OFF' iff there is a `d_off'
+   member that gives the file offset of the next directory entry.
+
+   It defines the macro `_DIRENT_HAVE_D_TYPE' iff there is a `d_type'
+   member that gives the type of the file.
+ */
+
+#include <bits/dirent.h>
+
+#if defined __USE_MISC && !defined d_fileno
+# define d_ino	d_fileno		 /* Backward compatibility.  */
+#endif
+
+/* These macros extract size information from a `struct dirent *'.
+   They may evaluate their argument multiple times, so it must not
+   have side effects.  Each of these may involve a relatively costly
+   call to `strlen' on some systems, so these values should be cached.
+
+   _D_EXACT_NAMLEN (DP)	returns the length of DP->d_name, not including
+   its terminating null character.
+
+   _D_ALLOC_NAMLEN (DP)	returns a size at least (_D_EXACT_NAMLEN (DP) + 1);
+   that is, the allocation size needed to hold the DP->d_name string.
+   Use this macro when you don't need the exact length, just an upper bound.
+   This macro is less likely to require calling `strlen' than _D_EXACT_NAMLEN.
+   */
+
+#ifdef _DIRENT_HAVE_D_NAMLEN
+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
+# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
+#else
+# define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
+# ifdef _DIRENT_HAVE_D_RECLEN
+#  define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0])
+# else
+#  define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
+			      _D_EXACT_NAMLEN (d) + 1)
+# endif
+#endif
+
+
+#ifdef __USE_MISC
+/* File types for `d_type'.  */
+enum
+  {
+    DT_UNKNOWN = 0,
+# define DT_UNKNOWN	DT_UNKNOWN
+    DT_FIFO = 1,
+# define DT_FIFO	DT_FIFO
+    DT_CHR = 2,
+# define DT_CHR		DT_CHR
+    DT_DIR = 4,
+# define DT_DIR		DT_DIR
+    DT_BLK = 6,
+# define DT_BLK		DT_BLK
+    DT_REG = 8,
+# define DT_REG		DT_REG
+    DT_LNK = 10,
+# define DT_LNK		DT_LNK
+    DT_SOCK = 12,
+# define DT_SOCK	DT_SOCK
+    DT_WHT = 14
+# define DT_WHT		DT_WHT
+  };
+
+/* Convert between stat structure types and directory types.  */
+# define IFTODT(mode)	(((mode) & 0170000) >> 12)
+# define DTTOIF(dirtype)	((dirtype) << 12)
+#endif
+
+
+/* This is the data type of directory stream objects.
+   The actual structure is opaque to users.  */
+typedef struct __dirstream DIR;
+
+/* Open a directory stream on NAME.
+   Return a DIR stream on the directory, or NULL if it could not be opened.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern DIR *opendir (const char *__name) __nonnull ((1));
+
+#ifdef __USE_XOPEN2K8
+/* Same as opendir, but open the stream on the file descriptor FD.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern DIR *fdopendir (int __fd);
+#endif
+
+/* Close the directory stream DIRP.
+   Return 0 if successful, -1 if not.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern int closedir (DIR *__dirp) __nonnull ((1));
+
+/* Read a directory entry from DIRP.  Return a pointer to a `struct
+   dirent' describing the entry, or NULL for EOF or error.  The
+   storage returned may be overwritten by a later readdir call on the
+   same DIR stream.
+
+   If the Large File Support API is selected we have to use the
+   appropriate interface.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+#ifndef __USE_FILE_OFFSET64
+extern struct dirent *readdir (DIR *__dirp) __nonnull ((1));
+#else
+# ifdef __REDIRECT
+extern struct dirent *__REDIRECT (readdir, (DIR *__dirp), readdir64)
+     __nonnull ((1));
+# else
+#  define readdir readdir64
+# endif
+#endif
+
+#ifdef __USE_LARGEFILE64
+extern struct dirent64 *readdir64 (DIR *__dirp) __nonnull ((1));
+#endif
+
+#ifdef __USE_POSIX
+/* Reentrant version of `readdir'.  Return in RESULT a pointer to the
+   next entry.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+# ifndef __USE_FILE_OFFSET64
+extern int readdir_r (DIR *__restrict __dirp,
+		      struct dirent *__restrict __entry,
+		      struct dirent **__restrict __result)
+     __nonnull ((1, 2, 3));
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT (readdir_r,
+		       (DIR *__restrict __dirp,
+			struct dirent *__restrict __entry,
+			struct dirent **__restrict __result),
+		       readdir64_r) __nonnull ((1, 2, 3));
+#  else
+#   define readdir_r readdir64_r
+#  endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+extern int readdir64_r (DIR *__restrict __dirp,
+			struct dirent64 *__restrict __entry,
+			struct dirent64 **__restrict __result)
+     __nonnull ((1, 2, 3));
+# endif
+#endif	/* POSIX or misc */
+
+/* Rewind DIRP to the beginning of the directory.  */
+extern void rewinddir (DIR *__dirp) __THROW __nonnull ((1));
+
+#if defined __USE_MISC || defined __USE_XOPEN
+# include <bits/types.h>
+
+/* Seek to position POS on DIRP.  */
+extern void seekdir (DIR *__dirp, long int __pos) __THROW __nonnull ((1));
+
+/* Return the current position of DIRP.  */
+extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
+#endif
+
+#ifdef __USE_XOPEN2K8
+
+/* Return the file descriptor used by DIRP.  */
+extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
+
+# if defined __OPTIMIZE__ && defined _DIR_dirfd
+#  define dirfd(dirp)	_DIR_dirfd (dirp)
+# endif
+
+# ifdef __USE_MISC
+#  ifndef MAXNAMLEN
+/* Get the definitions of the POSIX.1 limits.  */
+#  include <bits/posix1_lim.h>
+
+/* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'.  */
+#   ifdef NAME_MAX
+#    define MAXNAMLEN	NAME_MAX
+#   else
+#    define MAXNAMLEN	255
+#   endif
+#  endif
+# endif
+
+# define __need_size_t
+# include <stddef.h>
+
+/* Scan the directory DIR, calling SELECTOR on each directory entry.
+   Entries for which SELECT returns nonzero are individually malloc'd,
+   sorted using qsort with CMP, and collected in a malloc'd array in
+   *NAMELIST.  Returns the number of entries selected, or -1 on error.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+# ifndef __USE_FILE_OFFSET64
+extern int scandir (const char *__restrict __dir,
+		    struct dirent ***__restrict __namelist,
+		    int (*__selector) (const struct dirent *),
+		    int (*__cmp) (const struct dirent **,
+				  const struct dirent **))
+     __nonnull ((1, 2));
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT (scandir,
+		       (const char *__restrict __dir,
+			struct dirent ***__restrict __namelist,
+			int (*__selector) (const struct dirent *),
+			int (*__cmp) (const struct dirent **,
+				      const struct dirent **)),
+		       scandir64) __nonnull ((1, 2));
+#  else
+#   define scandir scandir64
+#  endif
+# endif
+
+# if defined __USE_GNU && defined __USE_LARGEFILE64
+/* This function is like `scandir' but it uses the 64bit dirent structure.
+   Please note that the CMP function must now work with struct dirent64 **.  */
+extern int scandir64 (const char *__restrict __dir,
+		      struct dirent64 ***__restrict __namelist,
+		      int (*__selector) (const struct dirent64 *),
+		      int (*__cmp) (const struct dirent64 **,
+				    const struct dirent64 **))
+     __nonnull ((1, 2));
+# endif
+
+# ifdef __USE_GNU
+/* Similar to `scandir' but a relative DIR name is interpreted relative
+   to the directory for which DFD is a descriptor.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+#  ifndef __USE_FILE_OFFSET64
+extern int scandirat (int __dfd, const char *__restrict __dir,
+		      struct dirent ***__restrict __namelist,
+		      int (*__selector) (const struct dirent *),
+		      int (*__cmp) (const struct dirent **,
+				    const struct dirent **))
+     __nonnull ((2, 3));
+#  else
+#   ifdef __REDIRECT
+extern int __REDIRECT (scandirat,
+		       (int __dfd, const char *__restrict __dir,
+			struct dirent ***__restrict __namelist,
+			int (*__selector) (const struct dirent *),
+			int (*__cmp) (const struct dirent **,
+				      const struct dirent **)),
+		       scandirat64) __nonnull ((2, 3));
+#   else
+#    define scandirat scandirat64
+#   endif
+#  endif
+
+/* This function is like `scandir' but it uses the 64bit dirent structure.
+   Please note that the CMP function must now work with struct dirent64 **.  */
+extern int scandirat64 (int __dfd, const char *__restrict __dir,
+			struct dirent64 ***__restrict __namelist,
+			int (*__selector) (const struct dirent64 *),
+			int (*__cmp) (const struct dirent64 **,
+				      const struct dirent64 **))
+     __nonnull ((2, 3));
+# endif
+
+/* Function to compare two `struct dirent's alphabetically.  */
+# ifndef __USE_FILE_OFFSET64
+extern int alphasort (const struct dirent **__e1,
+		      const struct dirent **__e2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT_NTH (alphasort,
+			   (const struct dirent **__e1,
+			    const struct dirent **__e2),
+			   alphasort64) __attribute_pure__ __nonnull ((1, 2));
+#  else
+#   define alphasort alphasort64
+#  endif
+# endif
+
+# if defined __USE_GNU && defined __USE_LARGEFILE64
+extern int alphasort64 (const struct dirent64 **__e1,
+			const struct dirent64 **__e2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
+# endif
+#endif /* Use XPG7.  */
+
+
+#ifdef __USE_MISC
+/* Read directory entries from FD into BUF, reading at most NBYTES.
+   Reading starts at offset *BASEP, and *BASEP is updated with the new
+   position after reading.  Returns the number of bytes read; zero when at
+   end of directory; or -1 for errors.  */
+# ifndef __USE_FILE_OFFSET64
+extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
+				size_t __nbytes,
+				__off_t *__restrict __basep)
+     __THROW __nonnull ((2, 4));
+# else
+#  ifdef __REDIRECT
+extern __ssize_t __REDIRECT_NTH (getdirentries,
+				 (int __fd, char *__restrict __buf,
+				  size_t __nbytes,
+				  __off64_t *__restrict __basep),
+				 getdirentries64) __nonnull ((2, 4));
+#  else
+#   define getdirentries getdirentries64
+#  endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
+				  size_t __nbytes,
+				  __off64_t *__restrict __basep)
+     __THROW __nonnull ((2, 4));
+# endif
+#endif /* Use misc.  */
+
+#ifdef __USE_GNU
+/* Function to compare two `struct dirent's by name & version.  */
+# ifndef __USE_FILE_OFFSET64
+extern int versionsort (const struct dirent **__e1,
+			const struct dirent **__e2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT_NTH (versionsort,
+			   (const struct dirent **__e1,
+			    const struct dirent **__e2),
+			   versionsort64)
+     __attribute_pure__ __nonnull ((1, 2));
+#  else
+#   define versionsort versionsort64
+#  endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+extern int versionsort64 (const struct dirent64 **__e1,
+			  const struct dirent64 **__e2)
+     __THROW __attribute_pure__ __nonnull ((1, 2));
+# endif
+#endif /* Use GNU.  */
+
+__END_DECLS
+
+#endif /* dirent.h  */
diff --git a/ap/libc/glibc/glibc-2.23/dirent/dirfd.c b/ap/libc/glibc/glibc-2.23/dirent/dirfd.c
new file mode 100644
index 0000000..4d3bb5b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/dirfd.c
@@ -0,0 +1,30 @@
+/* Return the file descriptor used by a DIR stream.  Stub version.
+   Copyright (C) 1995-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+#include <dirstream.h>
+#include <errno.h>
+
+int
+dirfd (DIR *dirp)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (dirfd)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/fdopendir.c b/ap/libc/glibc/glibc-2.23/dirent/fdopendir.c
new file mode 100644
index 0000000..9771ddd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/fdopendir.c
@@ -0,0 +1,33 @@
+/* Open a directory stream from a file descriptor.  Stub version.
+   Copyright (C) 2005-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+
+/* Open a directory stream on FD.  */
+DIR *
+__fdopendir (int fd)
+{
+  __set_errno (ENOSYS);
+  return NULL;
+}
+weak_alias (__fdopendir, fdopendir)
+
+stub_warning (fdopendir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/getdents.c b/ap/libc/glibc/glibc-2.23/dirent/getdents.c
new file mode 100644
index 0000000..8386bb0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/getdents.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+ssize_t
+__getdirentries (int fd, char *buf, size_t nbytes, off_t *basep)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__getdirentries, getdirentries)
+
+stub_warning (getdirentries)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/getdents64.c b/ap/libc/glibc/glibc-2.23/dirent/getdents64.c
new file mode 100644
index 0000000..2933400
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/getdents64.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+ssize_t
+getdirentries64 (int fd, char *buf, size_t nbytes, off64_t *basep)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (getdirentries64)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/list.c b/ap/libc/glibc/glibc-2.23/dirent/list.c
new file mode 100644
index 0000000..0024305
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/list.c
@@ -0,0 +1,75 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <dirent.h>
+
+
+static int
+test (const char *name)
+{
+  DIR *dirp;
+  struct dirent *entp;
+  int retval = 0;
+
+  puts (name);
+
+  dirp = opendir (name);
+  if (dirp == NULL)
+    {
+      perror ("opendir");
+      return 1;
+    }
+
+  errno = 0;
+  while ((entp = readdir (dirp)) != NULL)
+    printf ("%s\tfile number %lu\n",
+	    entp->d_name, (unsigned long int) entp->d_fileno);
+
+  if (errno)
+    {
+      perror ("readdir");
+      retval = 1;
+    }
+
+  if (closedir (dirp) < 0)
+    {
+      perror ("closedir");
+      retval = 1;
+    }
+
+  return retval;
+}
+
+int
+main (int argc, char **argv)
+{
+  int retval = 0;
+  --argc;
+  ++argv;
+
+  if (argc == 0)
+    retval = test (".");
+  else
+    while (argc-- > 0)
+      retval |= test (*argv++);
+
+  return retval;
+}
diff --git a/ap/libc/glibc/glibc-2.23/dirent/opendir-tst1.c b/ap/libc/glibc/glibc-2.23/dirent/opendir-tst1.c
new file mode 100644
index 0000000..e96a817
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/opendir-tst1.c
@@ -0,0 +1,96 @@
+/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+/* Name of the FIFO.  */
+char tmpname[] = "fifoXXXXXX";
+
+
+/* Do the real work.  */
+static int
+real_test (void)
+{
+  DIR *dirp;
+
+  /* This should not block for an FIFO.  */
+  dirp = opendir (tmpname);
+
+  /* Successful.  */
+  if (dirp != NULL)
+    {
+      /* Oh, oh, how can this work?  */
+      fputs ("`opendir' succeeded on a FIFO???\n", stdout);
+      closedir (dirp);
+      return 1;
+    }
+
+  if (errno != ENOTDIR)
+    {
+      fprintf (stdout, "`opendir' return error `%s' instead of `%s'\n",
+	       strerror (errno), strerror (ENOTDIR));
+      return 1;
+    }
+
+  return 0;
+}
+
+
+static int
+do_test (int argc, char *argv[])
+{
+  int retval;
+
+  if (mktemp (tmpname) == NULL)
+    {
+      perror ("mktemp");
+      return 1;
+    }
+
+  /* Try to generate a FIFO.  */
+  if (mknod (tmpname, 0600 | S_IFIFO, 0) < 0)
+    {
+      perror ("mknod");
+      /* We cannot make this an error.  */
+      return 0;
+    }
+
+  retval = real_test ();
+
+  remove (tmpname);
+
+  return retval;
+}
+
+
+static void
+do_cleanup (void)
+{
+  remove (tmpname);
+}
+#define CLEANUP_HANDLER do_cleanup ()
+
+
+/* Include the test skeleton.  */
+#include <test-skeleton.c>
diff --git a/ap/libc/glibc/glibc-2.23/dirent/opendir.c b/ap/libc/glibc/glibc-2.23/dirent/opendir.c
new file mode 100644
index 0000000..1fb3981
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/opendir.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+#include <fcntl.h>
+
+
+DIR *
+__opendirat (int dfd, const char *name)
+{
+  __set_errno (ENOSYS);
+  return NULL;
+}
+
+
+/* Open a directory stream on NAME.  */
+DIR *
+__opendir (const char *name)
+{
+  return __opendirat (AT_FDCWD, name);
+}
+weak_alias (__opendir, opendir)
+
+stub_warning (opendir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/readdir.c b/ap/libc/glibc/glibc-2.23/dirent/readdir.c
new file mode 100644
index 0000000..9d10805
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/readdir.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+/* Read a directory entry from DIRP.  */
+struct dirent *
+__readdir (DIR *dirp)
+{
+  __set_errno (ENOSYS);
+  return NULL;
+}
+weak_alias (__readdir, readdir)
+
+stub_warning (readdir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/readdir64.c b/ap/libc/glibc/glibc-2.23/dirent/readdir64.c
new file mode 100644
index 0000000..f5167a4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/readdir64.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+/* Read a directory entry from DIRP.  */
+struct dirent64 *
+__readdir64 (DIR *dirp)
+{
+  __set_errno (ENOSYS);
+  return NULL;
+}
+weak_alias (__readdir64, readdir64)
+stub_warning (readdir64)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/readdir64_r.c b/ap/libc/glibc/glibc-2.23/dirent/readdir64_r.c
new file mode 100644
index 0000000..3c5f9db
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/readdir64_r.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+/* Read a directory entry from DIRP, store result in ENTRY and return
+   pointer to result in *RESULT.  */
+int
+readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
+{
+  __set_errno (ENOSYS);
+  *result = NULL;
+  return -1;
+}
+stub_warning (readdir64_r)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/readdir_r.c b/ap/libc/glibc/glibc-2.23/dirent/readdir_r.c
new file mode 100644
index 0000000..6465263
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/readdir_r.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+/* Read a directory entry from DIRP, store result in ENTRY and return
+   pointer to result in *RESULT.  */
+int
+__readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
+{
+  __set_errno (ENOSYS);
+  *result = NULL;
+  return ENOSYS;
+}
+weak_alias (__readdir_r, readdir_r)
+
+stub_warning (readdir_r)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/rewinddir.c b/ap/libc/glibc/glibc-2.23/dirent/rewinddir.c
new file mode 100644
index 0000000..eaecb46
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/rewinddir.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+
+/* Rewind DIRP to the beginning of the directory.  */
+void
+__rewinddir (DIR *dirp)
+{
+  __set_errno (ENOSYS);
+  /* No way to indicate failure.	*/
+}
+libc_hidden_def (__rewinddir)
+weak_alias (__rewinddir, rewinddir)
+
+
+stub_warning (rewinddir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandir-cancel.c b/ap/libc/glibc/glibc-2.23/dirent/scandir-cancel.c
new file mode 100644
index 0000000..929a58a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandir-cancel.c
@@ -0,0 +1,31 @@
+/* Cancellation handler used in scandir* implementations.
+   Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+
+void
+__scandir_cancel_handler (void *arg)
+{
+  struct scandir_cancel_struct *cp = arg;
+  void **v = cp->v;
+
+  for (size_t i = 0; i < cp->cnt; ++i)
+    free (v[i]);
+  free (v);
+  (void) __closedir (cp->dp);
+}
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandir-tail.c b/ap/libc/glibc/glibc-2.23/dirent/scandir-tail.c
new file mode 100644
index 0000000..b72d9c7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandir-tail.c
@@ -0,0 +1,110 @@
+/* Logic guts of scandir*.
+   Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <libc-lock.h>
+
+#ifndef SCANDIR_TAIL
+# define SCANDIR_TAIL	__scandir_tail
+# define READDIR	__readdir
+# define DIRENT_TYPE	struct dirent
+#endif
+
+internal_function
+int
+SCANDIR_TAIL (DIR *dp,
+              DIRENT_TYPE ***namelist,
+              int (*select) (const DIRENT_TYPE *),
+              int (*cmp) (const DIRENT_TYPE **, const DIRENT_TYPE **))
+{
+  if (dp == NULL)
+    return -1;
+
+  int save = errno;
+  __set_errno (0);
+
+  int result;
+  struct scandir_cancel_struct c = { .dp = dp };
+  __libc_cleanup_push (&__scandir_cancel_handler, &c);
+
+  DIRENT_TYPE **v = NULL;
+  size_t vsize = 0;
+  DIRENT_TYPE *d;
+  while ((d = READDIR (dp)) != NULL)
+    {
+      if (select != NULL)
+        {
+          int selected = (*select) (d);
+
+	  /* The SELECT function might have changed errno.  It was
+	     zero before and it need to be again to make the later
+	     tests work.  */
+	  __set_errno (0);
+
+          if (!selected)
+            continue;
+        }
+      else
+        __set_errno (0);
+
+      if (__glibc_unlikely (c.cnt == vsize))
+        {
+          if (vsize == 0)
+            vsize = 10;
+          else
+            vsize *= 2;
+          DIRENT_TYPE **new = realloc (v, vsize * sizeof *v);
+          if (new == NULL)
+            break;
+          c.v = v = new;
+        }
+
+      size_t dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d;
+      DIRENT_TYPE *vnew = malloc (dsize);
+      if (vnew == NULL)
+        break;
+      v[c.cnt++] = (DIRENT_TYPE *) memcpy (vnew, d, dsize);
+    }
+
+  if (__glibc_likely (errno == 0))
+    {
+      __closedir (dp);
+
+      /* Sort the list if we have a comparison function to sort with.  */
+      if (cmp != NULL)
+	qsort (v, c.cnt, sizeof *v, (__compar_fn_t) cmp);
+
+      *namelist = v;
+      result = c.cnt;
+    }
+  else
+    {
+      /* This frees everything and calls closedir.  */
+      __scandir_cancel_handler (&c);
+      result = -1;
+    }
+
+  __libc_cleanup_pop (0);
+
+  if (result >= 0)
+    __set_errno (save);
+  return result;
+}
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandir.c b/ap/libc/glibc/glibc-2.23/dirent/scandir.c
new file mode 100644
index 0000000..a9b504c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandir.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* We need to avoid the header declaration of scandir64, because
+   the types don't match scandir and then the compiler will
+   complain about the mismatch when we do the alias below.  */
+#define scandir64       __renamed_scandir64
+
+#include <dirent.h>
+
+#undef  scandir64
+
+#ifndef SCANDIR
+# define SCANDIR        scandir
+# define SCANDIR_TAIL   __scandir_tail
+# define DIRENT_TYPE    struct dirent
+#endif
+
+
+int
+SCANDIR (const char *dir,
+	 DIRENT_TYPE ***namelist,
+	 int (*select) (const DIRENT_TYPE *),
+	 int (*cmp) (const DIRENT_TYPE **, const DIRENT_TYPE **))
+{
+  return SCANDIR_TAIL (__opendir (dir), namelist, select, cmp);
+}
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (scandir, scandir64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandir64-tail.c b/ap/libc/glibc/glibc-2.23/dirent/scandir64-tail.c
new file mode 100644
index 0000000..05a259f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandir64-tail.c
@@ -0,0 +1,26 @@
+/* Logic guts of scandir*64.
+   Copyright (C) 2015-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+
+#ifndef _DIRENT_MATCHES_DIRENT64
+# define SCANDIR_TAIL   __scandir64_tail
+# define READDIR        __readdir64
+# define DIRENT_TYPE    struct dirent64
+# include <scandir-tail.c>
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandir64.c b/ap/libc/glibc/glibc-2.23/dirent/scandir64.c
new file mode 100644
index 0000000..c64e454
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandir64.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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>
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandirat.c b/ap/libc/glibc/glibc-2.23/dirent/scandirat.c
new file mode 100644
index 0000000..ef3d6d8
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandirat.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* We need to avoid the header declaration of scandir64, because
+   the types don't match scandir and then the compiler will
+   complain about the mismatch when we do the alias below.  */
+#define scandirat64       __renamed_scandirat64
+
+#include <dirent.h>
+
+#undef  scandirat64
+
+#ifndef SCANDIRAT
+# define SCANDIRAT	__scandirat
+# define SCANDIR_TAIL	__scandir_tail
+# define DIRENT_TYPE	struct dirent
+# define SCANDIRAT_WEAK_ALIAS
+#endif
+
+int
+SCANDIRAT (int dfd, const char *dir,
+	   DIRENT_TYPE ***namelist,
+	   int (*select) (const DIRENT_TYPE *),
+	   int (*cmp) (const DIRENT_TYPE **, const DIRENT_TYPE **))
+{
+  return SCANDIR_TAIL (__opendirat (dfd, dir), namelist, select, cmp);
+}
+libc_hidden_def (SCANDIRAT)
+#ifdef SCANDIRAT_WEAK_ALIAS
+weak_alias (__scandirat, scandirat)
+#endif
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (scandirat, scandirat64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/scandirat64.c b/ap/libc/glibc/glibc-2.23/dirent/scandirat64.c
new file mode 100644
index 0000000..c788884
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/scandirat64.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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>
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/seekdir.c b/ap/libc/glibc/glibc-2.23/dirent/seekdir.c
new file mode 100644
index 0000000..bf1d889
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/seekdir.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <stddef.h>
+#include <dirent.h>
+
+/* Seek to position POS in DIRP.  */
+void
+seekdir (DIR *dirp, long int pos)
+{
+  if (dirp == NULL)
+    {
+      __set_errno (EINVAL);
+      return;
+    }
+
+  __set_errno (ENOSYS);
+}
+
+
+stub_warning (seekdir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/telldir.c b/ap/libc/glibc/glibc-2.23/dirent/telldir.c
new file mode 100644
index 0000000..3802be7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/telldir.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <stddef.h>
+#include <dirent.h>
+
+/* Return the current position of DIRP.  */
+long int
+telldir (DIR *dirp)
+{
+  if (dirp == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1l;
+    }
+
+  __set_errno (ENOSYS);
+  return -1l;
+}
+
+
+stub_warning (telldir)
diff --git a/ap/libc/glibc/glibc-2.23/dirent/tst-fdopendir.c b/ap/libc/glibc/glibc-2.23/dirent/tst-fdopendir.c
new file mode 100644
index 0000000..0780c19
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/tst-fdopendir.c
@@ -0,0 +1,127 @@
+#include <stdio.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <stdbool.h>
+#include <string.h>
+
+#ifndef O_NOATIME
+# define O_NOATIME	0
+#endif
+
+static int
+do_test (void)
+{
+  char fname[] = "/tmp/jXXXXXX";
+  int fd = mkstemp (fname);
+  if (fd == -1)
+    {
+      puts ("mkstemp failed");
+      return 1;
+    }
+
+  write (fd, "hello", 5);
+  close (fd);
+
+  struct stat64 st;
+  if (stat64 (fname, &st) == -1)
+    {
+      puts ("first stat failed");
+      return 0;
+    }
+
+  /* Make sure there is enough time between the creation and the access.  */
+  sleep (2);
+
+  fd = open (fname, O_RDONLY | O_NOATIME);
+  if (fd == -1)
+    {
+      puts ("first open failed");
+      return 1;
+    }
+
+  char buf[5];
+  read(fd, buf, sizeof (buf));
+  close(fd);
+
+  struct stat64 st2;
+  if (stat64 (fname, &st2) == -1)
+    {
+      puts ("second stat failed");
+      return 0;
+    }
+
+  bool no_noatime = false;
+#ifdef _STATBUF_ST_NSEC
+  if (st.st_atim.tv_sec != st2.st_atim.tv_sec
+      || st.st_atim.tv_nsec != st2.st_atim.tv_nsec)
+#else
+  if (st.st_atime != st2.st_atime)
+#endif
+    {
+      puts ("file atime changed");
+      no_noatime = true;
+    }
+
+  unlink(fname);
+
+  strcpy(fname, "/tmp/dXXXXXX");
+  char *d = mkdtemp (fname);
+  if (d == NULL)
+    {
+      puts ("mkdtemp failed");
+      return 1;
+    }
+
+  if (stat64 (d, &st) == -1)
+    {
+      puts ("third stat failed");
+      return 0;
+    }
+  sleep (2);
+
+  fd = open64 (d, O_RDONLY|O_NDELAY|O_DIRECTORY|O_NOATIME);
+  if (fd == -1)
+    {
+      puts ("second open failed");
+      return 1;
+    }
+  DIR *dir = fdopendir (fd);
+  if (dir == NULL)
+    {
+      puts ("fdopendir failed");
+      return 1;
+    }
+
+  struct dirent *de;
+  while ((de = readdir (dir)) != NULL)
+    ;
+
+  closedir (dir);
+
+  if (stat64 (d, &st2) == -1)
+    {
+      puts ("fourth stat failed");
+      return 0;
+    }
+#ifdef _STATBUF_ST_NSEC
+  if (!no_noatime
+      && (st.st_atim.tv_sec != st2.st_atim.tv_sec
+	 || st.st_atim.tv_nsec != st2.st_atim.tv_nsec))
+#else
+  if (!no_noatime && st.st_atime != st2.st_atime)
+#endif
+    {
+      puts ("directory atime changed");
+      return 1;
+    }
+
+  rmdir(fname);
+
+  return 0;
+}
+
+#define TIMEOUT 6
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/dirent/tst-fdopendir2.c b/ap/libc/glibc/glibc-2.23/dirent/tst-fdopendir2.c
new file mode 100644
index 0000000..3720809
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/tst-fdopendir2.c
@@ -0,0 +1,41 @@
+#include <errno.h>
+#include <dirent.h>
+#include <stdio.h>
+#include <unistd.h>
+
+
+static int
+do_test (void)
+{
+  char tmpl[] = "/tmp/tst-fdopendir2-XXXXXX";
+  int fd = mkstemp (tmpl);
+  if (fd == -1)
+    {
+      puts ("cannot open temp file");
+      return 1;
+    }
+
+  errno = 0;
+  DIR *d = fdopendir (fd);
+
+  int e = errno;
+
+  close (fd);
+  unlink (tmpl);
+
+  if (d != NULL)
+    {
+      puts ("fdopendir with normal file descriptor did not fail");
+      return 1;
+    }
+  if (e != ENOTDIR)
+    {
+      printf ("fdopendir set errno to %d, not %d as expected\n", e, ENOTDIR);
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/dirent/tst-scandir.c b/ap/libc/glibc/glibc-2.23/dirent/tst-scandir.c
new file mode 100644
index 0000000..4bce4a3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/tst-scandir.c
@@ -0,0 +1,298 @@
+/* Basic test for scandir function.
+   Copyright (C) 2015-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef D
+# define D(x) x
+#endif
+
+static void prepare (void);
+static int do_test (void);
+#define PREPARE(argc, argv)     prepare ()
+#define TEST_FUNCTION           do_test ()
+#include "../test-skeleton.c"
+
+static const char *scandir_test_dir;
+
+static void
+prepare (void)
+{
+  size_t test_dir_len = strlen (test_dir);
+  static const char dir_name[] = "/tst-scandir.XXXXXX";
+
+  size_t dirbuflen = test_dir_len + sizeof (dir_name);
+  char *dirbuf = malloc (dirbuflen);
+  if (dirbuf == NULL)
+    {
+      puts ("out of memory");
+      exit (1);
+    }
+
+  snprintf (dirbuf, dirbuflen, "%s%s", test_dir, dir_name);
+  if (mkdtemp (dirbuf) == NULL)
+    {
+      puts ("cannot create temporary directory");
+      exit (1);
+    }
+
+  add_temp_file (dirbuf);
+  scandir_test_dir = dirbuf;
+}
+
+/* The directory should be empty save the . and .. files.  */
+static void
+verify_empty (const char *dirname)
+{
+  DIR *dir = opendir (dirname);
+  if (dir == NULL)
+    {
+      printf ("opendir (%s): %s\n", dirname, strerror (errno));
+      exit (1);
+    }
+
+  struct dirent64 *d;
+  while ((d = readdir64 (dir)) != NULL)
+    if (strcmp (d->d_name, ".") != 0 && strcmp (d->d_name, "..") != 0)
+      {
+        printf ("temp directory contains file \"%s\"\n", d->d_name);
+        exit (1);
+      }
+
+  closedir (dir);
+}
+
+static void
+make_file (const char *dirname, const char *filename)
+{
+  char *name = NULL;
+  if (asprintf (&name, "%s/%s", dirname, filename) < 0)
+    {
+      puts ("out of memory");
+      exit (1);
+    }
+
+  int fd = open (name, O_WRONLY | O_CREAT | O_EXCL, 0600);
+  if (fd < 0)
+    {
+      printf ("cannot create \"%s\": %s\n", name, strerror (errno));
+      exit (1);
+    }
+  close (fd);
+
+  free (name);
+}
+
+static void
+remove_file (const char *dirname, const char *filename)
+{
+  char *name = NULL;
+  if (asprintf (&name, "%s/%s", dirname, filename) < 0)
+    {
+      puts ("out of memory");
+      exit (1);
+    }
+
+  remove (name);
+
+  free (name);
+}
+
+static void
+freelist (struct D(dirent) **list, size_t n)
+{
+  for (size_t i = 0; i < n; ++i)
+    free (list[i]);
+  free (list);
+}
+
+static int
+select_a (const struct D(dirent) *d)
+{
+  return d->d_name[0] == 'a';
+}
+
+static int
+do_test (void)
+{
+  verify_empty (scandir_test_dir);
+
+  make_file (scandir_test_dir, "c");
+  make_file (scandir_test_dir, "aa");
+  make_file (scandir_test_dir, "b");
+  make_file (scandir_test_dir, "a");
+
+
+  /* First a basic test with no select or compare functions.  */
+
+  struct D(dirent) **list;
+  int n = D(scandir) (scandir_test_dir, &list, NULL, NULL);
+  if (n < 0)
+    {
+      printf ("scandir failed on %s: %s\n",
+              scandir_test_dir, strerror (errno));
+      return 1;
+    }
+  if (n != 6)
+    {
+      printf ("scandir returned %d entries instead of 6\n", n);
+      return 1;
+    }
+
+  struct
+  {
+    const char *name;
+    bool found;
+  } expected[] =
+    {
+      { ".", },
+      { "..", },
+      { "a", },
+      { "aa", },
+      { "b", },
+      { "c", },
+    };
+
+  /* Verify the results, ignoring the order.  */
+  for (int i = 0; i < n; ++i)
+    {
+      for (size_t j = 0; j < sizeof expected / sizeof expected[0]; ++j)
+        if (!strcmp (list[i]->d_name, expected[j].name))
+          {
+            expected[j].found = true;
+            goto found;
+          }
+
+      printf ("scandir yields unexpected entry [%d] \"%s\"\n",
+              i, list[i]->d_name);
+      return 1;
+
+    found:;
+    }
+
+  for (size_t j = 0; j < sizeof expected / sizeof expected[0]; ++j)
+    if (!expected[j].found)
+      {
+        printf ("failed to produce \"%s\"\n", expected[j].name);
+        return 1;
+      }
+
+  freelist (list, n);
+
+
+  /* Now a test with a comparison function.  */
+
+  n = D(scandir) (scandir_test_dir, &list, NULL, &D(alphasort));
+  if (n < 0)
+    {
+      printf ("scandir failed on %s: %s\n",
+              scandir_test_dir, strerror (errno));
+      return 1;
+    }
+  if (n != 6)
+    {
+      printf ("scandir returned %d entries instead of 6\n", n);
+      return 1;
+    }
+
+  assert (sizeof expected / sizeof expected[0] == 6);
+  for (int i = 0; i < n; ++i)
+    if (strcmp (list[i]->d_name, expected[i].name))
+      {
+        printf ("scandir yields [%d] of \"%s\", expected \"%s\"\n",
+                i, list[i]->d_name, expected[i].name);
+        return 1;
+      }
+
+  freelist (list, n);
+
+
+  /* Now a test with a select function but no comparison function.  */
+
+  n = D(scandir) (scandir_test_dir, &list, &select_a, NULL);
+  if (n < 0)
+    {
+      printf ("scandir failed on %s: %s\n",
+              scandir_test_dir, strerror (errno));
+      return 1;
+    }
+  if (n != 2)
+    {
+      printf ("scandir returned %d entries instead of 2\n", n);
+      return 1;
+    }
+
+  if (strcmp (list[0]->d_name, "a") && strcmp (list[0]->d_name, "aa"))
+    {
+      printf ("scandir yields [0] \"%s\", expected \"a\" or \"aa\"\n",
+              list[0]->d_name);
+      return 1;
+    }
+  if (strcmp (list[1]->d_name, "a") && strcmp (list[1]->d_name, "aa"))
+    {
+      printf ("scandir yields [1] \"%s\", expected \"a\" or \"aa\"\n",
+              list[1]->d_name);
+      return 1;
+    }
+  if (!strcmp (list[0]->d_name, list[1]->d_name))
+    {
+      printf ("scandir yields \"%s\" twice!\n", list[0]->d_name);
+      return 1;
+    }
+
+  freelist (list, n);
+
+
+  /* Now a test with both functions.  */
+
+  n = D(scandir) (scandir_test_dir, &list, &select_a, &D(alphasort));
+  if (n < 0)
+    {
+      printf ("scandir failed on %s: %s\n",
+              scandir_test_dir, strerror (errno));
+      return 1;
+    }
+  if (n != 2)
+    {
+      printf ("scandir returned %d entries instead of 2\n", n);
+      return 1;
+    }
+
+  if (strcmp (list[0]->d_name, "a") || strcmp (list[1]->d_name, "aa"))
+    {
+      printf ("scandir yields {\"%s\", \"%s\"}, expected {\"a\", \"aa\"}\n",
+              list[0]->d_name, list[1]->d_name);
+      return 1;
+    }
+
+  freelist (list, n);
+
+
+  /* Clean up the test directory.  */
+  remove_file (scandir_test_dir, "c");
+  remove_file (scandir_test_dir, "aa");
+  remove_file (scandir_test_dir, "b");
+  remove_file (scandir_test_dir, "a");
+  rmdir (scandir_test_dir);
+
+  return 0;
+}
diff --git a/ap/libc/glibc/glibc-2.23/dirent/tst-scandir64.c b/ap/libc/glibc/glibc-2.23/dirent/tst-scandir64.c
new file mode 100644
index 0000000..3f4c68e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/tst-scandir64.c
@@ -0,0 +1,2 @@
+#define D(x) x##64
+#include "tst-scandir.c"
diff --git a/ap/libc/glibc/glibc-2.23/dirent/tst-seekdir.c b/ap/libc/glibc/glibc-2.23/dirent/tst-seekdir.c
new file mode 100644
index 0000000..dcdd699
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/tst-seekdir.c
@@ -0,0 +1,81 @@
+#include <stdio.h>
+#include <dirent.h>
+#include <stdlib.h>
+
+static int
+do_test (void)
+{
+  DIR * dirp;
+  long int save3 = 0;
+  long int cur;
+  int i = 0;
+  int result = 0;
+  struct dirent *dp;
+  long int save0;
+  long int rewind;
+
+  dirp = opendir (".");
+  if (dirp == NULL)
+    {
+      printf ("opendir failed: %m\n");
+      return 1;
+    }
+
+  save0 = telldir (dirp);
+  if (save0 == -1)
+    {
+      printf ("telldir failed: %m\n");
+      result = 1;
+    }
+
+  for (dp = readdir (dirp); dp != NULL; dp = readdir (dirp))
+    {
+      /* save position 3 (after fourth entry) */
+      if (i++ == 3)
+	save3 = telldir (dirp);
+
+      printf ("%s\n", dp->d_name);
+
+      /* stop at 400 (just to make sure dirp->__offset and dirp->__size are
+	 scrambled */
+      if (i == 400)
+	break;
+    }
+
+  printf ("going back past 4-th entry...\n");
+
+  /* go back to saved entry */
+  seekdir (dirp, save3);
+
+  /* Check whether telldir equals to save3 now.  */
+  cur = telldir (dirp);
+  if (cur != save3)
+    {
+      printf ("seekdir (d, %ld); telldir (d) == %ld\n", save3, cur);
+      result = 1;
+    }
+
+  /* print remaining files (3-last) */
+  for (dp = readdir (dirp); dp != NULL; dp = readdir (dirp))
+    printf ("%s\n", dp->d_name);
+
+  /* Check rewinddir */
+  rewinddir (dirp);
+  rewind = telldir (dirp);
+  if (rewind == -1)
+    {
+      printf ("telldir failed: %m\n");
+      result = 1;
+    }
+  else if (save0 != rewind)
+    {
+      printf ("rewinddir didn't reset directory stream\n");
+      result = 1;
+    }
+
+  closedir (dirp);
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/dirent/versionsort.c b/ap/libc/glibc/glibc-2.23/dirent/versionsort.c
new file mode 100644
index 0000000..cde661b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/versionsort.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* We need to avoid the header declaration of versionsort64, because
+   the types don't match versionsort and then the compiler will
+   complain about the mismatch when we do the alias below.  */
+#define versionsort64     __renamed_versionsort64
+
+#include <dirent.h>
+
+#undef  versionsort64
+
+#include <string.h>
+
+int
+versionsort (const struct dirent **a, const struct dirent **b)
+{
+  return __strverscmp ((*a)->d_name, (*b)->d_name);
+}
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (versionsort, versionsort64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/dirent/versionsort64.c b/ap/libc/glibc/glibc-2.23/dirent/versionsort64.c
new file mode 100644
index 0000000..1c5047c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/dirent/versionsort64.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1992-2016 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <dirent.h>
+#include <string.h>
+
+/* versionsort.c defines a versionsort64 alias if _DIRENT_MATCHES_DIRENT64.  */
+#ifndef _DIRENT_MATCHES_DIRENT64
+
+int
+versionsort64 (const struct dirent64 **a, const struct dirent64 **b)
+{
+  return __strverscmp ((*a)->d_name, (*b)->d_name);
+}
+
+#endif
