[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/misc/Makefile b/ap/libc/glibc/glibc-2.22/misc/Makefile
new file mode 100644
index 0000000..aecb0da
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/Makefile
@@ -0,0 +1,111 @@
+# Copyright (C) 1991-2015 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 misc portion of the library.
+#
+
+subdir	:= misc
+
+include ../Makeconfig
+
+headers	:= sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
+	   sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
+	   ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
+	   ttyent.h paths.h sys/reboot.h \
+	   sys/mman.h sys/param.h bits/param.h \
+	   fstab.h mntent.h search.h err.h error.h \
+	   sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
+	   sys/select.h ustat.h sys/ustat.h bits/ustat.h sys/sysinfo.h \
+	   regexp.h bits/select.h bits/mman.h sys/xattr.h \
+	   syslog.h sys/syslog.h \
+	   bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
+	   bits/select2.h bits/hwcap.h sys/auxv.h
+
+routines := brk sbrk sstk ioctl \
+	    readv writev preadv preadv64 pwritev pwritev64 \
+	    setreuid setregid \
+	    seteuid setegid \
+	    getpagesize \
+	    getdtsz \
+	    gethostname sethostname getdomain setdomain \
+	    select pselect \
+	    acct chroot fsync sync fdatasync syncfs reboot \
+	    gethostid sethostid \
+	    revoke vhangup \
+	    swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
+	    mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
+	    ualarm usleep \
+	    gtty stty \
+	    ptrace \
+	    fstab mntent mntent_r \
+	    utimes lutimes futimes futimesat \
+	    truncate ftruncate truncate64 ftruncate64 \
+	    chflags fchflags \
+	    insremque getttyent getusershell getpass ttyslot \
+	    syslog syscall daemon \
+	    mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
+	    mlock munlock mlockall munlockall \
+	    efgcvt efgcvt_r qefgcvt qefgcvt_r \
+	    hsearch hsearch_r tsearch lsearch \
+	    err error ustat \
+	    getsysstats dirname regexp \
+	    getloadavg getclktck \
+	    fgetxattr flistxattr fremovexattr fsetxattr getxattr \
+	    listxattr lgetxattr llistxattr lremovexattr lsetxattr \
+	    removexattr setxattr getauxval ifunc-impl-list
+
+generated += tst-error1.mtrace tst-error1-mem.out
+
+aux := init-misc
+install-lib := libg.a
+gpl2lgpl := error.c error.h
+
+tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
+	 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)tst-error1-mem.out
+endif
+
+CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-tsearch.c = $(uses-callbacks)
+CFLAGS-lsearch.c = $(uses-callbacks)
+CFLAGS-pselect.c = -fexceptions
+CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-usleep.c = -fexceptions
+CFLAGS-syslog.c = -fexceptions
+CFLAGS-error.c = -fexceptions
+CFLAGS-getpass.c = -fexceptions
+CFLAGS-mkstemp.c = -fexceptions
+CFLAGS-mkstemp64.c = -fexceptions
+CFLAGS-getsysstats.c = -fexceptions
+CFLAGS-getusershell.c = -fexceptions
+CFLAGS-err.c = -fexceptions
+CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
+
+include ../Rules
+
+$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
+
+$(objpfx)tst-tsearch: $(libm)
+
+tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
+tst-error1-ARGS = $(objpfx)tst-error1.out
+$(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out
+	$(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \
+	$(evaluate-test)
diff --git a/ap/libc/glibc/glibc-2.22/misc/Versions b/ap/libc/glibc/glibc-2.22/misc/Versions
new file mode 100644
index 0000000..534d1a3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/Versions
@@ -0,0 +1,158 @@
+libc {
+  GLIBC_2.0 {
+    # global variables
+    ___brk_addr; __curbrk; __progname; __progname_full;
+
+    # interface of malloc functions
+    __sbrk; __getpagesize;
+
+    # functions used in other libraries
+    __select;
+
+    # variables in normal name space
+    error_message_count; error_one_per_line; error_print_progname;
+
+    # variables in normal name space
+    loc1; loc2; locs;
+    program_invocation_name; program_invocation_short_name;
+
+    # a*
+    acct; addmntent; advance;
+
+    # b*
+    brk;
+
+    # c*
+    chflags; chroot; closelog;
+
+    # d*
+    daemon; dirname;
+
+    # e*
+    ecvt; ecvt_r; endfsent; endmntent; endttyent; endusershell;
+
+    # e*
+    err; error; error_at_line; errx;
+
+    # f*
+    fchflags; fcvt; fcvt_r; fdatasync; fsync; ftruncate;
+
+    # g*
+    gcvt; get_avphys_pages; get_nprocs; get_nprocs_conf; get_phys_pages;
+    getfsent; getfsfile; getfsspec; gethostid; gethostname; getmntent;
+    getmntent_r; getpagesize; getpass; getttyent; getttynam; getusershell;
+    gtty;
+
+    # h*
+    hasmntopt; hcreate; hcreate_r; hdestroy; hdestroy_r; hsearch; hsearch_r;
+
+    # i*
+    insque; ioctl;
+
+    # j*
+    jrand48; jrand48_r; lfind; lsearch;
+
+    # m*
+    madvise; mkstemp; mktemp; mlock; mlockall; mmap; mount; mprotect; msync;
+    munlock; munlockall; munmap;
+
+    # o*
+    openlog;
+
+    # p*
+    ptrace;
+
+    # q*
+    qecvt; qecvt_r; qfcvt; qfcvt_r; qgcvt;
+
+    # r*
+    readv; reboot; remque; revoke;
+
+    # s*
+    sbrk; select; setdomainname; setfsent; sethostent; sethostid; sethostname;
+    setlogmask; setmntent; setregid; setreuid; setttyent; setusershell; sstk;
+    stty; sync; syscall; syslog;
+
+    # t*
+    tdelete; tfind; truncate; tsearch; ttyslot; twalk;
+
+    # u*
+    ualarm; usleep; ustat; utimes;
+
+    # v*
+    verr; verrx; vhangup; vsyslog; vwarn; vwarnx;
+
+    # w*
+    warn; warnx;
+
+    # w*
+    writev;
+  }
+  GLIBC_2.1 {
+    # f*
+    ftruncate64;
+
+    # m*
+    mmap64;
+
+    # t*
+    tdestroy; truncate64;
+  }
+  GLIBC_2.2 {
+    # g*
+    getloadavg;
+
+    # m*
+    mincore; mkdtemp; mkstemp64;
+
+    # p*
+    posix_madvise;
+  }
+  GLIBC_2.3 {
+    # f*
+    fgetxattr; flistxattr; fremovexattr; fsetxattr;
+    futimes;
+
+    # g*
+    getxattr;
+
+    # l*
+    listxattr;
+    lgetxattr; llistxattr; lremovexattr; lsetxattr;
+    lutimes;
+
+    # r*
+    removexattr;
+
+    # s*
+    setxattr;
+  }
+  GLIBC_2.3.3 {
+    remap_file_pages;
+  }
+  GLIBC_2.4 {
+    futimesat;
+    __syslog_chk; __vsyslog_chk;
+  }
+  GLIBC_2.7 {
+    mkostemp; mkostemp64;
+  }
+  GLIBC_2.10 {
+    preadv; preadv64; pwritev; pwritev64;
+  }
+  GLIBC_2.11 {
+    mkstemps; mkstemps64; mkostemps; mkostemps64;
+  }
+  GLIBC_2.14 {
+    syncfs;
+  }
+  GLIBC_2.16 {
+    __getauxval; getauxval;
+  }
+  GLIBC_PRIVATE {
+    __madvise;
+    __mktemp;
+    __libc_ifunc_impl_list;
+    __tdelete; __tfind; __tsearch; __twalk;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/acct.c b/ap/libc/glibc/glibc-2.22/misc/acct.c
new file mode 100644
index 0000000..c5569e5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/acct.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Turn accounting on if NAME is an existing file.  The system will then write
+   a record for each process as it terminates, to this file.  If NAME is NULL,
+   turn accounting off.  This call is restricted to the super-user.  */
+int
+acct (name)
+     const char *name;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (acct)
diff --git a/ap/libc/glibc/glibc-2.22/misc/ar.h b/ap/libc/glibc/glibc-2.22/misc/ar.h
new file mode 100644
index 0000000..8b82f64
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ar.h
@@ -0,0 +1,47 @@
+/* Header describing `ar' archive file format.
+   Copyright (C) 1996-2015 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/>.  */
+
+#ifndef _AR_H
+#define _AR_H 1
+
+#include <sys/cdefs.h>
+
+/* Archive files start with the ARMAG identifying string.  Then follows a
+   `struct ar_hdr', and as many bytes of member file data as its `ar_size'
+   member indicates, for each member file.  */
+
+#define ARMAG	"!<arch>\n"	/* String that begins an archive file.  */
+#define SARMAG	8		/* Size of that string.  */
+
+#define ARFMAG	"`\n"		/* String in ar_fmag at end of each header.  */
+
+__BEGIN_DECLS
+
+struct ar_hdr
+  {
+    char ar_name[16];		/* Member file name, sometimes / terminated. */
+    char ar_date[12];		/* File date, decimal seconds since Epoch.  */
+    char ar_uid[6], ar_gid[6];	/* User and group IDs, in ASCII decimal.  */
+    char ar_mode[8];		/* File mode, in ASCII octal.  */
+    char ar_size[10];		/* File size, in ASCII decimal.  */
+    char ar_fmag[2];		/* Always contains ARFMAG.  */
+  };
+
+__END_DECLS
+
+#endif /* ar.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/bits/error.h b/ap/libc/glibc/glibc-2.22/misc/bits/error.h
new file mode 100644
index 0000000..d903bcd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/bits/error.h
@@ -0,0 +1,73 @@
+/* Specializations for error functions.
+   Copyright (C) 2007-2015 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/>.  */
+
+#ifndef	_ERROR_H
+# error "Never include <bits/error.h> directly; use <error.h> instead."
+#endif
+
+
+extern void __REDIRECT (__error_alias, (int __status, int __errnum,
+					const char *__format, ...),
+			error)
+  __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __REDIRECT (__error_noreturn, (int __status, int __errnum,
+					   const char *__format, ...),
+			error)
+  __attribute__ ((__noreturn__, __format__ (__printf__, 3, 4)));
+
+
+/* If we know the function will never return make sure the compiler
+   realizes that, too.  */
+__extern_always_inline void
+error (int __status, int __errnum, const char *__format, ...)
+{
+  if (__builtin_constant_p (__status) && __status != 0)
+    __error_noreturn (__status, __errnum, __format, __va_arg_pack ());
+  else
+    __error_alias (__status, __errnum, __format, __va_arg_pack ());
+}
+
+
+extern void __REDIRECT (__error_at_line_alias, (int __status, int __errnum,
+						const char *__fname,
+						unsigned int __line,
+						const char *__format, ...),
+			error_at_line)
+  __attribute__ ((__format__ (__printf__, 5, 6)));
+extern void __REDIRECT (__error_at_line_noreturn, (int __status, int __errnum,
+						   const char *__fname,
+						   unsigned int __line,
+						   const char *__format,
+						   ...),
+			error_at_line)
+  __attribute__ ((__noreturn__, __format__ (__printf__, 5, 6)));
+
+
+/* If we know the function will never return make sure the compiler
+   realizes that, too.  */
+__extern_always_inline void
+error_at_line (int __status, int __errnum, const char *__fname,
+	       unsigned int __line, const char *__format, ...)
+{
+  if (__builtin_constant_p (__status) && __status != 0)
+    __error_at_line_noreturn (__status, __errnum, __fname, __line, __format,
+			      __va_arg_pack ());
+  else
+    __error_at_line_alias (__status, __errnum, __fname, __line,
+			   __format, __va_arg_pack ());
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/bits/select2.h b/ap/libc/glibc/glibc-2.22/misc/bits/select2.h
new file mode 100644
index 0000000..9b37e3b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/bits/select2.h
@@ -0,0 +1,35 @@
+/* Checking macros for select functions.
+   Copyright (C) 2011-2015 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/>.  */
+
+#ifndef _SYS_SELECT_H
+# error "Never include <bits/select2.h> directly; use <sys/select.h> instead."
+#endif
+
+/* Helper functions to issue warnings and errors when needed.  */
+extern long int __fdelt_chk (long int __d);
+extern long int __fdelt_warn (long int __d)
+  __warnattr ("bit outside of fd_set selected");
+#undef __FD_ELT
+#define	__FD_ELT(d) \
+  __extension__								    \
+  ({ long int __d = (d);						    \
+     (__builtin_constant_p (__d)					    \
+      ? (0 <= __d && __d < __FD_SETSIZE					    \
+	 ? (__d / __NFDBITS)						    \
+	 : __fdelt_warn (__d))						    \
+      : __fdelt_chk (__d)); })
diff --git a/ap/libc/glibc/glibc-2.22/misc/bits/stab.def b/ap/libc/glibc/glibc-2.22/misc/bits/stab.def
new file mode 100644
index 0000000..68df2db
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/bits/stab.def
@@ -0,0 +1,233 @@
+/* Table of DBX symbol codes for the GNU system.
+   Copyright (C) 1988, 1997-2015 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/>.  */
+
+/* This contains contribution from Cygnus Support.  */
+
+/* Global variable.  Only the name is significant.
+   To find the address, look in the corresponding external symbol.  */
+__define_stab (N_GSYM, 0x20, "GSYM")
+
+/* Function name for BSD Fortran.  Only the name is significant.
+   To find the address, look in the corresponding external symbol.  */
+__define_stab (N_FNAME, 0x22, "FNAME")
+
+/* Function name or text-segment variable for C.  Value is its address.
+   Desc is supposedly starting line number, but GCC doesn't set it
+   and DBX seems not to miss it.  */
+__define_stab (N_FUN, 0x24, "FUN")
+
+/* Data-segment variable with internal linkage.  Value is its address.
+   "Static Sym".  */
+__define_stab (N_STSYM, 0x26, "STSYM")
+
+/* BSS-segment variable with internal linkage.  Value is its address.  */
+__define_stab (N_LCSYM, 0x28, "LCSYM")
+
+/* Name of main routine.  Only the name is significant.
+   This is not used in C.  */
+__define_stab (N_MAIN, 0x2a, "MAIN")
+
+/* Global symbol in Pascal.
+   Supposedly the value is its line number; I'm skeptical.  */
+__define_stab (N_PC, 0x30, "PC")
+
+/* Number of symbols:  0, files,,funcs,lines according to Ultrix V4.0. */
+__define_stab (N_NSYMS, 0x32, "NSYMS")
+
+/* "No DST map for sym: name, ,0,type,ignored"  according to Ultrix V4.0. */
+__define_stab (N_NOMAP, 0x34, "NOMAP")
+
+/* New stab from Solaris.  I don't know what it means, but it
+   don't seem to contain useful information.  */
+__define_stab (N_OBJ, 0x38, "OBJ")
+
+/* New stab from Solaris.  I don't know what it means, but it
+   don't seem to contain useful information.  Possibly related to the
+   optimization flags used in this module.  */
+__define_stab (N_OPT, 0x3c, "OPT")
+
+/* Register variable.  Value is number of register.  */
+__define_stab (N_RSYM, 0x40, "RSYM")
+
+/* Modula-2 compilation unit.  Can someone say what info it contains?  */
+__define_stab (N_M2C, 0x42, "M2C")
+
+/* Line number in text segment.  Desc is the line number;
+   value is corresponding address.  */
+__define_stab (N_SLINE, 0x44, "SLINE")
+
+/* Similar, for data segment.  */
+__define_stab (N_DSLINE, 0x46, "DSLINE")
+
+/* Similar, for bss segment.  */
+__define_stab (N_BSLINE, 0x48, "BSLINE")
+
+/* Sun's source-code browser stabs.  ?? Don't know what the fields are.
+   Supposedly the field is "path to associated .cb file".  THIS VALUE
+   OVERLAPS WITH N_BSLINE!  */
+__define_stab (N_BROWS, 0x48, "BROWS")
+
+/* GNU Modula-2 definition module dependency.  Value is the modification time
+   of the definition file.  Other is non-zero if it is imported with the
+   GNU M2 keyword %INITIALIZE.  Perhaps N_M2C can be used if there
+   are enough empty fields? */
+__define_stab(N_DEFD, 0x4a, "DEFD")
+
+/* THE FOLLOWING TWO STAB VALUES CONFLICT.  Happily, one is for Modula-2
+   and one is for C++.   Still,... */
+/* GNU C++ exception variable.  Name is variable name.  */
+__define_stab (N_EHDECL, 0x50, "EHDECL")
+/* Modula2 info "for imc":  name,,0,0,0  according to Ultrix V4.0.  */
+__define_stab (N_MOD2, 0x50, "MOD2")
+
+/* GNU C++ `catch' clause.  Value is its address.  Desc is nonzero if
+   this entry is immediately followed by a CAUGHT stab saying what exception
+   was caught.  Multiple CAUGHT stabs means that multiple exceptions
+   can be caught here.  If Desc is 0, it means all exceptions are caught
+   here.  */
+__define_stab (N_CATCH, 0x54, "CATCH")
+
+/* Structure or union element.  Value is offset in the structure.  */
+__define_stab (N_SSYM, 0x60, "SSYM")
+
+/* Name of main source file.
+   Value is starting text address of the compilation.  */
+__define_stab (N_SO, 0x64, "SO")
+
+/* Automatic variable in the stack.  Value is offset from frame pointer.
+   Also used for type descriptions.  */
+__define_stab (N_LSYM, 0x80, "LSYM")
+
+/* Beginning of an include file.  Only Sun uses this.
+   In an object file, only the name is significant.
+   The Sun linker puts data into some of the other fields.  */
+__define_stab (N_BINCL, 0x82, "BINCL")
+
+/* Name of sub-source file (#include file).
+   Value is starting text address of the compilation.  */
+__define_stab (N_SOL, 0x84, "SOL")
+
+/* Parameter variable.  Value is offset from argument pointer.
+   (On most machines the argument pointer is the same as the frame pointer.  */
+__define_stab (N_PSYM, 0xa0, "PSYM")
+
+/* End of an include file.  No name.
+   This and N_BINCL act as brackets around the file's output.
+   In an object file, there is no significant data in this entry.
+   The Sun linker puts data into some of the fields.  */
+__define_stab (N_EINCL, 0xa2, "EINCL")
+
+/* Alternate entry point.  Value is its address.  */
+__define_stab (N_ENTRY, 0xa4, "ENTRY")
+
+/* Beginning of lexical block.
+   The desc is the nesting level in lexical blocks.
+   The value is the address of the start of the text for the block.
+   The variables declared inside the block *precede* the N_LBRAC symbol.  */
+__define_stab (N_LBRAC, 0xc0, "LBRAC")
+
+/* Place holder for deleted include file.  Replaces a N_BINCL and everything
+   up to the corresponding N_EINCL.  The Sun linker generates these when
+   it finds multiple identical copies of the symbols from an include file.
+   This appears only in output from the Sun linker.  */
+__define_stab (N_EXCL, 0xc2, "EXCL")
+
+/* Modula-2 scope information.  Can someone say what info it contains?  */
+__define_stab (N_SCOPE, 0xc4, "SCOPE")
+
+/* End of a lexical block.  Desc matches the N_LBRAC's desc.
+   The value is the address of the end of the text for the block.  */
+__define_stab (N_RBRAC, 0xe0, "RBRAC")
+
+/* Begin named common block.  Only the name is significant.  */
+__define_stab (N_BCOMM, 0xe2, "BCOMM")
+
+/* End named common block.  Only the name is significant
+   (and it should match the N_BCOMM).  */
+__define_stab (N_ECOMM, 0xe4, "ECOMM")
+
+/* End common (local name): value is address.
+   I'm not sure how this is used.  */
+__define_stab (N_ECOML, 0xe8, "ECOML")
+
+/* These STAB's are used on Gould systems for Non-Base register symbols
+   or something like that.  FIXME.  I have assigned the values at random
+   since I don't have a Gould here.  Fixups from Gould folk welcome... */
+__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
+__define_stab (N_NBDATA, 0xF2, "NBDATA")
+__define_stab (N_NBBSS,  0xF4, "NBBSS")
+__define_stab (N_NBSTS,  0xF6, "NBSTS")
+__define_stab (N_NBLCS,  0xF8, "NBLCS")
+
+/* Second symbol entry containing a length-value for the preceding entry.
+   The value is the length.  */
+__define_stab (N_LENG, 0xfe, "LENG")
+
+/* The above information, in matrix format.
+
+			STAB MATRIX
+	_________________________________________________
+	| 00 - 1F are not dbx stab symbols		|
+	| In most cases, the low bit is the EXTernal bit|
+
+	| 00 UNDEF  | 02 ABS	| 04 TEXT   | 06 DATA	|
+	| 01  |EXT  | 03  |EXT	| 05  |EXT  | 07  |EXT	|
+
+	| 08 BSS    | 0A INDR	| 0C FN_SEQ | 0E   	|
+	| 09  |EXT  | 0B 	| 0D	    | 0F	|
+
+	| 10 	    | 12 COMM	| 14 SETA   | 16 SETT	|
+	| 11	    | 13	| 15 	    | 17	|
+
+	| 18 SETD   | 1A SETB	| 1C SETV   | 1E WARNING|
+	| 19	    | 1B	| 1D 	    | 1F FN	|
+
+	|_______________________________________________|
+	| Debug entries with bit 01 set are unused.	|
+	| 20 GSYM   | 22 FNAME	| 24 FUN    | 26 STSYM	|
+	| 28 LCSYM  | 2A MAIN	| 2C	    | 2E	|
+	| 30 PC	    | 32 NSYMS	| 34 NOMAP  | 36	|
+	| 38 OBJ    | 3A	| 3C OPT    | 3E	|
+	| 40 RSYM   | 42 M2C	| 44 SLINE  | 46 DSLINE |
+	| 48 BSLINE*| 4A DEFD	| 4C        | 4E	|
+	| 50 EHDECL*| 52	| 54 CATCH  | 56        |
+	| 58        | 5A        | 5C        | 5E	|
+	| 60 SSYM   | 62	| 64 SO	    | 66 	|
+	| 68 	    | 6A	| 6C	    | 6E	|
+	| 70	    | 72	| 74	    | 76	|
+	| 78	    | 7A	| 7C	    | 7E	|
+	| 80 LSYM   | 82 BINCL	| 84 SOL    | 86	|
+	| 88	    | 8A	| 8C	    | 8E	|
+	| 90	    | 92	| 94	    | 96	|
+	| 98	    | 9A	| 9C	    | 9E	|
+	| A0 PSYM   | A2 EINCL	| A4 ENTRY  | A6	|
+	| A8	    | AA	| AC	    | AE	|
+	| B0	    | B2	| B4	    | B6	|
+	| B8	    | BA	| BC	    | BE	|
+	| C0 LBRAC  | C2 EXCL	| C4 SCOPE  | C6	|
+	| C8	    | CA	| CC	    | CE	|
+	| D0	    | D2	| D4	    | D6	|
+	| D8	    | DA	| DC	    | DE	|
+	| E0 RBRAC  | E2 BCOMM	| E4 ECOMM  | E6	|
+	| E8 ECOML  | EA	| EC	    | EE	|
+	| F0	    | F2	| F4	    | F6	|
+	| F8	    | FA	| FC	    | FE LENG	|
+	+-----------------------------------------------+
+ * 50 EHDECL is also MOD2.
+ * 48 BSLINE is also BROWS.
+ */
diff --git a/ap/libc/glibc/glibc-2.22/misc/bits/syslog-ldbl.h b/ap/libc/glibc/glibc-2.22/misc/bits/syslog-ldbl.h
new file mode 100644
index 0000000..7e5362d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/bits/syslog-ldbl.h
@@ -0,0 +1,35 @@
+/* -mlong-double-64 compatibility mode for syslog functions.
+   Copyright (C) 2006-2015 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/>.  */
+
+#ifndef _SYS_SYSLOG_H
+# error "Never include <bits/syslog-ldbl.h> directly; use <sys/syslog.h> instead."
+#endif
+
+__LDBL_REDIR_DECL (syslog)
+
+#ifdef __USE_MISC
+__LDBL_REDIR_DECL (vsyslog)
+#endif
+
+#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
+__LDBL_REDIR_DECL (__syslog_chk)
+
+# ifdef __USE_MISC
+__LDBL_REDIR_DECL (__vsyslog_chk)
+# endif
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/bits/syslog.h b/ap/libc/glibc/glibc-2.22/misc/bits/syslog.h
new file mode 100644
index 0000000..7a84be4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/bits/syslog.h
@@ -0,0 +1,49 @@
+/* Checking macros for syslog functions.
+   Copyright (C) 2005-2015 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/>.  */
+
+#ifndef _SYS_SYSLOG_H
+# error "Never include <bits/syslog.h> directly; use <sys/syslog.h> instead."
+#endif
+
+
+extern void __syslog_chk (int __pri, int __flag, const char *__fmt, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+
+#ifdef __va_arg_pack
+__fortify_function void
+syslog (int __pri, const char *__fmt, ...)
+{
+  __syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
+}
+#elif !defined __cplusplus
+# define syslog(pri, ...) \
+  __syslog_chk (pri, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
+#endif
+
+
+#ifdef __USE_MISC
+extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt,
+			   __gnuc_va_list __ap)
+     __attribute__ ((__format__ (__printf__, 3, 0)));
+
+__fortify_function void
+vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
+{
+  __vsyslog_chk (__pri,  __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
+}
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/brk.c b/ap/libc/glibc/glibc-2.22/misc/brk.c
new file mode 100644
index 0000000..28c4203
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/brk.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* sbrk.c expects this.  */
+void *__curbrk;
+
+/* Set the end of the process's data space to ADDR.
+   Return 0 if successful, -1 if not.  */
+int
+__brk (addr)
+     void *addr;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (brk)
+
+weak_alias (__brk, brk)
diff --git a/ap/libc/glibc/glibc-2.22/misc/bug-hsearch1.c b/ap/libc/glibc/glibc-2.22/misc/bug-hsearch1.c
new file mode 100644
index 0000000..6097b5a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/bug-hsearch1.c
@@ -0,0 +1,31 @@
+#include <search.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  if (hcreate (1) == 0)
+    {
+      puts ("hcreate failed");
+      return 1;
+    }
+  ENTRY e;
+  e.key = (char *) "a";
+  e.data = (char *) "b";
+  if (hsearch (e, ENTER) == NULL)
+    {
+      puts ("ENTER failed");
+      return 1;
+    }
+  ENTRY s;
+  s.key = (char *) "c";
+  if (hsearch (s, FIND) != NULL)
+    {
+      puts ("FIND succeeded");
+      return 1;
+    }
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/chflags.c b/ap/libc/glibc/glibc-2.22/misc/chflags.c
new file mode 100644
index 0000000..241be86
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/chflags.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991-2015 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 <sys/stat.h>
+
+/* Change the flags of FILE to FLAGS.  */
+
+int chflags (const char *file, unsigned long int flags) __THROW;
+
+int
+chflags (file, flags)
+     const char *file;
+     unsigned long int flags;
+{
+  if (file == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (chflags)
diff --git a/ap/libc/glibc/glibc-2.22/misc/chroot.c b/ap/libc/glibc/glibc-2.22/misc/chroot.c
new file mode 100644
index 0000000..232a29f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/chroot.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Make PATH be the root directory (the starting point for absolute paths).
+   This call is restricted to the super-user.  */
+int
+chroot (path)
+     const char *path;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+
+stub_warning (chroot)
diff --git a/ap/libc/glibc/glibc-2.22/misc/daemon.c b/ap/libc/glibc/glibc-2.22/misc/daemon.c
new file mode 100644
index 0000000..7597ce9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/daemon.c
@@ -0,0 +1,94 @@
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)daemon.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <paths.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#include <device-nrs.h>
+#include <not-cancel.h>
+
+int
+daemon(nochdir, noclose)
+	int nochdir, noclose;
+{
+	int fd;
+
+	switch (__fork()) {
+	case -1:
+		return (-1);
+	case 0:
+		break;
+	default:
+		_exit(0);
+	}
+
+	if (__setsid() == -1)
+		return (-1);
+
+	if (!nochdir)
+		(void)__chdir("/");
+
+	if (!noclose) {
+		struct stat64 st;
+
+		if ((fd = open_not_cancel(_PATH_DEVNULL, O_RDWR, 0)) != -1
+		    && (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0)
+			== 0)) {
+			if (__builtin_expect (S_ISCHR (st.st_mode), 1) != 0
+#if defined DEV_NULL_MAJOR && defined DEV_NULL_MINOR
+			    && (st.st_rdev
+				== makedev (DEV_NULL_MAJOR, DEV_NULL_MINOR))
+#endif
+			    ) {
+				(void)__dup2(fd, STDIN_FILENO);
+				(void)__dup2(fd, STDOUT_FILENO);
+				(void)__dup2(fd, STDERR_FILENO);
+				if (fd > 2)
+					(void)__close (fd);
+			} else {
+				/* We must set an errno value since no
+				   function call actually failed.  */
+				close_not_cancel_no_status (fd);
+				__set_errno (ENODEV);
+				return -1;
+			}
+		} else {
+			close_not_cancel_no_status (fd);
+			return -1;
+		}
+	}
+	return (0);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/dirname.c b/ap/libc/glibc/glibc-2.22/misc/dirname.c
new file mode 100644
index 0000000..0ddae88
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/dirname.c
@@ -0,0 +1,80 @@
+/* dirname - return directory part of PATH.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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 <libgen.h>
+#include <string.h>
+
+
+char *
+dirname (char *path)
+{
+  static const char dot[] = ".";
+  char *last_slash;
+
+  /* Find last '/'.  */
+  last_slash = path != NULL ? strrchr (path, '/') : NULL;
+
+  if (last_slash != NULL && last_slash != path && last_slash[1] == '\0')
+    {
+      /* Determine whether all remaining characters are slashes.  */
+      char *runp;
+
+      for (runp = last_slash; runp != path; --runp)
+	if (runp[-1] != '/')
+	  break;
+
+      /* The '/' is the last character, we have to look further.  */
+      if (runp != path)
+	last_slash = __memrchr (path, '/', runp - path);
+    }
+
+  if (last_slash != NULL)
+    {
+      /* Determine whether all remaining characters are slashes.  */
+      char *runp;
+
+      for (runp = last_slash; runp != path; --runp)
+	if (runp[-1] != '/')
+	  break;
+
+      /* Terminate the path.  */
+      if (runp == path)
+	{
+	  /* The last slash is the first character in the string.  We have to
+	     return "/".  As a special case we have to return "//" if there
+	     are exactly two slashes at the beginning of the string.  See
+	     XBD 4.10 Path Name Resolution for more information.  */
+	  if (last_slash == path + 1)
+	    ++last_slash;
+	  else
+	    last_slash = path + 1;
+	}
+      else
+	last_slash = runp;
+
+      last_slash[0] = '\0';
+    }
+  else
+    /* This assignment is ill-designed but the XPG specs require to
+       return a string containing "." in any case no directory part is
+       found and so a static and constant string is required.  */
+    path = (char *) dot;
+
+  return path;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/efgcvt.c b/ap/libc/glibc/glibc-2.22/misc/efgcvt.c
new file mode 100644
index 0000000..7c79391
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/efgcvt.c
@@ -0,0 +1,131 @@
+/* Compatibility functions for floating point formatting.
+   Copyright (C) 1995-2015 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 <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <float.h>
+#include <bits/libc-lock.h>
+#include <math_ldbl_opt.h>
+
+#ifndef FLOAT_TYPE
+# define FLOAT_TYPE double
+# define FUNC_PREFIX
+# define FLOAT_FMT_FLAG
+/* Actually we have to write (DBL_DIG + log10 (DBL_MAX_10_EXP)) but we
+   don't have log10 available in the preprocessor.  */
+# define MAXDIG (NDIGIT_MAX + 3)
+# define FCVT_MAXDIG (DBL_MAX_10_EXP + MAXDIG)
+# if DBL_MANT_DIG == 53
+#  define NDIGIT_MAX 17
+# elif DBL_MANT_DIG == 24
+#  define NDIGIT_MAX 9
+# elif DBL_MANT_DIG == 56
+#  define NDIGIT_MAX 18
+# else
+/* See IEEE 854 5.6, table 2 for this formula.  Unfortunately we need a
+   compile time constant here, so we cannot use it.  */
+#  error "NDIGIT_MAX must be precomputed"
+#  define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * DBL_MANT_DIG + 1.0)))
+# endif
+#else
+# define LONG_DOUBLE_CVT
+#endif
+
+#define APPEND(a, b) APPEND2 (a, b)
+#define APPEND2(a, b) a##b
+#define __APPEND(a, b) __APPEND2 (a, b)
+#define __APPEND2(a, b) __##a##b
+
+
+#define FCVT_BUFFER APPEND (FUNC_PREFIX, fcvt_buffer)
+#define FCVT_BUFPTR APPEND (FUNC_PREFIX, fcvt_bufptr)
+#define ECVT_BUFFER APPEND (FUNC_PREFIX, ecvt_buffer)
+
+
+static char FCVT_BUFFER[MAXDIG];
+static char ECVT_BUFFER[MAXDIG];
+libc_freeres_ptr (static char *FCVT_BUFPTR);
+
+char *
+__APPEND (FUNC_PREFIX, fcvt) (value, ndigit, decpt, sign)
+     FLOAT_TYPE value;
+     int ndigit, *decpt, *sign;
+{
+  if (FCVT_BUFPTR == NULL)
+    {
+      if (__APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign,
+					  FCVT_BUFFER, MAXDIG) != -1)
+	return FCVT_BUFFER;
+
+      FCVT_BUFPTR = (char *) malloc (FCVT_MAXDIG);
+      if (FCVT_BUFPTR == NULL)
+	return FCVT_BUFFER;
+    }
+
+  (void) __APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign,
+					 FCVT_BUFPTR, FCVT_MAXDIG);
+
+  return FCVT_BUFPTR;
+}
+
+
+char *
+__APPEND (FUNC_PREFIX, ecvt) (value, ndigit, decpt, sign)
+     FLOAT_TYPE value;
+     int ndigit, *decpt, *sign;
+{
+  (void) __APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign,
+					 ECVT_BUFFER, MAXDIG);
+
+  return ECVT_BUFFER;
+}
+
+char *
+__APPEND (FUNC_PREFIX, gcvt) (value, ndigit, buf)
+     FLOAT_TYPE value;
+     int ndigit;
+     char *buf;
+{
+  sprintf (buf, "%.*" FLOAT_FMT_FLAG "g", MIN (ndigit, NDIGIT_MAX), value);
+  return buf;
+}
+
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
+# ifdef LONG_DOUBLE_CVT
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (FUNC_PREFIX, symbol), GLIBC_2_4)
+#  define cvt_symbol_1(lib, local, symbol, version) \
+    versioned_symbol (lib, local, symbol, version)
+# else
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (q, symbol), GLIBC_2_0); \
+  strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#  define cvt_symbol_1(lib, local, symbol, version) \
+  compat_symbol (lib, local, symbol, version)
+# endif
+#else
+# define cvt_symbol(symbol) \
+  strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#endif
+cvt_symbol(fcvt);
+cvt_symbol(ecvt);
+cvt_symbol(gcvt);
diff --git a/ap/libc/glibc/glibc-2.22/misc/efgcvt_r.c b/ap/libc/glibc/glibc-2.22/misc/efgcvt_r.c
new file mode 100644
index 0000000..2761222
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/efgcvt_r.c
@@ -0,0 +1,263 @@
+/* Compatibility functions for floating point formatting, reentrant versions.
+   Copyright (C) 1995-2015 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 <float.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <math_ldbl_opt.h>
+
+#ifndef FLOAT_TYPE
+# define FLOAT_TYPE double
+# define FUNC_PREFIX
+# define FLOAT_FMT_FLAG
+# define FLOAT_NAME_EXT
+# define FLOAT_MIN_10_EXP DBL_MIN_10_EXP
+# if DBL_MANT_DIG == 53
+#  define NDIGIT_MAX 17
+# elif DBL_MANT_DIG == 24
+#  define NDIGIT_MAX 9
+# elif DBL_MANT_DIG == 56
+#  define NDIGIT_MAX 18
+# else
+/* See IEEE 854 5.6, table 2 for this formula.  Unfortunately we need a
+   compile time constant here, so we cannot use it.  */
+#  error "NDIGIT_MAX must be precomputed"
+#  define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * DBL_MANT_DIG + 1.0)))
+# endif
+# if DBL_MIN_10_EXP == -37
+#  define FLOAT_MIN_10_NORM	1.0e-37
+# elif DBL_MIN_10_EXP == -307
+#  define FLOAT_MIN_10_NORM	1.0e-307
+# elif DBL_MIN_10_EXP == -4931
+#  define FLOAT_MIN_10_NORM	1.0e-4931
+# else
+/* libc can't depend on libm.  */
+#  error "FLOAT_MIN_10_NORM must be precomputed"
+#  define FLOAT_MIN_10_NORM	exp10 (DBL_MIN_10_EXP)
+# endif
+#else
+# define LONG_DOUBLE_CVT
+#endif
+
+#define APPEND(a, b) APPEND2 (a, b)
+#define APPEND2(a, b) a##b
+#define __APPEND(a, b) __APPEND2 (a, b)
+#define __APPEND2(a, b) __##a##b
+
+#define FLOOR APPEND(floor, FLOAT_NAME_EXT)
+#define FABS APPEND(fabs, FLOAT_NAME_EXT)
+#define LOG10 APPEND(log10, FLOAT_NAME_EXT)
+#define EXP APPEND(exp, FLOAT_NAME_EXT)
+
+
+int
+__APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
+     FLOAT_TYPE value;
+     int ndigit, *decpt, *sign;
+     char *buf;
+     size_t len;
+{
+  ssize_t n;
+  ssize_t i;
+  int left;
+
+  if (buf == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  left = 0;
+  if (isfinite (value))
+    {
+      *sign = signbit (value) != 0;
+      if (*sign)
+	value = -value;
+
+      if (ndigit < 0)
+	{
+	  /* Rounding to the left of the decimal point.  */
+	  while (ndigit < 0)
+	    {
+	      FLOAT_TYPE new_value = value * 0.1;
+
+	      if (new_value < 1.0)
+		{
+		  ndigit = 0;
+		  break;
+		}
+
+	      value = new_value;
+	      ++left;
+	      ++ndigit;
+	    }
+	}
+    }
+  else
+    /* Value is Inf or NaN.  */
+    *sign = 0;
+
+  n = __snprintf (buf, len, "%.*" FLOAT_FMT_FLAG "f", MIN (ndigit, NDIGIT_MAX),
+		  value);
+  /* Check for a too small buffer.  */
+  if (n >= (ssize_t) len)
+    return -1;
+
+  i = 0;
+  while (i < n && isdigit (buf[i]))
+    ++i;
+  *decpt = i;
+
+  if (i == 0)
+    /* Value is Inf or NaN.  */
+    return 0;
+
+  if (i < n)
+    {
+      do
+	++i;
+      while (i < n && !isdigit (buf[i]));
+
+      if (*decpt == 1 && buf[0] == '0' && value != 0.0)
+	{
+	  /* We must not have leading zeroes.  Strip them all out and
+	     adjust *DECPT if necessary.  */
+	  --*decpt;
+	  while (i < n && buf[i] == '0')
+	    {
+	      --*decpt;
+	      ++i;
+	    }
+	}
+
+      memmove (&buf[MAX (*decpt, 0)], &buf[i], n - i);
+      buf[n - (i - MAX (*decpt, 0))] = '\0';
+    }
+
+  if (left)
+    {
+      *decpt += left;
+      if ((ssize_t) --len > n)
+	{
+	  while (left-- > 0 && n < (ssize_t) len)
+	    buf[n++] = '0';
+	  buf[n] = '\0';
+	}
+    }
+
+  return 0;
+}
+
+int
+__APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len)
+     FLOAT_TYPE value;
+     int ndigit, *decpt, *sign;
+     char *buf;
+     size_t len;
+{
+  int exponent = 0;
+
+  if (isfinite (value) && value != 0.0)
+    {
+      /* Slow code that doesn't require -lm functions.  */
+      FLOAT_TYPE d;
+      FLOAT_TYPE f = 1.0;
+      if (value < 0.0)
+	d = -value;
+      else
+	d = value;
+      /* For denormalized numbers the d < 1.0 case below won't work,
+	 as f can overflow to +Inf.  */
+      if (d < FLOAT_MIN_10_NORM)
+	{
+	  value /= FLOAT_MIN_10_NORM;
+	  if (value < 0.0)
+	    d = -value;
+	  else
+	    d = value;
+	  exponent += FLOAT_MIN_10_EXP;
+	}
+      if (d < 1.0)
+	{
+	  do
+	    {
+	      f *= 10.0;
+	      --exponent;
+	    }
+	  while (d * f < 1.0);
+
+	  value *= f;
+	}
+      else if (d >= 10.0)
+	{
+	  do
+	    {
+	      f *= 10;
+	      ++exponent;
+	    }
+	  while (d >= f * 10.0);
+
+	  value /= f;
+	}
+    }
+  else if (value == 0.0)
+    /* SUSv2 leaves it unspecified whether *DECPT is 0 or 1 for 0.0.
+       This could be changed to -1 if we want to return 0.  */
+    exponent = 0;
+
+  if (ndigit <= 0 && len > 0)
+    {
+      buf[0] = '\0';
+      *decpt = 1;
+      *sign = isfinite (value) ? signbit (value) != 0 : 0;
+    }
+  else
+    if (__APPEND (FUNC_PREFIX, fcvt_r) (value, MIN (ndigit, NDIGIT_MAX) - 1,
+					decpt, sign, buf, len))
+      return -1;
+
+  *decpt += exponent;
+  return 0;
+}
+
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
+# ifdef LONG_DOUBLE_CVT
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (FUNC_PREFIX, symbol), GLIBC_2_4)
+#  define cvt_symbol_1(lib, local, symbol, version) \
+    versioned_symbol (lib, local, symbol, version)
+# else
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (q, symbol), GLIBC_2_0); \
+  weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#  define cvt_symbol_1(lib, local, symbol, version) \
+  compat_symbol (lib, local, symbol, version)
+# endif
+#else
+# define cvt_symbol(symbol) \
+  weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#endif
+cvt_symbol(fcvt_r);
+cvt_symbol(ecvt_r);
diff --git a/ap/libc/glibc/glibc-2.22/misc/err.c b/ap/libc/glibc/glibc-2.22/misc/err.c
new file mode 100644
index 0000000..7b98157
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/err.c
@@ -0,0 +1,179 @@
+/* 4.4BSD utility functions for error messages.
+   Copyright (C) 1995-2015 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 <stdarg.h>
+#include <err.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <wchar.h>
+#define flockfile(s) _IO_flockfile (s)
+#define funlockfile(s) _IO_funlockfile (s)
+
+extern char *__progname;
+
+#define VA(call)							      \
+{									      \
+  va_list ap;								      \
+  va_start (ap, format);						      \
+  call;									      \
+  va_end (ap);								      \
+}
+
+static void
+convert_and_print (const char *format, __gnuc_va_list ap)
+{
+#define ALLOCA_LIMIT	2000
+  size_t len;
+  wchar_t *wformat = NULL;
+  mbstate_t st;
+  size_t res;
+  const char *tmp;
+
+  if (format == NULL)
+    return;
+
+  len = strlen (format) + 1;
+
+  do
+    {
+      if (len < ALLOCA_LIMIT)
+	wformat = (wchar_t *) alloca (len * sizeof (wchar_t));
+      else
+	{
+	  if (wformat != NULL && len / 2 < ALLOCA_LIMIT)
+	    wformat = NULL;
+
+	  wformat = (wchar_t *) realloc (wformat, len * sizeof (wchar_t));
+
+	  if (wformat == NULL)
+	    {
+	      fputws_unlocked (L"out of memory\n", stderr);
+	      return;
+	    }
+	}
+
+      memset (&st, '\0', sizeof (st));
+      tmp =format;
+    }
+  while ((res = __mbsrtowcs (wformat, &tmp, len, &st)) == len);
+
+  if (res == (size_t) -1)
+    /* The string cannot be converted.  */
+    wformat = (wchar_t *) L"???";
+
+  __vfwprintf (stderr, wformat, ap);
+}
+
+void
+vwarnx (const char *format, __gnuc_va_list ap)
+{
+  flockfile (stderr);
+  if (_IO_fwide (stderr, 0) > 0)
+    {
+      __fwprintf (stderr, L"%s: ", __progname);
+      convert_and_print (format, ap);
+      putwc_unlocked (L'\n', stderr);
+    }
+  else
+    {
+      fprintf (stderr, "%s: ", __progname);
+      if (format)
+	vfprintf (stderr, format, ap);
+      putc_unlocked ('\n', stderr);
+    }
+  funlockfile (stderr);
+}
+libc_hidden_def (vwarnx)
+
+void
+vwarn (const char *format, __gnuc_va_list ap)
+{
+  int error = errno;
+
+  flockfile (stderr);
+  if (_IO_fwide (stderr, 0) > 0)
+    {
+      __fwprintf (stderr, L"%s: ", __progname);
+      if (format)
+	{
+	  convert_and_print (format, ap);
+	  fputws_unlocked (L": ", stderr);
+	}
+      __set_errno (error);
+      __fwprintf (stderr, L"%m\n");
+    }
+  else
+    {
+      fprintf (stderr, "%s: ", __progname);
+      if (format)
+	{
+	  vfprintf (stderr, format, ap);
+	  fputs_unlocked (": ", stderr);
+	}
+      __set_errno (error);
+      fprintf (stderr, "%m\n");
+    }
+  funlockfile (stderr);
+}
+libc_hidden_def (vwarn)
+
+
+void
+warn (const char *format, ...)
+{
+  VA (vwarn (format, ap))
+}
+libc_hidden_def (warn)
+
+void
+warnx (const char *format, ...)
+{
+  VA (vwarnx (format, ap))
+}
+libc_hidden_def (warnx)
+
+void
+verr (int status, const char *format, __gnuc_va_list ap)
+{
+  vwarn (format, ap);
+  exit (status);
+}
+libc_hidden_def (verr)
+
+void
+verrx (int status, const char *format, __gnuc_va_list ap)
+{
+  vwarnx (format, ap);
+  exit (status);
+}
+libc_hidden_def (verrx)
+
+void
+err (int status, const char *format, ...)
+{
+  VA (verr (status, format, ap))
+}
+
+void
+errx (int status, const char *format, ...)
+{
+  VA (verrx (status, format, ap))
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/err.h b/ap/libc/glibc/glibc-2.22/misc/err.h
new file mode 100644
index 0000000..99e1cdd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/err.h
@@ -0,0 +1,57 @@
+/* 4.4BSD utility functions for error messages.
+   Copyright (C) 1995-2015 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/>.  */
+
+#ifndef	_ERR_H
+#define	_ERR_H	1
+
+#include <features.h>
+
+#define	__need___va_list
+#include <stdarg.h>
+#ifndef	__GNUC_VA_LIST
+# define __gnuc_va_list	__ptr_t
+#endif
+
+__BEGIN_DECLS
+
+/* Print "program: ", FORMAT, ": ", the standard error string for errno,
+   and a newline, on stderr.  */
+extern void warn (const char *__format, ...)
+     __attribute__ ((__format__ (__printf__, 1, 2)));
+extern void vwarn (const char *__format, __gnuc_va_list)
+     __attribute__ ((__format__ (__printf__, 1, 0)));
+
+/* Likewise, but without ": " and the standard error string.  */
+extern void warnx (const char *__format, ...)
+     __attribute__ ((__format__ (__printf__, 1, 2)));
+extern void vwarnx (const char *__format, __gnuc_va_list)
+     __attribute__ ((__format__ (__printf__, 1, 0)));
+
+/* Likewise, and then exit with STATUS.  */
+extern void err (int __status, const char *__format, ...)
+     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
+extern void verr (int __status, const char *__format, __gnuc_va_list)
+     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
+extern void errx (int __status, const char *__format, ...)
+     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
+extern void verrx (int __status, const char *, __gnuc_va_list)
+     __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
+
+__END_DECLS
+
+#endif	/* err.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/error.c b/ap/libc/glibc/glibc-2.22/misc/error.c
new file mode 100644
index 0000000..aaa120d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/error.c
@@ -0,0 +1,407 @@
+/* Error handler for noninteractive utilities
+   Copyright (C) 1990-2015 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/>.  */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+#include "error.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !_LIBC && ENABLE_NLS
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
+# define USE_UNLOCKED_IO 0
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
+# define _GL_ARG_NONNULL(a)
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+void (*error_print_progname) (void);
+
+/* This variable is incremented each time 'error' is called.  */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this.  */
+
+# define program_name program_invocation_name
+# include <errno.h>
+# include <limits.h>
+# include <libio/libioP.h>
+
+/* In GNU libc we want do not want to use the common name 'error' directly.
+   Instead make it a weak alias.  */
+extern void __error (int status, int errnum, const char *message, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __error_at_line (int status, int errnum, const char *file_name,
+			     unsigned int line_number, const char *message,
+			     ...)
+     __attribute__ ((__format__ (__printf__, 5, 6)));;
+# define error __error
+# define error_at_line __error_at_line
+
+# include <libio/iolibio.h>
+# define fflush(s) _IO_fflush (s)
+# undef putc
+# define putc(c, fp) _IO_putc (c, fp)
+
+# include <bits/libc-lock.h>
+
+#else /* not _LIBC */
+
+# include <fcntl.h>
+# include <unistd.h>
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the native Windows API functions.  */
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+/* Get _get_osfhandle.  */
+#  include "msvc-nothrow.h"
+# endif
+
+/* The gnulib override of fcntl is not needed in this file.  */
+# undef fcntl
+
+# if !HAVE_DECL_STRERROR_R
+#  ifndef HAVE_DECL_STRERROR_R
+"this configure-time declaration test was not run"
+#  endif
+#  if STRERROR_R_CHAR_P
+char *strerror_r ();
+#  else
+int strerror_r ();
+#  endif
+# endif
+
+/* The calling program should define program_name and set it to the
+   name of the executing program.  */
+extern char *program_name;
+
+# if HAVE_STRERROR_R || defined strerror_r
+#  define __strerror_r strerror_r
+# endif	/* HAVE_STRERROR_R || defined strerror_r */
+#endif	/* not _LIBC */
+
+#if !_LIBC
+/* Return non-zero if FD is open.  */
+static int
+is_open (int fd)
+{
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* On native Windows: The initial state of unassigned standard file
+     descriptors is that they are open but point to an INVALID_HANDLE_VALUE.
+     There is no fcntl, and the gnulib replacement fcntl does not support
+     F_GETFL.  */
+  return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+# else
+#  ifndef F_GETFL
+#   error Please port fcntl to your platform
+#  endif
+  return 0 <= fcntl (fd, F_GETFL);
+# endif
+}
+#endif
+
+static void
+flush_stdout (void)
+{
+#if !_LIBC
+  int stdout_fd;
+
+# if GNULIB_FREOPEN_SAFER
+  /* Use of gnulib's freopen-safer module normally ensures that
+       fileno (stdout) == 1
+     whenever stdout is open.  */
+  stdout_fd = STDOUT_FILENO;
+# else
+  /* POSIX states that fileno (stdout) after fclose is unspecified.  But in
+     practice it is not a problem, because stdout is statically allocated and
+     the fd of a FILE stream is stored as a field in its allocated memory.  */
+  stdout_fd = fileno (stdout);
+# endif
+  /* POSIX states that fflush (stdout) after fclose is unspecified; it
+     is safe in glibc, but not on all other platforms.  fflush (NULL)
+     is always defined, but too draconian.  */
+  if (0 <= stdout_fd && is_open (stdout_fd))
+#endif
+    fflush (stdout);
+}
+
+static void
+print_errno_message (int errnum)
+{
+  char const *s;
+
+#if defined HAVE_STRERROR_R || _LIBC
+  char errbuf[1024];
+# if _LIBC || STRERROR_R_CHAR_P
+  s = __strerror_r (errnum, errbuf, sizeof errbuf);
+# else
+  if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
+    s = errbuf;
+  else
+    s = 0;
+# endif
+#else
+  s = strerror (errnum);
+#endif
+
+#if !_LIBC
+  if (! s)
+    s = _("Unknown system error");
+#endif
+
+#if _LIBC
+  __fxprintf (NULL, ": %s", s);
+#else
+  fprintf (stderr, ": %s", s);
+#endif
+}
+
+static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
+error_tail (int status, int errnum, const char *message, va_list args)
+{
+#if _LIBC
+  if (_IO_fwide (stderr, 0) > 0)
+    {
+      size_t len = strlen (message) + 1;
+      wchar_t *wmessage = NULL;
+      mbstate_t st;
+      size_t res;
+      const char *tmp;
+      bool use_malloc = false;
+
+      while (1)
+	{
+	  if (__libc_use_alloca (len * sizeof (wchar_t)))
+	    wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+	  else
+	    {
+	      if (!use_malloc)
+		wmessage = NULL;
+
+	      wchar_t *p = (wchar_t *) realloc (wmessage,
+						len * sizeof (wchar_t));
+	      if (p == NULL)
+		{
+		  free (wmessage);
+		  fputws_unlocked (L"out of memory\n", stderr);
+		  return;
+		}
+	      wmessage = p;
+	      use_malloc = true;
+	    }
+
+	  memset (&st, '\0', sizeof (st));
+	  tmp = message;
+
+	  res = mbsrtowcs (wmessage, &tmp, len, &st);
+	  if (res != len)
+	    break;
+
+	  if (__builtin_expect (len >= SIZE_MAX / sizeof (wchar_t) / 2, 0))
+	    {
+	      /* This really should not happen if everything is fine.  */
+	      res = (size_t) -1;
+	      break;
+	    }
+
+	  len *= 2;
+	}
+
+      if (res == (size_t) -1)
+	{
+	  /* The string cannot be converted.  */
+	  if (use_malloc)
+	    {
+	      free (wmessage);
+	      use_malloc = false;
+	    }
+	  wmessage = (wchar_t *) L"???";
+	}
+
+      __vfwprintf (stderr, wmessage, args);
+
+      if (use_malloc)
+	free (wmessage);
+    }
+  else
+#endif
+    vfprintf (stderr, message, args);
+  va_end (args);
+
+  ++error_message_count;
+  if (errnum)
+    print_errno_message (errnum);
+#if _LIBC
+  __fxprintf (NULL, "\n");
+#else
+  putc ('\n', stderr);
+#endif
+  fflush (stderr);
+  if (status)
+    exit (status);
+}
+
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+   format string with optional args.
+   If ERRNUM is nonzero, print its corresponding system error message.
+   Exit with status STATUS if it is nonzero.  */
+void
+error (int status, int errnum, const char *message, ...)
+{
+  va_list args;
+
+#if defined _LIBC && defined __libc_ptf_call
+  /* We do not want this call to be cut short by a thread
+     cancellation.  Therefore disable cancellation for now.  */
+  int state = PTHREAD_CANCEL_ENABLE;
+  __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+		   0);
+#endif
+
+  flush_stdout ();
+#ifdef _LIBC
+  _IO_flockfile (stderr);
+#endif
+  if (error_print_progname)
+    (*error_print_progname) ();
+  else
+    {
+#if _LIBC
+      __fxprintf (NULL, "%s: ", program_name);
+#else
+      fprintf (stderr, "%s: ", program_name);
+#endif
+    }
+
+  va_start (args, message);
+  error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+  _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+  __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+int error_one_per_line;
+
+void
+error_at_line (int status, int errnum, const char *file_name,
+	       unsigned int line_number, const char *message, ...)
+{
+  va_list args;
+
+  if (error_one_per_line)
+    {
+      static const char *old_file_name;
+      static unsigned int old_line_number;
+
+      if (old_line_number == line_number
+	  && (file_name == old_file_name
+	      || (old_file_name != NULL
+		  && file_name != NULL
+		  && strcmp (old_file_name, file_name) == 0)))
+
+	/* Simply return and print nothing.  */
+	return;
+
+      old_file_name = file_name;
+      old_line_number = line_number;
+    }
+
+#if defined _LIBC && defined __libc_ptf_call
+  /* We do not want this call to be cut short by a thread
+     cancellation.  Therefore disable cancellation for now.  */
+  int state = PTHREAD_CANCEL_ENABLE;
+  __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+		   0);
+#endif
+
+  flush_stdout ();
+#ifdef _LIBC
+  _IO_flockfile (stderr);
+#endif
+  if (error_print_progname)
+    (*error_print_progname) ();
+  else
+    {
+#if _LIBC
+      __fxprintf (NULL, "%s:", program_name);
+#else
+      fprintf (stderr, "%s:", program_name);
+#endif
+    }
+
+#if _LIBC
+  __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+	      file_name, line_number);
+#else
+  fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+	   file_name, line_number);
+#endif
+
+  va_start (args, message);
+  error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+  _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+  __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+#ifdef _LIBC
+/* Make the weak alias.  */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/error.h b/ap/libc/glibc/glibc-2.22/misc/error.h
new file mode 100644
index 0000000..7356677
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/error.h
@@ -0,0 +1,57 @@
+/* Declaration for error-reporting function
+   Copyright (C) 1995-2015 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/>.  */
+
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#include <features.h>
+
+
+__BEGIN_DECLS
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
+
+extern void error (int __status, int __errnum, const char *__format, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern void error_at_line (int __status, int __errnum, const char *__fname,
+			   unsigned int __lineno, const char *__format, ...)
+     __attribute__ ((__format__ (__printf__, 5, 6)));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+   name, a colon and a space.  Otherwise, error will call this
+   function without parameters instead.  */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called.  */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line.  This
+   variable controls whether this mode is selected or not.  */
+extern int error_one_per_line;
+
+
+#if defined __extern_always_inline && defined __va_arg_pack
+# include <bits/error.h>
+#endif
+
+__END_DECLS
+
+#endif /* error.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/fchflags.c b/ap/libc/glibc/glibc-2.22/misc/fchflags.c
new file mode 100644
index 0000000..b9f2675
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fchflags.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991-2015 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 <sys/stat.h>
+
+/* Change the flags of the file referenced by FD to FLAGS.  */
+
+int fchflags (int fd, unsigned long int flags) __THROW;
+
+int
+fchflags (fd, flags)
+     int fd;
+     unsigned long int flags;
+{
+  if (fd < 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (fchflags)
diff --git a/ap/libc/glibc/glibc-2.22/misc/fdatasync.c b/ap/libc/glibc/glibc-2.22/misc/fdatasync.c
new file mode 100644
index 0000000..60ebee1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fdatasync.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1996-2015 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 <unistd.h>
+
+
+/* Synchronize at least the data part of a file with the underlying
+   media.  */
+int
+fdatasync (int fildes)
+{
+  return fsync (fildes);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/fgetxattr.c b/ap/libc/glibc/glibc-2.22/misc/fgetxattr.c
new file mode 100644
index 0000000..360a990
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fgetxattr.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+ssize_t
+fgetxattr (int __fd, const char *__name,
+	   void *__value, size_t __size)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (fgetxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/flistxattr.c b/ap/libc/glibc/glibc-2.22/misc/flistxattr.c
new file mode 100644
index 0000000..69562be
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/flistxattr.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+ssize_t
+flistxattr (int __fd, char *__list, size_t __size)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (flistxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/fremovexattr.c b/ap/libc/glibc/glibc-2.22/misc/fremovexattr.c
new file mode 100644
index 0000000..7692319
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fremovexattr.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+int
+fremovexattr (int __fd, const char *__name)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (fremovexattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/fsetxattr.c b/ap/libc/glibc/glibc-2.22/misc/fsetxattr.c
new file mode 100644
index 0000000..500fe47
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fsetxattr.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+int
+fsetxattr (int __fd, const char *__name, const void *__value,
+	   size_t __size, int __flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (fsetxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/fstab.c b/ap/libc/glibc/glibc-2.22/misc/fstab.c
new file mode 100644
index 0000000..2d2e932
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fstab.c
@@ -0,0 +1,188 @@
+/* Copyright (C) 1995-2015 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 <fstab.h>
+#include <mntent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <bits/libc-lock.h>
+
+#define BUFFER_SIZE 0x1fc0
+
+struct fstab_state
+{
+  FILE *fs_fp;
+  char *fs_buffer;
+  struct mntent fs_mntres;
+  struct fstab fs_ret;
+};
+
+static struct fstab_state *fstab_init (int opt_rewind);
+static struct mntent *fstab_fetch (struct fstab_state *state);
+static struct fstab *fstab_convert (struct fstab_state *state);
+
+static struct fstab_state fstab_state;
+
+
+int
+setfsent (void)
+{
+  return fstab_init (1) != NULL;
+}
+
+
+struct fstab *
+getfsent (void)
+{
+  struct fstab_state *state;
+
+  state = fstab_init (0);
+  if (state == NULL)
+    return NULL;
+  if (fstab_fetch (state) == NULL)
+    return NULL;
+  return fstab_convert (state);
+}
+
+
+struct fstab *
+getfsspec (name)
+     const char *name;
+{
+  struct fstab_state *state;
+  struct mntent *m;
+
+  state = fstab_init (1);
+  if (state == NULL)
+    return NULL;
+  while ((m = fstab_fetch (state)) != NULL)
+    if (strcmp (m->mnt_fsname, name) == 0)
+      return fstab_convert (state);
+  return NULL;
+}
+
+
+struct fstab *
+getfsfile (name)
+     const char *name;
+{
+  struct fstab_state *state;
+  struct mntent *m;
+
+  state = fstab_init (1);
+  if (state == NULL)
+    return NULL;
+  while ((m = fstab_fetch (state)) != NULL)
+    if (strcmp (m->mnt_dir, name) == 0)
+      return fstab_convert (state);
+  return NULL;
+}
+
+
+void
+endfsent (void)
+{
+  struct fstab_state *state;
+
+  state = &fstab_state;
+  if (state->fs_fp != NULL)
+    {
+      (void) __endmntent (state->fs_fp);
+      state->fs_fp = NULL;
+    }
+}
+
+
+static struct fstab_state *
+fstab_init (int opt_rewind)
+{
+  struct fstab_state *state;
+  char *buffer;
+  FILE *fp;
+
+  state = &fstab_state;
+
+  buffer = state->fs_buffer;
+  if (buffer == NULL)
+    {
+      buffer = (char *) malloc (BUFFER_SIZE);
+      if (buffer == NULL)
+	return NULL;
+      state->fs_buffer = buffer;
+    }
+
+  fp = state->fs_fp;
+  if (fp != NULL)
+    {
+      if (opt_rewind)
+	rewind (fp);
+    }
+  else
+    {
+      fp = __setmntent (_PATH_FSTAB, "r");
+      if (fp == NULL)
+	return NULL;
+      state->fs_fp = fp;
+    }
+
+  return state;
+}
+
+
+static struct mntent *
+fstab_fetch (struct fstab_state *state)
+{
+  return __getmntent_r (state->fs_fp, &state->fs_mntres,
+			state->fs_buffer, BUFFER_SIZE);
+}
+
+
+static struct fstab *
+fstab_convert (struct fstab_state *state)
+{
+  struct mntent *m;
+  struct fstab *f;
+
+  m = &state->fs_mntres;
+  f = &state->fs_ret;
+
+  f->fs_spec = m->mnt_fsname;
+  f->fs_file = m->mnt_dir;
+  f->fs_vfstype = m->mnt_type;
+  f->fs_mntops = m->mnt_opts;
+  f->fs_type = (__hasmntopt (m, FSTAB_RW) ? FSTAB_RW :
+		__hasmntopt (m, FSTAB_RQ) ? FSTAB_RQ :
+		__hasmntopt (m, FSTAB_RO) ? FSTAB_RO :
+		__hasmntopt (m, FSTAB_SW) ? FSTAB_SW :
+		__hasmntopt (m, FSTAB_XX) ? FSTAB_XX :
+		"??");
+  f->fs_freq = m->mnt_freq;
+  f->fs_passno = m->mnt_passno;
+  return f;
+}
+
+
+/* Make sure the memory is freed if the programs ends while in
+   memory-debugging mode and something actually was allocated.  */
+libc_freeres_fn (fstab_free)
+{
+  char *buffer;
+
+  buffer = fstab_state.fs_buffer;
+  free ((void *) buffer);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/fstab.h b/ap/libc/glibc/glibc-2.22/misc/fstab.h
new file mode 100644
index 0000000..9f17e1b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fstab.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 1980, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)fstab.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _FSTAB_H
+#define _FSTAB_H	1
+
+#include <features.h>
+
+/*
+ * File system table, see fstab(5).
+ *
+ * Used by dump, mount, umount, swapon, fsck, df, ...
+ *
+ * For ufs fs_spec field is the block special name.  Programs that want to
+ * use the character special name must create that name by prepending a 'r'
+ * after the right most slash.  Quota files are always named "quotas", so
+ * if type is "rq", then use concatenation of fs_file and "quotas" to locate
+ * quota file.
+ */
+#define	_PATH_FSTAB	"/etc/fstab"
+#define	FSTAB		"/etc/fstab"	/* deprecated */
+
+#define	FSTAB_RW	"rw"		/* read/write device */
+#define	FSTAB_RQ	"rq"		/* read/write with quotas */
+#define	FSTAB_RO	"ro"		/* read-only device */
+#define	FSTAB_SW	"sw"		/* swap device */
+#define	FSTAB_XX	"xx"		/* ignore totally */
+
+struct fstab
+  {
+    char *fs_spec;			/* block special device name */
+    char *fs_file;			/* file system path prefix */
+    char *fs_vfstype;			/* File system type, ufs, nfs */
+    char *fs_mntops;			/* Mount options ala -o */
+    const char *fs_type;		/* FSTAB_* from fs_mntops */
+    int	fs_freq;			/* dump frequency, in days */
+    int	fs_passno;			/* pass number on parallel dump */
+  };
+
+
+__BEGIN_DECLS
+
+extern struct fstab *getfsent (void) __THROW;
+extern struct fstab *getfsspec (const char *__name) __THROW;
+extern struct fstab *getfsfile (const char *__name) __THROW;
+extern int setfsent (void) __THROW;
+extern void endfsent (void) __THROW;
+
+__END_DECLS
+
+#endif /* fstab.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/fsync.c b/ap/libc/glibc/glibc-2.22/misc/fsync.c
new file mode 100644
index 0000000..05f3acf
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/fsync.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Make all changes done to FD actually appear on disk.  */
+int
+fsync (fd)
+     int fd;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+
+stub_warning (fsync)
diff --git a/ap/libc/glibc/glibc-2.22/misc/ftruncate.c b/ap/libc/glibc/glibc-2.22/misc/ftruncate.c
new file mode 100644
index 0000000..2d43c76
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ftruncate.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Truncate the file referenced by FD to LENGTH bytes.  */
+int
+__ftruncate (fd, length)
+     int fd;
+     off_t length;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+weak_alias (__ftruncate, ftruncate)
+
+stub_warning (ftruncate)
diff --git a/ap/libc/glibc/glibc-2.22/misc/ftruncate64.c b/ap/libc/glibc/glibc-2.22/misc/ftruncate64.c
new file mode 100644
index 0000000..1c41fea
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ftruncate64.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1997-2015 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 <unistd.h>
+
+/* Truncate the file referenced by FD to LENGTH bytes.  */
+int
+__ftruncate64 (fd, length)
+     int fd;
+     off64_t length;
+{
+  if ((off_t) length != length)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+  return __ftruncate (fd, (off_t) length);
+}
+weak_alias (__ftruncate64, ftruncate64)
diff --git a/ap/libc/glibc/glibc-2.22/misc/futimes.c b/ap/libc/glibc/glibc-2.22/misc/futimes.c
new file mode 100644
index 0000000..9459c3a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/futimes.c
@@ -0,0 +1,32 @@
+/* futimes -- change access and modification times of open file.  Stub version.
+   Copyright (C) 2002-2015 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/time.h>
+#include <errno.h>
+
+/* Change the access time of FILE to TVP[0] and
+   the modification time of FILE to TVP[1], but do not follow symlinks.  */
+int
+__futimes (int fd, const struct timeval tvp[2])
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__futimes, futimes)
+
+stub_warning (futimes)
diff --git a/ap/libc/glibc/glibc-2.22/misc/futimesat.c b/ap/libc/glibc/glibc-2.22/misc/futimesat.c
new file mode 100644
index 0000000..c675aa5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/futimesat.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 2005-2015 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 <fcntl.h>
+#include <stddef.h>
+#include <sys/time.h>
+
+
+/* Change the access time of FILE relative to FD to TVP[0] and
+   the modification time of FILE to TVP[1].  */
+int
+futimesat (fd, file, tvp)
+     int fd;
+     const char *file;
+     const struct timeval tvp[2];
+{
+  if (fd < 0
+      && (file == NULL
+          || (fd != AT_FDCWD && file[0] != '/')))
+    {
+      __set_errno (EBADF);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (futimesat)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getauxval.c b/ap/libc/glibc/glibc-2.22/misc/getauxval.c
new file mode 100644
index 0000000..be41149
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getauxval.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2012-2015 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/auxv.h>
+#include <errno.h>
+#include <ldsodefs.h>
+
+
+unsigned long int
+__getauxval (unsigned long int type)
+{
+  ElfW(auxv_t) *p;
+
+  if (type == AT_HWCAP)
+    return GLRO(dl_hwcap);
+  else if (type == AT_HWCAP2)
+    return GLRO(dl_hwcap2);
+
+  for (p = GLRO(dl_auxv); p->a_type != AT_NULL; p++)
+    if (p->a_type == type)
+      return p->a_un.a_val;
+
+  __set_errno (ENOENT);
+  return 0;
+}
+
+weak_alias (__getauxval, getauxval)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getclktck.c b/ap/libc/glibc/glibc-2.22/misc/getclktck.c
new file mode 100644
index 0000000..e16c120
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getclktck.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000-2015 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 <time.h>
+
+/* Return frequency of times().  */
+int
+__getclktck (void)
+{
+#ifdef	CLK_TCK
+  return CLK_TCK;
+#else
+  return 60;
+#endif
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/getdomain.c b/ap/libc/glibc/glibc-2.22/misc/getdomain.c
new file mode 100644
index 0000000..c5ab3a5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getdomain.c
@@ -0,0 +1,62 @@
+/* Copyright (C) 1994-2015 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/>.  */
+
+/* Put the name of the current YP domain in no more than LEN bytes of NAME.
+   The result is null-terminated if LEN is large enough for the full
+   name and the terminator.  */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/utsname.h>
+#include <string.h>
+
+#if _UTSNAME_DOMAIN_LENGTH
+/* The `uname' information includes the domain name.  */
+
+int
+getdomainname (name, len)
+    char *name;
+    size_t len;
+{
+  struct utsname u;
+  size_t u_len;
+
+  if (uname (&u) < 0)
+    return -1;
+
+  u_len = strlen (u.domainname);
+  memcpy (name, u.domainname, MIN (u_len + 1, len));
+  return 0;
+}
+
+#else
+
+int
+getdomainname (name, len)
+     char *name;
+     size_t len;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (getdomainname)
+
+#endif
+
+libc_hidden_def (getdomainname)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getdtsz.c b/ap/libc/glibc/glibc-2.22/misc/getdtsz.c
new file mode 100644
index 0000000..182bb9e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getdtsz.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Return the maximum number of file descriptors
+   the current process could possibly have.  */
+int
+__getdtablesize (void)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (getdtablesize)
+
+weak_alias (__getdtablesize, getdtablesize)
diff --git a/ap/libc/glibc/glibc-2.22/misc/gethostid.c b/ap/libc/glibc/glibc-2.22/misc/gethostid.c
new file mode 100644
index 0000000..30b38f8
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/gethostid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Return the current machine's Internet number.  */
+long int
+gethostid (void)
+{
+  __set_errno (ENOSYS);
+  return -1L;
+}
+
+
+stub_warning (gethostid)
diff --git a/ap/libc/glibc/glibc-2.22/misc/gethostname.c b/ap/libc/glibc/glibc-2.22/misc/gethostname.c
new file mode 100644
index 0000000..15097a8
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/gethostname.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Put the name of the current host in no more than LEN bytes of NAME.
+   The result is null-terminated if LEN is large enough for the full
+   name and the terminator.  */
+int
+__gethostname (name, len)
+     char *name;
+     size_t len;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (gethostname)
+
+weak_alias (__gethostname, gethostname)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getloadavg.c b/ap/libc/glibc/glibc-2.22/misc/getloadavg.c
new file mode 100644
index 0000000..5fad0e4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getloadavg.c
@@ -0,0 +1,35 @@
+/* Get system load averages.  Stub version.
+   Copyright (C) 1999-2015 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 <unistd.h>
+#include <stdlib.h>
+
+
+/* Put the 1 minute, 5 minute and 15 minute load averages
+   into the first NELEM elements of LOADAVG.
+   Return the number written (never more than 3, but may be less than NELEM),
+   or -1 if an error occurred.  */
+
+int
+getloadavg (double loadavg[], int nelem)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (getloadavg)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getpagesize.c b/ap/libc/glibc/glibc-2.22/misc/getpagesize.c
new file mode 100644
index 0000000..93e8619
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getpagesize.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Return the system page size.  */
+int
+__getpagesize (void)
+{
+  __set_errno (ENOSYS);
+  return 0;
+}
+libc_hidden_def (__getpagesize)
+stub_warning (getpagesize)
+
+weak_alias (__getpagesize, getpagesize)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getpass.c b/ap/libc/glibc/glibc-2.22/misc/getpass.c
new file mode 100644
index 0000000..dcaff38
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getpass.c
@@ -0,0 +1,125 @@
+/* Copyright (C) 1992-2015 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 <stdio.h>
+#include <stdio_ext.h>
+#include <string.h>		/* For string function builtin redirect.  */
+#include <termios.h>
+#include <unistd.h>
+
+#include <wchar.h>
+#define flockfile(s) _IO_flockfile (s)
+#define funlockfile(s) _IO_funlockfile (s)
+#include <bits/libc-lock.h>
+
+/* It is desirable to use this bit on systems that have it.
+   The only bit of terminal state we want to twiddle is echoing, which is
+   done in software; there is no need to change the state of the terminal
+   hardware.  */
+
+#ifndef TCSASOFT
+#define TCSASOFT 0
+#endif
+
+static void
+call_fclose (void *arg)
+{
+  if (arg != NULL)
+    fclose (arg);
+}
+
+char *
+getpass (prompt)
+     const char *prompt;
+{
+  FILE *in, *out;
+  struct termios s, t;
+  int tty_changed;
+  static char *buf;
+  static size_t bufsize;
+  ssize_t nread;
+
+  /* Try to write to and read from the terminal if we can.
+     If we can't open the terminal, use stderr and stdin.  */
+
+  in = fopen ("/dev/tty", "w+ce");
+  if (in == NULL)
+    {
+      in = stdin;
+      out = stderr;
+    }
+  else
+    {
+      /* We do the locking ourselves.  */
+      __fsetlocking (in, FSETLOCKING_BYCALLER);
+
+      out = in;
+    }
+
+  /* Make sure the stream we opened is closed even if the thread is
+     canceled.  */
+  __libc_cleanup_push (call_fclose, in == out ? in : NULL);
+
+  flockfile (out);
+
+  /* Turn echoing off if it is on now.  */
+
+  if (__tcgetattr (fileno (in), &t) == 0)
+    {
+      /* Save the old one. */
+      s = t;
+      /* Tricky, tricky. */
+      t.c_lflag &= ~(ECHO|ISIG);
+      tty_changed = (tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
+    }
+  else
+    tty_changed = 0;
+
+  /* Write the prompt.  */
+  __fxprintf (out, "%s", prompt);
+  __fflush_unlocked (out);
+
+  /* Read the password.  */
+  nread = __getline (&buf, &bufsize, in);
+  if (buf != NULL)
+    {
+      if (nread < 0)
+	buf[0] = '\0';
+      else if (buf[nread - 1] == '\n')
+	{
+	  /* Remove the newline.  */
+	  buf[nread - 1] = '\0';
+	  if (tty_changed)
+	    /* Write the newline that was not echoed.  */
+	    __fxprintf (out, "\n");
+	}
+    }
+
+  /* Restore the original setting.  */
+  if (tty_changed)
+    (void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
+
+  funlockfile (out);
+
+  __libc_cleanup_pop (0);
+
+  if (in != stdin)
+    /* We opened the terminal; now close it.  */
+    fclose (in);
+
+  return buf;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/getsysstats.c b/ap/libc/glibc/glibc-2.22/misc/getsysstats.c
new file mode 100644
index 0000000..d2dc869
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getsysstats.c
@@ -0,0 +1,67 @@
+/* getsysstats - Determine various system internal values, stub version.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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/sysinfo.h>
+
+int
+__get_nprocs_conf (void)
+{
+  /* We don't know how to determine the number.  Simply return always 1.  */
+  return 1;
+}
+weak_alias (__get_nprocs_conf, get_nprocs_conf)
+
+link_warning (get_nprocs_conf, "warning: get_nprocs_conf will always return 1")
+
+
+
+int
+__get_nprocs (void)
+{
+  /* We don't know how to determine the number.  Simply return always 1.  */
+  return 1;
+}
+weak_alias (__get_nprocs, get_nprocs)
+
+link_warning (get_nprocs, "warning: get_nprocs will always return 1")
+
+
+long int
+__get_phys_pages (void)
+{
+  /* We have no general way to determine this value.  */
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__get_phys_pages, get_phys_pages)
+
+stub_warning (get_phys_pages)
+
+
+long int
+__get_avphys_pages (void)
+{
+  /* We have no general way to determine this value.  */
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__get_avphys_pages, get_avphys_pages)
+
+stub_warning (get_avphys_pages)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getttyent.c b/ap/libc/glibc/glibc-2.22/misc/getttyent.c
new file mode 100644
index 0000000..fcdbc22
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getttyent.c
@@ -0,0 +1,217 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)getttyent.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <ttyent.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <ctype.h>
+#include <string.h>
+
+#define flockfile(s) _IO_flockfile (s)
+#define funlockfile(s) _IO_funlockfile (s)
+
+static char zapchar;
+static FILE *tf;
+
+struct ttyent *
+__getttynam (const char *tty)
+{
+	struct ttyent *t;
+
+	__setttyent();
+	while ((t = __getttyent()))
+		if (!strcmp(tty, t->ty_name))
+			break;
+	__endttyent();
+	return (t);
+}
+weak_alias (__getttynam, getttynam)
+
+static char *skip (char *) __THROW internal_function;
+static char *value (char *) __THROW internal_function;
+
+struct ttyent *
+__getttyent (void)
+{
+	static struct ttyent tty;
+	int c;
+	char *p;
+#define	MAXLINELENGTH	100
+	static char line[MAXLINELENGTH];
+
+	if (!tf && !__setttyent())
+		return (NULL);
+	flockfile (tf);
+	for (;;) {
+		if (!__fgets_unlocked(p = line, sizeof(line), tf)) {
+			funlockfile (tf);
+			return (NULL);
+		}
+		/* skip lines that are too big */
+		if (!index(p, '\n')) {
+			while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
+				;
+			continue;
+		}
+		while (isspace(*p))
+			++p;
+		if (*p && *p != '#')
+			break;
+	}
+
+	zapchar = 0;
+	tty.ty_name = p;
+	p = skip(p);
+	if (!*(tty.ty_getty = p))
+		tty.ty_getty = tty.ty_type = NULL;
+	else {
+		p = skip(p);
+		if (!*(tty.ty_type = p))
+			tty.ty_type = NULL;
+		else
+			p = skip(p);
+	}
+	tty.ty_status = 0;
+	tty.ty_window = NULL;
+
+#define	scmp(e)	!strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1])
+#define	vcmp(e)	!strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '='
+	for (; *p; p = skip(p)) {
+		if (scmp(_TTYS_OFF))
+			tty.ty_status &= ~TTY_ON;
+		else if (scmp(_TTYS_ON))
+			tty.ty_status |= TTY_ON;
+		else if (scmp(_TTYS_SECURE))
+			tty.ty_status |= TTY_SECURE;
+		else if (vcmp(_TTYS_WINDOW))
+			tty.ty_window = value(p);
+		else
+			break;
+	}
+	/* We can release the lock only here since `zapchar' is global.  */
+	funlockfile(tf);
+
+	if (zapchar == '#' || *p == '#')
+		while ((c = *++p) == ' ' || c == '\t')
+			;
+	tty.ty_comment = p;
+	if (*p == 0)
+		tty.ty_comment = 0;
+	if ((p = index(p, '\n')))
+		*p = '\0';
+	return (&tty);
+}
+libc_hidden_def (__getttyent)
+weak_alias (__getttyent, getttyent)
+
+#define	QUOTED	1
+
+/*
+ * Skip over the current field, removing quotes, and return a pointer to
+ * the next field.
+ */
+static char *
+internal_function
+skip(p)
+	char *p;
+{
+	char *t;
+	int c, q;
+
+	for (q = 0, t = p; (c = *p) != '\0'; p++) {
+		if (c == '"') {
+			q ^= QUOTED;	/* obscure, but nice */
+			continue;
+		}
+		if (q == QUOTED && *p == '\\' && *(p+1) == '"')
+			p++;
+		*t++ = *p;
+		if (q == QUOTED)
+			continue;
+		if (c == '#') {
+			zapchar = c;
+			*p = 0;
+			break;
+		}
+		if (c == '\t' || c == ' ' || c == '\n') {
+			zapchar = c;
+			*p++ = 0;
+			while ((c = *p) == '\t' || c == ' ' || c == '\n')
+				p++;
+			break;
+		}
+	}
+	*--t = '\0';
+	return (p);
+}
+
+static char *
+internal_function
+value(p)
+	char *p;
+{
+
+	return ((p = index(p, '=')) ? ++p : NULL);
+}
+
+int
+__setttyent (void)
+{
+
+	if (tf) {
+		(void)rewind(tf);
+		return (1);
+	} else if ((tf = fopen(_PATH_TTYS, "rce"))) {
+		/* We do the locking ourselves.  */
+		__fsetlocking (tf, FSETLOCKING_BYCALLER);
+		return (1);
+	}
+	return (0);
+}
+libc_hidden_def (__setttyent)
+weak_alias (__setttyent, setttyent)
+
+int
+__endttyent (void)
+{
+	int rval;
+
+	if (tf) {
+		rval = !(fclose(tf) == EOF);
+		tf = NULL;
+		return (rval);
+	}
+	return (1);
+}
+libc_hidden_def (__endttyent)
+weak_alias (__endttyent, endttyent)
diff --git a/ap/libc/glibc/glibc-2.22/misc/getusershell.c b/ap/libc/glibc/glibc-2.22/misc/getusershell.c
new file mode 100644
index 0000000..fc2c43b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getusershell.c
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 1985, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)getusershell.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <paths.h>
+
+/*
+ * Local shells should NOT be added here.  They should be added in
+ * /etc/shells.
+ */
+
+/* NB: we do not initialize okshells here.  The initialization needs
+   relocations.  These interfaces are used so rarely that this is not
+   justified.  Instead explicitly initialize the array when it is
+   used.  */
+#if 0
+static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
+#else
+static const char *okshells[3];
+#endif
+static char **curshell, **shells, *strings;
+static char **initshells (void) __THROW;
+
+/*
+ * Get a list of shells from _PATH_SHELLS, if it exists.
+ */
+char *
+getusershell (void)
+{
+	char *ret;
+
+	if (curshell == NULL)
+		curshell = initshells();
+	ret = *curshell;
+	if (ret != NULL)
+		curshell++;
+	return (ret);
+}
+
+void
+endusershell (void)
+{
+
+	free(shells);
+	shells = NULL;
+	free(strings);
+	strings = NULL;
+	curshell = NULL;
+}
+
+void
+setusershell (void)
+{
+
+	curshell = initshells();
+}
+
+static char **
+initshells (void)
+{
+	char **sp, *cp;
+	FILE *fp;
+	struct stat64 statb;
+	size_t flen;
+
+	free(shells);
+	shells = NULL;
+	free(strings);
+	strings = NULL;
+	if ((fp = fopen(_PATH_SHELLS, "rce")) == NULL)
+		goto init_okshells_noclose;
+	if (fstat64(fileno(fp), &statb) == -1) {
+	init_okshells:
+		(void)fclose(fp);
+	init_okshells_noclose:
+		okshells[0] = _PATH_BSHELL;
+		okshells[1] = _PATH_CSHELL;
+		return (char **) okshells;
+	}
+	if (statb.st_size > ~(size_t)0 / sizeof (char *) * 3)
+		goto init_okshells;
+	flen = statb.st_size + 3;
+	if ((strings = malloc(flen)) == NULL)
+		goto init_okshells;
+	shells = malloc(statb.st_size / 3 * sizeof (char *));
+	if (shells == NULL) {
+		free(strings);
+		strings = NULL;
+		goto init_okshells;
+	}
+	sp = shells;
+	cp = strings;
+	while (fgets_unlocked(cp, flen - (cp - strings), fp) != NULL) {
+		while (*cp != '#' && *cp != '/' && *cp != '\0')
+			cp++;
+		if (*cp == '#' || *cp == '\0' || cp[1] == '\0')
+			continue;
+		*sp++ = cp;
+		while (!isspace(*cp) && *cp != '#' && *cp != '\0')
+			cp++;
+		*cp++ = '\0';
+	}
+	*sp = NULL;
+	(void)fclose(fp);
+	return (shells);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/getxattr.c b/ap/libc/glibc/glibc-2.22/misc/getxattr.c
new file mode 100644
index 0000000..d90b192
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/getxattr.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+ssize_t
+getxattr (const char *__path, const char *__name,
+	  void *__value, size_t __size)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (getxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/gtty.c b/ap/libc/glibc/glibc-2.22/misc/gtty.c
new file mode 100644
index 0000000..9a64a9a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/gtty.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991-2015 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 <sgtty.h>
+#include <stddef.h>
+
+/* Fill in *PARAMS with terminal parameters associated with FD.  */
+int
+gtty (fd, params)
+     int fd;
+     struct sgttyb *params;
+{
+  if (params == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (gtty)
diff --git a/ap/libc/glibc/glibc-2.22/misc/hsearch.c b/ap/libc/glibc/glibc-2.22/misc/hsearch.c
new file mode 100644
index 0000000..7a0b0dc
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/hsearch.c
@@ -0,0 +1,56 @@
+/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+   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 <search.h>
+
+/* The non-reentrant version use a global space for storing the table.  */
+static struct hsearch_data htab;
+
+
+/* Define the non-reentrant function using the reentrant counterparts.  */
+ENTRY *
+hsearch (item, action)
+     ENTRY item;
+     ACTION action;
+{
+  ENTRY *result;
+
+  (void) __hsearch_r (item, action, &result, &htab);
+
+  return result;
+}
+
+
+int
+hcreate (nel)
+     size_t nel;
+{
+  return __hcreate_r (nel, &htab);
+}
+
+
+void
+__hdestroy (void)
+{
+  __hdestroy_r (&htab);
+}
+weak_alias (__hdestroy, hdestroy)
+
+/* Make sure the table is freed if we want to free everything before
+   exiting.  */
+text_set_element (__libc_subfreeres, __hdestroy);
diff --git a/ap/libc/glibc/glibc-2.22/misc/hsearch_r.c b/ap/libc/glibc/glibc-2.22/misc/hsearch_r.c
new file mode 100644
index 0000000..9f55e84
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/hsearch_r.c
@@ -0,0 +1,230 @@
+/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1993.
+
+   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 <malloc.h>
+#include <string.h>
+
+#include <search.h>
+
+/* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
+   [Knuth]            The Art of Computer Programming, part 3 (6.4)  */
+
+
+/* The reentrant version has no static variables to maintain the state.
+   Instead the interface of all functions is extended to take an argument
+   which describes the current status.  */
+typedef struct _ENTRY
+{
+  unsigned int used;
+  ENTRY entry;
+}
+_ENTRY;
+
+
+/* For the used double hash method the table size has to be a prime. To
+   correct the user given table size we need a prime test.  This trivial
+   algorithm is adequate because
+   a)  the code is (most probably) called a few times per program run and
+   b)  the number is small because the table must fit in the core  */
+static int
+isprime (unsigned int number)
+{
+  /* no even number will be passed */
+  unsigned int div = 3;
+
+  while (div * div < number && number % div != 0)
+    div += 2;
+
+  return number % div != 0;
+}
+
+
+/* Before using the hash table we must allocate memory for it.
+   Test for an existing table are done. We allocate one element
+   more as the found prime number says. This is done for more effective
+   indexing as explained in the comment for the hsearch function.
+   The contents of the table is zeroed, especially the field used
+   becomes zero.  */
+int
+__hcreate_r (nel, htab)
+     size_t nel;
+     struct hsearch_data *htab;
+{
+  /* Test for correct arguments.  */
+  if (htab == NULL)
+    {
+      __set_errno (EINVAL);
+      return 0;
+    }
+
+  /* There is still another table active. Return with error. */
+  if (htab->table != NULL)
+    return 0;
+
+  /* We need a size of at least 3.  Otherwise the hash functions we
+     use will not work.  */
+  if (nel < 3)
+    nel = 3;
+  /* Change nel to the first prime number not smaller as nel. */
+  nel |= 1;      /* make odd */
+  while (!isprime (nel))
+    nel += 2;
+
+  htab->size = nel;
+  htab->filled = 0;
+
+  /* allocate memory and zero out */
+  htab->table = (_ENTRY *) calloc (htab->size + 1, sizeof (_ENTRY));
+  if (htab->table == NULL)
+    return 0;
+
+  /* everything went alright */
+  return 1;
+}
+libc_hidden_def (__hcreate_r)
+weak_alias (__hcreate_r, hcreate_r)
+
+
+/* After using the hash table it has to be destroyed. The used memory can
+   be freed and the local static variable can be marked as not used.  */
+void
+__hdestroy_r (htab)
+     struct hsearch_data *htab;
+{
+  /* Test for correct arguments.  */
+  if (htab == NULL)
+    {
+      __set_errno (EINVAL);
+      return;
+    }
+
+  /* Free used memory.  */
+  free (htab->table);
+
+  /* the sign for an existing table is an value != NULL in htable */
+  htab->table = NULL;
+}
+libc_hidden_def (__hdestroy_r)
+weak_alias (__hdestroy_r, hdestroy_r)
+
+
+/* This is the search function. It uses double hashing with open addressing.
+   The argument item.key has to be a pointer to an zero terminated, most
+   probably strings of chars. The function for generating a number of the
+   strings is simple but fast. It can be replaced by a more complex function
+   like ajw (see [Aho,Sethi,Ullman]) if the needs are shown.
+
+   We use an trick to speed up the lookup. The table is created by hcreate
+   with one more element available. This enables us to use the index zero
+   special. This index will never be used because we store the first hash
+   index in the field used where zero means not used. Every other value
+   means used. The used field can be used as a first fast comparison for
+   equality of the stored and the parameter value. This helps to prevent
+   unnecessary expensive calls of strcmp.  */
+int
+__hsearch_r (item, action, retval, htab)
+     ENTRY item;
+     ACTION action;
+     ENTRY **retval;
+     struct hsearch_data *htab;
+{
+  unsigned int hval;
+  unsigned int count;
+  unsigned int len = strlen (item.key);
+  unsigned int idx;
+
+  /* Compute an value for the given string. Perhaps use a better method. */
+  hval = len;
+  count = len;
+  while (count-- > 0)
+    {
+      hval <<= 4;
+      hval += item.key[count];
+    }
+  if (hval == 0)
+    ++hval;
+
+  /* First hash function: simply take the modul but prevent zero. */
+  idx = hval % htab->size + 1;
+
+  if (htab->table[idx].used)
+    {
+      /* Further action might be required according to the action value. */
+      if (htab->table[idx].used == hval
+	  && strcmp (item.key, htab->table[idx].entry.key) == 0)
+	{
+	  *retval = &htab->table[idx].entry;
+	  return 1;
+	}
+
+      /* Second hash function, as suggested in [Knuth] */
+      unsigned int hval2 = 1 + hval % (htab->size - 2);
+      unsigned int first_idx = idx;
+
+      do
+	{
+	  /* Because SIZE is prime this guarantees to step through all
+             available indeces.  */
+          if (idx <= hval2)
+	    idx = htab->size + idx - hval2;
+	  else
+	    idx -= hval2;
+
+	  /* If we visited all entries leave the loop unsuccessfully.  */
+	  if (idx == first_idx)
+	    break;
+
+            /* If entry is found use it. */
+          if (htab->table[idx].used == hval
+	      && strcmp (item.key, htab->table[idx].entry.key) == 0)
+	    {
+	      *retval = &htab->table[idx].entry;
+	      return 1;
+	    }
+	}
+      while (htab->table[idx].used);
+    }
+
+  /* An empty bucket has been found. */
+  if (action == ENTER)
+    {
+      /* If table is full and another entry should be entered return
+	 with error.  */
+      if (htab->filled == htab->size)
+	{
+	  __set_errno (ENOMEM);
+	  *retval = NULL;
+	  return 0;
+	}
+
+      htab->table[idx].used  = hval;
+      htab->table[idx].entry = item;
+
+      ++htab->filled;
+
+      *retval = &htab->table[idx].entry;
+      return 1;
+    }
+
+  __set_errno (ESRCH);
+  *retval = NULL;
+  return 0;
+}
+libc_hidden_def (__hsearch_r)
+weak_alias (__hsearch_r, hsearch_r)
diff --git a/ap/libc/glibc/glibc-2.22/misc/ifunc-impl-list.c b/ap/libc/glibc/glibc-2.22/misc/ifunc-impl-list.c
new file mode 100644
index 0000000..446c74f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ifunc-impl-list.c
@@ -0,0 +1,32 @@
+/* Enumerate available IFUNC implementations of a function.  Stub version.
+   Copyright (C) 2012-2015 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 <ifunc-impl-list.h>
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+   NAME supported on target machine and return the number of valid
+   entries.  */
+
+size_t
+__libc_ifunc_impl_list
+  (const char *name __attribute__ ((unused)),
+   struct libc_ifunc_impl *array __attribute__ ((unused)),
+   size_t max __attribute__ ((unused)))
+{
+  return 0;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/init-misc.c b/ap/libc/glibc/glibc-2.22/misc/init-misc.c
new file mode 100644
index 0000000..9254f02
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/init-misc.c
@@ -0,0 +1,40 @@
+/* Define and initialize `__progname' et. al.
+   Copyright (C) 1994-2015 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 <string.h>
+#include <libc-internal.h>
+
+char *__progname_full = (char *) "";
+char *__progname = (char *) "";
+weak_alias (__progname_full, program_invocation_name)
+weak_alias (__progname, program_invocation_short_name)
+
+
+void
+__init_misc (int argc, char **argv, char **envp)
+{
+  if (argv && argv[0])
+    {
+      char *p = strrchr (argv[0], '/');
+      if (p == NULL)
+	__progname = argv[0];
+      else
+	__progname = p + 1;
+      __progname_full = argv[0];
+    }
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/insremque.c b/ap/libc/glibc/glibc-2.22/misc/insremque.c
new file mode 100644
index 0000000..3c56f51
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/insremque.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 1992-2015 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 <search.h>
+
+/* Insert ELEM into a doubly-linked list, after PREV.  */
+
+void
+insque (void *elem, void *prev)
+{
+  if (prev == NULL)
+    {
+      ((struct qelem *) elem)->q_forw = NULL;
+      ((struct qelem *) elem)->q_back = NULL;
+    }
+  else
+    {
+      struct qelem *next = ((struct qelem *) prev)->q_forw;
+      ((struct qelem *) prev)->q_forw = (struct qelem *) elem;
+      if (next != NULL)
+	next->q_back = (struct qelem *) elem;
+      ((struct qelem *) elem)->q_forw = next;
+      ((struct qelem *) elem)->q_back = (struct qelem *) prev;
+    }
+}
+
+/* Unlink ELEM from the doubly-linked list that it is in.  */
+
+void
+remque (void *elem)
+{
+  struct qelem *next = ((struct qelem *) elem)->q_forw;
+  struct qelem *prev = ((struct qelem *) elem)->q_back;
+  if (next != NULL)
+    next->q_back = prev;
+  if (prev != NULL)
+    prev->q_forw = (struct qelem *) next;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/ioctl.c b/ap/libc/glibc/glibc-2.22/misc/ioctl.c
new file mode 100644
index 0000000..f75f3e4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ioctl.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991-2015 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/ioctl.h>
+
+/* Perform the I/O control operation specified by REQUEST on FD.
+   The actual type and use of ARG and the return value depend on REQUEST.  */
+int
+__ioctl (fd, request)
+     int fd;
+     unsigned long int request;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (ioctl)
+
+weak_alias (__ioctl, ioctl)
diff --git a/ap/libc/glibc/glibc-2.22/misc/lgetxattr.c b/ap/libc/glibc/glibc-2.22/misc/lgetxattr.c
new file mode 100644
index 0000000..f6e9a51
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/lgetxattr.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+ssize_t
+lgetxattr (const char *__path, const char *__name,
+	   void *__value, size_t __size)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (lgetxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/libgen.h b/ap/libc/glibc/glibc-2.22/misc/libgen.h
new file mode 100644
index 0000000..964a72f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/libgen.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 1996-2015 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/>.  */
+
+#ifndef _LIBGEN_H
+#define _LIBGEN_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Return directory part of PATH or "." if none is available.  */
+extern char *dirname (char *__path) __THROW;
+
+/* Return final component of PATH.
+
+   This is the weird XPG version of this function.  It sometimes will
+   modify its argument.  Therefore we normally use the GNU version (in
+   <string.h>) and only if this header is included make the XPG
+   version available under the real name.  */
+extern char *__xpg_basename (char *__path) __THROW;
+#define basename	__xpg_basename
+
+__END_DECLS
+
+#endif /* libgen.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/listxattr.c b/ap/libc/glibc/glibc-2.22/misc/listxattr.c
new file mode 100644
index 0000000..a09565e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/listxattr.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+ssize_t
+listxattr (const char *__path, char *__list, size_t __size)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (listxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/llistxattr.c b/ap/libc/glibc/glibc-2.22/misc/llistxattr.c
new file mode 100644
index 0000000..e982076
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/llistxattr.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+ssize_t
+llistxattr (const char *__path, char *__list, size_t __size)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (llistxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/lremovexattr.c b/ap/libc/glibc/glibc-2.22/misc/lremovexattr.c
new file mode 100644
index 0000000..8553281
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/lremovexattr.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+int
+lremovexattr (const char *__path, const char *__name)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (lremovexattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/lsearch.c b/ap/libc/glibc/glibc-2.22/misc/lsearch.c
new file mode 100644
index 0000000..08ade2b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/lsearch.c
@@ -0,0 +1,58 @@
+/* Linear search functions.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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 <search.h>
+#include <string.h>
+
+
+void *
+lsearch (const void *key, void *base, size_t *nmemb, size_t size,
+	 __compar_fn_t compar)
+{
+  void *result;
+
+  /* Try to find it.  */
+  result = lfind (key, base, nmemb, size, compar);
+  if (result == NULL)
+    {
+      /* Not available.  Insert at the end.  */
+      result = memcpy (base + (*nmemb) * size, key, size);
+      ++(*nmemb);
+    }
+
+  return result;
+}
+
+
+void *
+lfind (const void *key, const void *base, size_t *nmemb, size_t size,
+       __compar_fn_t compar)
+{
+  const void *result = base;
+  size_t cnt = 0;
+
+  while (cnt < *nmemb && (*compar) (key, result) != 0)
+    {
+      result += size;
+      ++cnt;
+    }
+
+  return cnt < *nmemb ? (void *) result : NULL;
+}
+libc_hidden_def (lfind)
diff --git a/ap/libc/glibc/glibc-2.22/misc/lsetxattr.c b/ap/libc/glibc/glibc-2.22/misc/lsetxattr.c
new file mode 100644
index 0000000..ea6bb7e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/lsetxattr.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+int
+lsetxattr (const char *__path, const char *__name,
+	   const void *__value, size_t __size, int __flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (lsetxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/lutimes.c b/ap/libc/glibc/glibc-2.22/misc/lutimes.c
new file mode 100644
index 0000000..76d13bf
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/lutimes.c
@@ -0,0 +1,33 @@
+/* lutimes -- change access and modification times of a symlink.  Stub version.
+   Copyright (C) 2002-2015 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/time.h>
+#include <errno.h>
+#include <stddef.h>
+
+/* Change the access time of FILE to TVP[0] and
+   the modification time of FILE to TVP[1], but do not follow symlinks.  */
+int
+__lutimes (const char *file, const struct timeval tvp[2])
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__lutimes, lutimes)
+
+stub_warning (lutimes)
diff --git a/ap/libc/glibc/glibc-2.22/misc/madvise.c b/ap/libc/glibc/glibc-2.22/misc/madvise.c
new file mode 100644
index 0000000..55f82d0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/madvise.c
@@ -0,0 +1,35 @@
+/* Advise system about intentions for a memory region.  Stub version.
+   Copyright (C) 1994-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Advise the system about particular usage patterns the program follows
+   for the region starting at ADDR and extending LEN bytes.  */
+
+int
+__madvise (void *addr, size_t len, int advice)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__madvise)
+weak_alias (__madvise, madvise)
+
+stub_warning (madvise)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mincore.c b/ap/libc/glibc/glibc-2.22/misc/mincore.c
new file mode 100644
index 0000000..ea54670
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mincore.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2000-2015 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/mman.h>
+#include <errno.h>
+
+int
+mincore (void *__start, size_t __len, unsigned char *__vec)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (mincore)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkdtemp.c b/ap/libc/glibc/glibc-2.22/misc/mkdtemp.c
new file mode 100644
index 0000000..1f733cd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkdtemp.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1999-2015 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 <stdio.h>
+#include <stdlib.h>
+
+/* Generate a unique temporary directory from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the filename unique.
+   The directory is created, mode 700, and its name is returned.
+   (This function comes from OpenBSD.) */
+char *
+mkdtemp (template)
+     char *template;
+{
+  if (__gen_tempname (template, 0, 0, __GT_DIR))
+    return NULL;
+  else
+    return template;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkostemp.c b/ap/libc/glibc/glibc-2.22/misc/mkostemp.c
new file mode 100644
index 0000000..807e477
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkostemp.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1998-2015 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 <stdio.h>
+#include <stdlib.h>
+
+#ifndef __GT_FILE
+# define __GT_FILE 0
+#endif
+
+/* Generate a unique temporary file name from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the filename unique.
+   Then open the file and return a fd. */
+int
+mkostemp (template, flags)
+     char *template;
+     int flags;
+{
+  return __gen_tempname (template, 0, flags, __GT_FILE);
+}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkostemp, mkostemp64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkostemp64.c b/ap/libc/glibc/glibc-2.22/misc/mkostemp64.c
new file mode 100644
index 0000000..2b9c868
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkostemp64.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 2000-2015 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 <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* If O_LARGEFILE is zero, mkostemp.c defines mkostemp64 as an alias.  */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
+/* Generate a unique temporary file name from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the filename unique.
+   Then open the file and return a fd. */
+int
+mkostemp64 (template, flags)
+     char *template;
+     int flags;
+{
+  return __gen_tempname (template, 0, flags | O_LARGEFILE, __GT_FILE);
+}
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkostemps.c b/ap/libc/glibc/glibc-2.22/misc/mkostemps.c
new file mode 100644
index 0000000..892dc69
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkostemps.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 2009-2015 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 <stdio.h>
+#include <stdlib.h>
+
+#ifndef __GT_FILE
+# define __GT_FILE 0
+#endif
+
+/* Generate a unique temporary file name from TEMPLATE.  The last six
+   characters before a suffix of length SUFFIXLEN of TEMPLATE must be
+   "XXXXXX"; they are replaced with a string that makes the filename
+   unique.  Then open the file and return a fd. */
+int
+mkostemps (template, suffixlen, flags)
+     char *template;
+     int suffixlen;
+     int flags;
+{
+  if (suffixlen < 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __gen_tempname (template, suffixlen, flags, __GT_FILE);
+}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkostemps, mkostemps64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkostemps64.c b/ap/libc/glibc/glibc-2.22/misc/mkostemps64.c
new file mode 100644
index 0000000..7b48b5c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkostemps64.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 2000-2015 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 <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* If O_LARGEFILE is zero, mkostemps.c defines mkostemps64 as an alias.  */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
+/* Generate a unique temporary file name from TEMPLATE.  The last six
+   characters before a suffix of length SUFFIXLEN of TEMPLATE must be
+   "XXXXXX"; they are replaced with a string that makes the filename
+   unique.  Then open the file and return a fd. */
+int
+mkostemps64 (template, suffixlen, flags)
+     char *template;
+     int suffixlen;
+     int flags;
+{
+  if (suffixlen < 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __gen_tempname (template, suffixlen, flags | O_LARGEFILE, __GT_FILE);
+}
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkstemp.c b/ap/libc/glibc/glibc-2.22/misc/mkstemp.c
new file mode 100644
index 0000000..c5018d1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkstemp.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1998-2015 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 <stdio.h>
+#include <stdlib.h>
+
+#ifndef __GT_FILE
+# define __GT_FILE 0
+#endif
+
+/* Generate a unique temporary file name from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the filename unique.
+   Then open the file and return a fd. */
+int
+mkstemp (template)
+     char *template;
+{
+  return __gen_tempname (template, 0, 0, __GT_FILE);
+}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkstemp, mkstemp64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkstemp64.c b/ap/libc/glibc/glibc-2.22/misc/mkstemp64.c
new file mode 100644
index 0000000..e4b8605
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkstemp64.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 2000-2015 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 <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* If O_LARGEFILE is zero, mkstemp.c defines mkstemp64 as an alias.  */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
+/* Generate a unique temporary file name from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the filename unique.
+   Then open the file and return a fd. */
+int
+mkstemp64 (template)
+     char *template;
+{
+  return __gen_tempname (template, 0, O_LARGEFILE, __GT_FILE);
+}
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkstemps.c b/ap/libc/glibc/glibc-2.22/misc/mkstemps.c
new file mode 100644
index 0000000..ca17d1d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkstemps.c
@@ -0,0 +1,46 @@
+/* Copyright (C) 2009-2015 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 <stdio.h>
+#include <stdlib.h>
+
+#ifndef __GT_FILE
+# define __GT_FILE 0
+#endif
+
+/* Generate a unique temporary file name from TEMPLATE.  The last six
+   characters before a suffix of length SUFFIXLEN of TEMPLATE must be
+   "XXXXXX"; they are replaced with a string that makes the filename
+   unique.  Then open the file and return a fd. */
+int
+mkstemps (template, suffixlen)
+     char *template;
+     int suffixlen;
+{
+  if (suffixlen < 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __gen_tempname (template, suffixlen, 0, __GT_FILE);
+}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkstemps, mkstemps64)
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mkstemps64.c b/ap/libc/glibc/glibc-2.22/misc/mkstemps64.c
new file mode 100644
index 0000000..dd786f1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mkstemps64.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 2000-2015 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 <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* If O_LARGEFILE is zero, mkstemps.c defines mkstemps64 as an alias.  */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
+/* Generate a unique temporary file name from TEMPLATE.  The last six
+   characters before a suffix of length SUFFIXLEN of TEMPLATE must be
+   "XXXXXX"; they are replaced with a string that makes the filename
+   unique.  Then open the file and return a fd. */
+int
+mkstemps64 (template, suffixlen)
+     char *template;
+     int suffixlen;
+{
+  if (suffixlen < 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __gen_tempname (template, suffixlen, O_LARGEFILE, __GT_FILE);
+}
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/mktemp.c b/ap/libc/glibc/glibc-2.22/misc/mktemp.c
new file mode 100644
index 0000000..fc82ede
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mktemp.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1998-2015 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 <stdio.h>
+#include <stdlib.h>
+
+/* Generate a unique temporary file name from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the filename unique.  */
+char *
+__mktemp (template)
+     char *template;
+{
+  if (__gen_tempname (template, 0, 0, __GT_NOCREATE) < 0)
+    /* We return the null string if we can't find a unique file name.  */
+    template[0] = '\0';
+
+  return template;
+}
+weak_alias (__mktemp, mktemp)
+
+link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
diff --git a/ap/libc/glibc/glibc-2.22/misc/mlock.c b/ap/libc/glibc/glibc-2.22/misc/mlock.c
new file mode 100644
index 0000000..c84ca2e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mlock.c
@@ -0,0 +1,33 @@
+/* mlock -- guarantee pages are resident in memory.  Stub version.
+   Copyright (C) 2001-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
+   be memory resident.  */
+
+int
+mlock (const void *addr, size_t len)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (mlock)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mlockall.c b/ap/libc/glibc/glibc-2.22/misc/mlockall.c
new file mode 100644
index 0000000..be3e4f8
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mlockall.c
@@ -0,0 +1,34 @@
+/* mlockall -- lock in core all the pages in this process.  Stub version.
+   Copyright (C) 2001-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Cause all currently mapped pages of the process to be memory resident
+   until unlocked by a call to the `munlockall', until the process exits,
+   or until the process calls `execve'.  */
+
+int
+mlockall (int flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (mlockall)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mmap.c b/ap/libc/glibc/glibc-2.22/misc/mmap.c
new file mode 100644
index 0000000..9447067
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mmap.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1994-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Map addresses starting near ADDR and extending for LEN bytes.  From
+   OFFSET into the file FD describes according to PROT and FLAGS.  If ADDR
+   is nonzero, it is the desired mapping address.  If the MAP_FIXED bit is
+   set in FLAGS, the mapping will be at ADDR exactly (which must be
+   page-aligned); otherwise the system chooses a convenient nearby address.
+   The return value is the actual mapping address chosen or MAP_FAILED
+   for errors (in which case `errno' is set).  A successful `mmap' call
+   deallocates any previous mapping for the affected region.  */
+
+__ptr_t
+__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+{
+  __set_errno (ENOSYS);
+  return MAP_FAILED;
+}
+
+stub_warning (mmap)
+weak_alias (__mmap, mmap)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mmap64.c b/ap/libc/glibc/glibc-2.22/misc/mmap64.c
new file mode 100644
index 0000000..1797ed4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mmap64.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 1997-2015 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/mman.h>
+#include <sys/types.h>
+
+/* Map addresses starting near ADDR and extending for LEN bytes.  From
+   OFFSET into the file FD describes according to PROT and FLAGS.  If ADDR
+   is nonzero, it is the desired mapping address.  If the MAP_FIXED bit is
+   set in FLAGS, the mapping will be at ADDR exactly (which must be
+   page-aligned); otherwise the system chooses a convenient nearby address.
+   The return value is the actual mapping address chosen or MAP_FAILED
+   for errors (in which case `errno' is set).  A successful `mmap' call
+   deallocates any previous mapping for the affected region.  */
+
+__ptr_t
+__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
+	  __off64_t offset)
+{
+  off_t small_offset = (off_t) offset;
+
+  if (small_offset != offset)
+    {
+      /* We cannot do this since the offset is too large.  */
+      __set_errno (EOVERFLOW);
+      return MAP_FAILED;
+    }
+
+  return __mmap (addr, len, prot, flags, fd, small_offset);
+}
+
+weak_alias (__mmap64, mmap64)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mntent.c b/ap/libc/glibc/glibc-2.22/misc/mntent.c
new file mode 100644
index 0000000..7dedc62
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mntent.c
@@ -0,0 +1,53 @@
+/* Utilities for reading/writing fstab, mtab, etc.
+   Copyright (C) 1995-2015 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 <mntent.h>
+#include <stdlib.h>
+#include <bits/libc-lock.h>
+
+/* We don't want to allocate the static buffer all the time since it
+   is not always used (in fact, rather infrequently).  Accept the
+   extra cost of a `malloc'.  */
+libc_freeres_ptr (static char *getmntent_buffer);
+
+/* This is the size of the buffer.  This is really big.  */
+#define BUFFER_SIZE	4096
+
+
+static void
+allocate (void)
+{
+  getmntent_buffer = (char *) malloc (BUFFER_SIZE);
+}
+
+
+struct mntent *
+getmntent (FILE *stream)
+{
+  static struct mntent m;
+  __libc_once_define (static, once);
+  __libc_once (once, allocate);
+
+  if (getmntent_buffer == NULL)
+    /* If no core is available we don't have a chance to run the
+       program successfully and so returning NULL is an acceptable
+       result.  */
+    return NULL;
+
+  return __getmntent_r (stream, &m, getmntent_buffer, BUFFER_SIZE);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/mntent.h b/ap/libc/glibc/glibc-2.22/misc/mntent.h
new file mode 100644
index 0000000..cddb074
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mntent.h
@@ -0,0 +1,97 @@
+/* Utilities for reading/writing fstab, mtab, etc.
+   Copyright (C) 1995-2015 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/>.  */
+
+#ifndef	_MNTENT_H
+#define	_MNTENT_H	1
+
+#include <features.h>
+#define __need_FILE
+#include <stdio.h>
+#include <paths.h>
+
+
+/* File listing canonical interesting mount points.  */
+#define	MNTTAB		_PATH_MNTTAB	/* Deprecated alias.  */
+
+/* File listing currently active mount points.  */
+#define	MOUNTED		_PATH_MOUNTED	/* Deprecated alias.  */
+
+
+/* General filesystem types.  */
+#define MNTTYPE_IGNORE	"ignore"	/* Ignore this entry.  */
+#define MNTTYPE_NFS	"nfs"		/* Network file system.  */
+#define MNTTYPE_SWAP	"swap"		/* Swap device.  */
+
+
+/* Generic mount options.  */
+#define MNTOPT_DEFAULTS	"defaults"	/* Use all default options.  */
+#define MNTOPT_RO	"ro"		/* Read only.  */
+#define MNTOPT_RW	"rw"		/* Read/write.  */
+#define MNTOPT_SUID	"suid"		/* Set uid allowed.  */
+#define MNTOPT_NOSUID	"nosuid"	/* No set uid allowed.  */
+#define MNTOPT_NOAUTO	"noauto"	/* Do not auto mount.  */
+
+
+__BEGIN_DECLS
+
+/* Structure describing a mount table entry.  */
+struct mntent
+  {
+    char *mnt_fsname;		/* Device or server for filesystem.  */
+    char *mnt_dir;		/* Directory mounted on.  */
+    char *mnt_type;		/* Type of filesystem: ufs, nfs, etc.  */
+    char *mnt_opts;		/* Comma-separated options for fs.  */
+    int mnt_freq;		/* Dump frequency (in days).  */
+    int mnt_passno;		/* Pass number for `fsck'.  */
+  };
+
+
+/* Prepare to begin reading and/or writing mount table entries from the
+   beginning of FILE.  MODE is as for `fopen'.  */
+extern FILE *setmntent (const char *__file, const char *__mode) __THROW;
+
+/* Read one mount table entry from STREAM.  Returns a pointer to storage
+   reused on the next call, or null for EOF or error (use feof/ferror to
+   check).  */
+extern struct mntent *getmntent (FILE *__stream) __THROW;
+
+#ifdef __USE_MISC
+/* Reentrant version of the above function.  */
+extern struct mntent *getmntent_r (FILE *__restrict __stream,
+				   struct mntent *__restrict __result,
+				   char *__restrict __buffer,
+				   int __bufsize) __THROW;
+#endif
+
+/* Write the mount table entry described by MNT to STREAM.
+   Return zero on success, nonzero on failure.  */
+extern int addmntent (FILE *__restrict __stream,
+		      const struct mntent *__restrict __mnt) __THROW;
+
+/* Close a stream opened with `setmntent'.  */
+extern int endmntent (FILE *__stream) __THROW;
+
+/* Search MNT->mnt_opts for an option matching OPT.
+   Returns the address of the substring, or null if none found.  */
+extern char *hasmntopt (const struct mntent *__mnt,
+			const char *__opt) __THROW;
+
+
+__END_DECLS
+
+#endif	/* mntent.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/mntent_r.c b/ap/libc/glibc/glibc-2.22/misc/mntent_r.c
new file mode 100644
index 0000000..6159873
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mntent_r.c
@@ -0,0 +1,294 @@
+/* Utilities for reading/writing fstab, mtab, etc.
+   Copyright (C) 1995-2015 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 <alloca.h>
+#include <mntent.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <string.h>
+#include <sys/types.h>
+
+#define flockfile(s) _IO_flockfile (s)
+#define funlockfile(s) _IO_funlockfile (s)
+
+#undef __setmntent
+#undef __endmntent
+#undef __getmntent_r
+
+/* Prepare to begin reading and/or writing mount table entries from the
+   beginning of FILE.  MODE is as for `fopen'.  */
+FILE *
+__setmntent (const char *file, const char *mode)
+{
+  /* Extend the mode parameter with "c" to disable cancellation in the
+     I/O functions and "e" to set FD_CLOEXEC.  */
+  size_t modelen = strlen (mode);
+  char newmode[modelen + 3];
+  memcpy (mempcpy (newmode, mode, modelen), "ce", 3);
+  FILE *result = fopen (file, newmode);
+
+  if (result != NULL)
+    /* We do the locking ourselves.  */
+    __fsetlocking (result, FSETLOCKING_BYCALLER);
+
+  return result;
+}
+libc_hidden_def (__setmntent)
+weak_alias (__setmntent, setmntent)
+
+
+/* Close a stream opened with `setmntent'.  */
+int
+__endmntent (FILE *stream)
+{
+  if (stream)		/* SunOS 4.x allows for NULL stream */
+    fclose (stream);
+  return 1;		/* SunOS 4.x says to always return 1 */
+}
+libc_hidden_def (__endmntent)
+weak_alias (__endmntent, endmntent)
+
+
+/* Since the values in a line are separated by spaces, a name cannot
+   contain a space.  Therefore some programs encode spaces in names
+   by the strings "\040".  We undo the encoding when reading an entry.
+   The decoding happens in place.  */
+static char *
+decode_name (char *buf)
+{
+  char *rp = buf;
+  char *wp = buf;
+
+  do
+    if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '4' && rp[3] == '0')
+      {
+	/* \040 is a SPACE.  */
+	*wp++ = ' ';
+	rp += 3;
+      }
+    else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '1')
+      {
+	/* \011 is a TAB.  */
+	*wp++ = '\t';
+	rp += 3;
+      }
+    else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '2')
+      {
+	/* \012 is a NEWLINE.  */
+	*wp++ = '\n';
+	rp += 3;
+      }
+    else if (rp[0] == '\\' && rp[1] == '\\')
+      {
+	/* We have to escape \\ to be able to represent all characters.  */
+	*wp++ = '\\';
+	rp += 1;
+      }
+    else if (rp[0] == '\\' && rp[1] == '1' && rp[2] == '3' && rp[3] == '4')
+      {
+	/* \134 is also \\.  */
+	*wp++ = '\\';
+	rp += 3;
+      }
+    else
+      *wp++ = *rp;
+  while (*rp++ != '\0');
+
+  return buf;
+}
+
+
+/* Read one mount table entry from STREAM.  Returns a pointer to storage
+   reused on the next call, or null for EOF or error (use feof/ferror to
+   check).  */
+struct mntent *
+__getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
+{
+  char *cp;
+  char *head;
+
+  flockfile (stream);
+  do
+    {
+      char *end_ptr;
+
+      if (__fgets_unlocked (buffer, bufsiz, stream) == NULL)
+	{
+	  funlockfile (stream);
+	  return NULL;
+	}
+
+      end_ptr = strchr (buffer, '\n');
+      if (end_ptr != NULL)	/* chop newline */
+	{
+	  while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t')
+            end_ptr--;
+	  *end_ptr = '\0';
+	}
+      else
+	{
+	  /* Not the whole line was read.  Do it now but forget it.  */
+	  char tmp[1024];
+	  while (__fgets_unlocked (tmp, sizeof tmp, stream) != NULL)
+	    if (strchr (tmp, '\n') != NULL)
+	      break;
+	}
+
+      head = buffer + strspn (buffer, " \t");
+      /* skip empty lines and comment lines:  */
+    }
+  while (head[0] == '\0' || head[0] == '#');
+
+  cp = __strsep (&head, " \t");
+  mp->mnt_fsname = cp != NULL ? decode_name (cp) : (char *) "";
+  if (head)
+    head += strspn (head, " \t");
+  cp = __strsep (&head, " \t");
+  mp->mnt_dir = cp != NULL ? decode_name (cp) : (char *) "";
+  if (head)
+    head += strspn (head, " \t");
+  cp = __strsep (&head, " \t");
+  mp->mnt_type = cp != NULL ? decode_name (cp) : (char *) "";
+  if (head)
+    head += strspn (head, " \t");
+  cp = __strsep (&head, " \t");
+  mp->mnt_opts = cp != NULL ? decode_name (cp) : (char *) "";
+  switch (head ? sscanf (head, " %d %d ", &mp->mnt_freq, &mp->mnt_passno) : 0)
+    {
+    case 0:
+      mp->mnt_freq = 0;
+    case 1:
+      mp->mnt_passno = 0;
+    case 2:
+      break;
+    }
+  funlockfile (stream);
+
+  return mp;
+}
+libc_hidden_def (__getmntent_r)
+weak_alias (__getmntent_r, getmntent_r)
+
+
+/* We have to use an encoding for names if they contain spaces or tabs.
+   To be able to represent all characters we also have to escape the
+   backslash itself.  This "function" must be a macro since we use
+   `alloca'.  */
+#define encode_name(name) \
+  do {									      \
+    const char *rp = name;						      \
+									      \
+    while (*rp != '\0')							      \
+      if (*rp == ' ' || *rp == '\t' || *rp == '\n' || *rp == '\\')	      \
+	break;								      \
+      else								      \
+	++rp;								      \
+									      \
+    if (*rp != '\0')							      \
+      {									      \
+	/* In the worst case the length of the string can increase to	      \
+	   four times the current length.  */				      \
+	char *wp;							      \
+									      \
+	rp = name;							      \
+	name = wp = (char *) alloca (strlen (name) * 4 + 1);		      \
+									      \
+	do								      \
+	  if (*rp == ' ')						      \
+	    {								      \
+	      *wp++ = '\\';						      \
+	      *wp++ = '0';						      \
+	      *wp++ = '4';						      \
+	      *wp++ = '0';						      \
+	    }								      \
+	  else if (*rp == '\t')						      \
+	    {								      \
+	      *wp++ = '\\';						      \
+	      *wp++ = '0';						      \
+	      *wp++ = '1';						      \
+	      *wp++ = '1';						      \
+	    }								      \
+	  else if (*rp == '\n')						      \
+	    {								      \
+	      *wp++ = '\\';						      \
+	      *wp++ = '0';						      \
+	      *wp++ = '1';						      \
+	      *wp++ = '2';						      \
+	    }								      \
+	  else if (*rp == '\\')						      \
+	    {								      \
+	      *wp++ = '\\';						      \
+	      *wp++ = '\\';						      \
+	    }								      \
+	  else								      \
+	    *wp++ = *rp;						      \
+	while (*rp++ != '\0');						      \
+      }									      \
+  } while (0)
+
+
+/* Write the mount table entry described by MNT to STREAM.
+   Return zero on success, nonzero on failure.  */
+int
+__addmntent (FILE *stream, const struct mntent *mnt)
+{
+  struct mntent mntcopy = *mnt;
+  if (fseek (stream, 0, SEEK_END))
+    return 1;
+
+  /* Encode spaces and tabs in the names.  */
+  encode_name (mntcopy.mnt_fsname);
+  encode_name (mntcopy.mnt_dir);
+  encode_name (mntcopy.mnt_type);
+  encode_name (mntcopy.mnt_opts);
+
+  return (fprintf (stream, "%s %s %s %s %d %d\n",
+		   mntcopy.mnt_fsname,
+		   mntcopy.mnt_dir,
+		   mntcopy.mnt_type,
+		   mntcopy.mnt_opts,
+		   mntcopy.mnt_freq,
+		   mntcopy.mnt_passno) < 0
+	  || fflush (stream) != 0);
+}
+weak_alias (__addmntent, addmntent)
+
+
+/* Search MNT->mnt_opts for an option matching OPT.
+   Returns the address of the substring, or null if none found.  */
+char *
+__hasmntopt (const struct mntent *mnt, const char *opt)
+{
+  const size_t optlen = strlen (opt);
+  char *rest = mnt->mnt_opts, *p;
+
+  while ((p = strstr (rest, opt)) != NULL)
+    {
+      if ((p == rest || p[-1] == ',')
+	  && (p[optlen] == '\0' || p[optlen] == '=' || p[optlen] == ','))
+	return p;
+
+      rest = strchr (p, ',');
+      if (rest == NULL)
+	break;
+      ++rest;
+    }
+
+  return NULL;
+}
+weak_alias (__hasmntopt, hasmntopt)
diff --git a/ap/libc/glibc/glibc-2.22/misc/mprotect.c b/ap/libc/glibc/glibc-2.22/misc/mprotect.c
new file mode 100644
index 0000000..64a72c4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/mprotect.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1994-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Change the memory protection of the region starting at ADDR and
+   extending LEN bytes to PROT.  Returns 0 if successful, -1 for errors
+   (and sets errno).  */
+
+int
+__mprotect (__ptr_t addr, size_t len, int prot)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__mprotect, mprotect)
+
+stub_warning (mprotect)
diff --git a/ap/libc/glibc/glibc-2.22/misc/msync.c b/ap/libc/glibc/glibc-2.22/misc/msync.c
new file mode 100644
index 0000000..82589dd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/msync.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1994-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Synchronize the region starting at ADDR and extending LEN bytes with the
+   file it maps.  Filesystem operations on a file being mapped are
+   unpredictable before this is done.  */
+
+int
+msync (__ptr_t addr, size_t len, int flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msync)
diff --git a/ap/libc/glibc/glibc-2.22/misc/munlock.c b/ap/libc/glibc/glibc-2.22/misc/munlock.c
new file mode 100644
index 0000000..50f3ae4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/munlock.c
@@ -0,0 +1,32 @@
+/* munlock -- undo the effects of prior mlock calls.  Stub version.
+   Copyright (C) 2001-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Undo the effects on these whole pages of any prior mlock calls.  */
+
+int
+munlock (const void *addr, size_t len)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (munlock)
diff --git a/ap/libc/glibc/glibc-2.22/misc/munlockall.c b/ap/libc/glibc/glibc-2.22/misc/munlockall.c
new file mode 100644
index 0000000..0c26450
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/munlockall.c
@@ -0,0 +1,32 @@
+/* munlockall -- undo the effects of all prior mlock calls.  Stub version.
+   Copyright (C) 2001-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Undo the effects of all prior mlock calls in this process.  */
+
+int
+munlockall (void)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (munlockall)
diff --git a/ap/libc/glibc/glibc-2.22/misc/munmap.c b/ap/libc/glibc/glibc-2.22/misc/munmap.c
new file mode 100644
index 0000000..2f42b1a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/munmap.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1994-2015 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 <sys/mman.h>
+#include <errno.h>
+
+/* Deallocate any mapping for the region starting at ADDR and extending LEN
+   bytes.  Returns 0 if successful, -1 for errors (and sets errno).  */
+
+int
+__munmap (__ptr_t addr, size_t len)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (munmap)
+weak_alias (__munmap, munmap)
diff --git a/ap/libc/glibc/glibc-2.22/misc/preadv.c b/ap/libc/glibc/glibc-2.22/misc/preadv.c
new file mode 100644
index 0000000..36296e3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/preadv.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2009-2015 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 <unistd.h>
+#include <sys/uio.h>
+
+/* Read data from file descriptor FD at the given position OFFSET
+   without change the file pointer, and put the result in the buffers
+   described by VECTOR, which is a vector of COUNT 'struct iovec's.
+   The buffers are filled in the order specified.  Operates just like
+   'pread' (see <unistd.h>) except that data are put in VECTOR instead
+   of a contiguous buffer.  */
+ssize_t
+preadv (fd, vector, count, offset)
+     int fd;
+     const struct iovec *vector;
+     int count;
+     off_t offset;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (preadv)
diff --git a/ap/libc/glibc/glibc-2.22/misc/preadv64.c b/ap/libc/glibc/glibc-2.22/misc/preadv64.c
new file mode 100644
index 0000000..d73ad87
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/preadv64.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2009-2015 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 <unistd.h>
+#include <sys/uio.h>
+
+/* Read data from file descriptor FD at the given position OFFSET
+   without change the file pointer, and put the result in the buffers
+   described by VECTOR, which is a vector of COUNT 'struct iovec's.
+   The buffers are filled in the order specified.  Operates just like
+   'pread' (see <unistd.h>) except that data are put in VECTOR instead
+   of a contiguous buffer.  */
+ssize_t
+preadv64 (fd, vector, count, offset)
+     int fd;
+     const struct iovec *vector;
+     int count;
+     off64_t offset;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (preadv64)
diff --git a/ap/libc/glibc/glibc-2.22/misc/pselect.c b/ap/libc/glibc/glibc-2.22/misc/pselect.c
new file mode 100644
index 0000000..2f8d0a3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/pselect.c
@@ -0,0 +1,78 @@
+/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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 <signal.h>
+#include <stddef.h>	/* For NULL.  */
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sysdep-cancel.h>
+
+
+/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
+   readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
+   (if not NULL) for exceptional conditions.  If TIMEOUT is not NULL, time out
+   after waiting the interval specified therein.  Additionally set the sigmask
+   SIGMASK for this call.  Returns the number of ready descriptors, or -1 for
+   errors.  */
+int
+__pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+	   const struct timespec *timeout, const sigset_t *sigmask)
+{
+  struct timeval tval;
+  int retval;
+  sigset_t savemask;
+
+  /* Change nanosecond number to microseconds.  This might mean losing
+     precision and therefore the `pselect` should be available.  But
+     for now it is hardly found.  */
+  if (timeout != NULL)
+    {
+      /* Catch bugs which would be hidden by the TIMESPEC_TO_TIMEVAL
+	 computations.  The division by 1000 truncates values.  */
+      if (__glibc_unlikely (timeout->tv_nsec < 0))
+	{
+	  __set_errno (EINVAL);
+	  return -1;
+	}
+
+      TIMESPEC_TO_TIMEVAL (&tval, timeout);
+    }
+
+  /* The setting and restoring of the signal mask and the select call
+     should be an atomic operation.  This can't be done without kernel
+     help.  */
+  if (sigmask != NULL)
+    __sigprocmask (SIG_SETMASK, sigmask, &savemask);
+
+  /* Note the pselect() is a cancellation point.  But since we call
+     select() which itself is a cancellation point we do not have
+     to do anything here.  */
+  retval = __select (nfds, readfds, writefds, exceptfds,
+		     timeout != NULL ? &tval : NULL);
+
+  if (sigmask != NULL)
+    __sigprocmask (SIG_SETMASK, &savemask, NULL);
+
+  return retval;
+}
+#ifndef __pselect
+weak_alias (__pselect, pselect)
+/* __select handles cancellation.  */
+LIBC_CANCEL_HANDLED ();
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/misc/ptrace.c b/ap/libc/glibc/glibc-2.22/misc/ptrace.c
new file mode 100644
index 0000000..095ad3f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ptrace.c
@@ -0,0 +1,109 @@
+/* Copyright (C) 1991-2015 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/ptrace.h>
+#include <sys/types.h>
+#include <stdarg.h>
+#include <libc-internal.h>
+
+/* Perform process tracing functions.  REQUEST is one of the values
+   in <sys/ptrace.h>, and determines the action to be taken.
+   For all requests except PTRACE_TRACEME, PID specifies the process to be
+   traced.
+
+   PID and the other arguments described above for the various requests should
+   appear (those that are used for the particular request) as:
+     pid_t PID, void *ADDR, int DATA, void *ADDR2
+   after PID.  */
+int
+ptrace (enum __ptrace_request request, ...)
+{
+  pid_t pid;
+  void *addr;
+  void *addr2;
+  int data;
+  va_list ap;
+
+  switch (request)
+    {
+    case PTRACE_TRACEME:
+    case PTRACE_CONT:
+    case PTRACE_KILL:
+    case PTRACE_SINGLESTEP:
+    case PTRACE_ATTACH:
+    case PTRACE_DETACH:
+      break;
+
+    case PTRACE_PEEKTEXT:
+    case PTRACE_PEEKDATA:
+    case PTRACE_PEEKUSER:
+    case PTRACE_GETREGS:
+    case PTRACE_SETREGS:
+#ifdef PTRACE_GETFPREGS
+    case PTRACE_GETFPGEGS:
+#endif
+    case PTRACE_SETFPREGS:
+    case PTRACE_GETFPAREGS:
+    case PTRACE_SETFPAREGS:
+      va_start (ap, request);
+      pid = va_arg (ap, pid_t);
+      addr = va_arg (ap, void *);
+      va_end (ap);
+      ignore_value (pid);
+      ignore_value (addr);
+      break;
+
+    case PTRACE_POKETEXT:
+    case PTRACE_POKEDATA:
+    case PTRACE_POKEUSER:
+      va_start (ap, request);
+      pid = va_arg (ap, pid_t);
+      addr = va_arg (ap, void *);
+      data = va_arg (ap, int);
+      va_end (ap);
+      ignore_value (pid);
+      ignore_value (addr);
+      ignore_value (data);
+      break;
+
+    case PTRACE_READDATA:
+    case PTRACE_WRITEDATA:
+    case PTRACE_READTEXT:
+    case PTRACE_WRITETEXT:
+      va_start (ap, request);
+      pid = va_arg (ap, pid_t);
+      addr = va_arg (ap, void *);
+      data = va_arg (ap, int);
+      addr2 = va_arg (ap, void *);
+      va_end (ap);
+      ignore_value (pid);
+      ignore_value (addr);
+      ignore_value (data);
+      ignore_value (addr2);
+      break;
+
+    default:
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (ptrace)
diff --git a/ap/libc/glibc/glibc-2.22/misc/pwritev.c b/ap/libc/glibc/glibc-2.22/misc/pwritev.c
new file mode 100644
index 0000000..0b09809
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/pwritev.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2009-2015 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 <unistd.h>
+#include <sys/uio.h>
+
+/* Write data pointed by the buffers described by VECTOR, which is a
+   vector of COUNT 'struct iovec's, to file descriptor FD at the given
+   position OFFSET without change the file pointer.  The data is
+   written in the order specified.  Operates just like 'pwrite' (see
+   <unistd.h>) except that the data are taken from VECTOR instead of a
+   contiguous buffer.  */
+ssize_t
+pwritev (fd, vector, count, offset)
+     int fd;
+     const struct iovec *vector;
+     int count;
+     off_t offset;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (pwritev)
diff --git a/ap/libc/glibc/glibc-2.22/misc/pwritev64.c b/ap/libc/glibc/glibc-2.22/misc/pwritev64.c
new file mode 100644
index 0000000..8201b2c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/pwritev64.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2009-2015 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 <unistd.h>
+#include <sys/uio.h>
+
+/* Write data pointed by the buffers described by VECTOR, which is a
+   vector of COUNT 'struct iovec's, to file descriptor FD at the given
+   position OFFSET without change the file pointer.  The data is
+   written in the order specified.  Operates just like 'pwrite' (see
+   <unistd.h>) except that the data are taken from VECTOR instead of a
+   contiguous buffer.  */
+ssize_t
+pwritev64 (fd, vector, count, offset)
+     int fd;
+     const struct iovec *vector;
+     int count;
+     off64_t offset;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (pwritev64)
diff --git a/ap/libc/glibc/glibc-2.22/misc/qefgcvt.c b/ap/libc/glibc/glibc-2.22/misc/qefgcvt.c
new file mode 100644
index 0000000..bc884a6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/qefgcvt.c
@@ -0,0 +1,46 @@
+/* Compatibility functions for floating point formatting, long double version.
+   Copyright (C) 1996-2015 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 <float.h>
+
+#define FLOAT_TYPE long double
+#define FUNC_PREFIX q
+#define FLOAT_FMT_FLAG "L"
+/* Actually we have to write (LDBL_DIG + log10 (LDBL_MAX_10_EXP)) but
+   we don't have log10 available in the preprocessor.  Since we cannot
+   assume anything on the used `long double' format be generous.  */
+#define MAXDIG (NDIGIT_MAX + 12)
+#define FCVT_MAXDIG (LDBL_MAX_10_EXP + MAXDIG)
+#if LDBL_MANT_DIG == 64
+# define NDIGIT_MAX 21
+#elif LDBL_MANT_DIG == 53
+# define NDIGIT_MAX 17
+#elif LDBL_MANT_DIG == 113
+# define NDIGIT_MAX 36
+#elif LDBL_MANT_DIG == 106
+# define NDIGIT_MAX 34
+#elif LDBL_MANT_DIG == 56
+# define NDIGIT_MAX 18
+#else
+/* See IEEE 854 5.6, table 2 for this formula.  Unfortunately we need a
+   compile time constant here, so we cannot use it.  */
+# error "NDIGIT_MAX must be precomputed"
+# define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * LDBL_MANT_DIG + 1.0)))
+#endif
+
+#include "efgcvt.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/qefgcvt_r.c b/ap/libc/glibc/glibc-2.22/misc/qefgcvt_r.c
new file mode 100644
index 0000000..77a7628
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/qefgcvt_r.c
@@ -0,0 +1,57 @@
+/* Compatibility functions for floating point formatting, reentrant,
+   long double versions.
+   Copyright (C) 1996-2015 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 <float.h>
+
+#define FLOAT_TYPE long double
+#define FUNC_PREFIX q
+#define FLOAT_FMT_FLAG "L"
+#define FLOAT_NAME_EXT l
+#define FLOAT_MIN_10_EXP LDBL_MIN_10_EXP
+#if LDBL_MANT_DIG == 64
+# define NDIGIT_MAX 21
+#elif LDBL_MANT_DIG == 53
+# define NDIGIT_MAX 17
+#elif LDBL_MANT_DIG == 113
+# define NDIGIT_MAX 36
+#elif LDBL_MANT_DIG == 106
+# define NDIGIT_MAX 34
+#elif LDBL_MANT_DIG == 56
+# define NDIGIT_MAX 18
+#else
+/* See IEEE 854 5.6, table 2 for this formula.  Unfortunately we need a
+   compile time constant here, so we cannot use it.  */
+# error "NDIGIT_MAX must be precomputed"
+# define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * LDBL_MANT_DIG + 1.0)))
+#endif
+#if LDBL_MIN_10_EXP == -37
+# define FLOAT_MIN_10_NORM	1.0e-37L
+#elif LDBL_MIN_10_EXP == -291
+# define FLOAT_MIN_10_NORM	1.0e-291L
+#elif LDBL_MIN_10_EXP == -307
+# define FLOAT_MIN_10_NORM	1.0e-307L
+#elif LDBL_MIN_10_EXP == -4931
+# define FLOAT_MIN_10_NORM	1.0e-4931L
+#else
+/* libc can't depend on libm.  */
+# error "FLOAT_MIN_10_NORM must be precomputed"
+# define FLOAT_MIN_10_NORM	exp10l (LDBL_MIN_10_EXP)
+#endif
+
+#include "efgcvt_r.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/readv.c b/ap/libc/glibc/glibc-2.22/misc/readv.c
new file mode 100644
index 0000000..de78708
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/readv.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+#include <sys/uio.h>
+
+/* Read data from file descriptor FD, and put the result in the
+   buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
+   The buffers are filled in the order specified.
+   Operates just like `read' (see <unistd.h>) except that data are
+   put in VECTOR instead of a contiguous buffer.  */
+ssize_t
+__readv (fd, vector, count)
+     int fd;
+     const struct iovec *vector;
+     int count;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__readv, readv)
+
+stub_warning (readv)
diff --git a/ap/libc/glibc/glibc-2.22/misc/reboot.c b/ap/libc/glibc/glibc-2.22/misc/reboot.c
new file mode 100644
index 0000000..de70662
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/reboot.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1992-2015 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 <unistd.h>
+#include <sys/reboot.h>
+#include <libc-internal.h>
+
+/* Reboot the system.  */
+int
+reboot (int howto)
+{
+  ignore_value (howto);
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (reboot)
diff --git a/ap/libc/glibc/glibc-2.22/misc/regexp.c b/ap/libc/glibc/glibc-2.22/misc/regexp.c
new file mode 100644
index 0000000..ee7d572
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/regexp.c
@@ -0,0 +1,77 @@
+/* Define function and variables for the obsolete <regexp.h> interface.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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 don't include regexp.h here because of the macros it requires, and
+   because it now contains an unconditional #warning.  */
+
+#include <regex.h>
+
+/* Define the variables used for the interface.  */
+char *loc1;
+char *loc2;
+
+/* Although we do not support the use we define this variable as well.  */
+char *locs;
+
+
+/* Find the next match in STRING.  The compiled regular expression is
+   found in the buffer starting at EXPBUF.  `loc1' will return the
+   first character matched and `loc2' points to the next unmatched
+   character.  */
+int
+__step (const char *string, const char *expbuf)
+{
+  regmatch_t match;	/* We only need info about the full match.  */
+
+  expbuf += __alignof (regex_t *);
+  expbuf -= (expbuf - ((const char *) 0)) % __alignof__ (regex_t *);
+
+  if (__regexec ((const regex_t *) expbuf, string, 1, &match, REG_NOTEOL)
+      == REG_NOMATCH)
+    return 0;
+
+  loc1 = (char *) string + match.rm_so;
+  loc2 = (char *) string + match.rm_eo;
+  return 1;
+}
+weak_alias (__step, step)
+
+
+/* Match the beginning of STRING with the compiled regular expression
+   in EXPBUF.  If the match is successful `loc2' will contain the
+   position of the first unmatched character.  */
+int
+__advance (const char *string, const char *expbuf)
+{
+  regmatch_t match;	/* We only need info about the full match.  */
+
+  expbuf += __alignof__ (regex_t *);
+  expbuf -= (expbuf - ((const char *) 0)) % __alignof__ (regex_t *);
+
+  if (__regexec ((const regex_t *) expbuf, string, 1, &match, REG_NOTEOL)
+      == REG_NOMATCH
+      /* We have to check whether the check is at the beginning of the
+	 buffer.  */
+      || match.rm_so != 0)
+    return 0;
+
+  loc2 = (char *) string + match.rm_eo;
+  return 1;
+}
+weak_alias (__advance, advance)
diff --git a/ap/libc/glibc/glibc-2.22/misc/regexp.h b/ap/libc/glibc/glibc-2.22/misc/regexp.h
new file mode 100644
index 0000000..3460989
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/regexp.h
@@ -0,0 +1,229 @@
+/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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/>.  */
+
+#ifndef _REGEXP_H
+#define _REGEXP_H	1
+
+/* The contents of this header file were standardized in the
+   Single Unix Specification, Version 2 (1997) but marked as
+   LEGACY; new applications were already being encouraged to
+   use <regex.h> instead.  POSIX.1-2001 removed this header.
+
+   This header is provided only for backward compatibility.
+   It will be removed in the next release of the GNU C Library.
+   New code should use <regex.h> instead.  */
+
+#warning "<regexp.h> will be removed in the next release of the GNU C Library."
+#warning "Please update your code to use <regex.h> instead (no trailing 'p')."
+
+#include <features.h>
+#include <alloca.h>
+#include <regex.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* The implementation provided here emulates the needed functionality
+   by mapping to the POSIX regular expression matcher.  The interface
+   for the here included function is weird (this really is a harmless
+   word).
+
+   The user has to provide six macros before this header file can be
+   included:
+
+   INIT		Declarations vor variables which can be used by the
+		other macros.
+
+   GETC()	Return the value of the next character in the regular
+		expression pattern.  Successive calls should return
+		successive characters.
+
+   PEEKC()	Return the value of the next character in the regular
+		expression pattern.  Immediately successive calls to
+		PEEKC() should return the same character which should
+		also be the next character returned by GETC().
+
+   UNGETC(c)	Cause `c' to be returned by the next call to GETC() and
+		PEEKC().
+
+   RETURN(ptr)	Used for normal exit of the `compile' function.  `ptr'
+		is a pointer to the character after the last character of
+		the compiled regular expression.
+
+   ERROR(val)	Used for abnormal return from `compile'.  `val' is the
+		error number.  The error codes are:
+		11	Range endpoint too large.
+		16	Bad number.
+		25	\digit out of range.
+		36	Illegal or missing delimiter.
+		41	No remembered search string.
+		42	\( \) imbalance.
+		43	Too many \(.
+		44	More tan two numbers given in \{ \}.
+		45	} expected after \.
+		46	First number exceeds second in \{ \}.
+		49	[ ] imbalance.
+		50	Regular expression overflow.
+
+  */
+
+__BEGIN_DECLS
+
+/* Interface variables.  They contain the results of the successful
+   calls to `setp' and `advance'.  */
+extern char *loc1;
+extern char *loc2;
+
+/* The use of this variable in the `advance' function is not
+   supported.  */
+extern char *locs;
+
+
+#ifndef __DO_NOT_DEFINE_COMPILE
+/* Get and compile the user supplied pattern up to end of line or
+   string or until EOF is seen, whatever happens first.  The result is
+   placed in the buffer starting at EXPBUF and delimited by ENDBUF.
+
+   This function cannot be defined in the libc itself since it depends
+   on the macros.  */
+char *
+compile (char *__restrict instring, char *__restrict expbuf,
+	 const char *__restrict endbuf, int eof)
+{
+  char *__input_buffer = NULL;
+  size_t __input_size = 0;
+  size_t __current_size = 0;
+  int __ch;
+  int __error;
+  INIT
+
+  /* Align the expression buffer according to the needs for an object
+     of type `regex_t'.  Then check for minimum size of the buffer for
+     the compiled regular expression.  */
+  regex_t *__expr_ptr;
+# if defined __GNUC__ && __GNUC__ >= 2
+  const size_t __req = __alignof__ (regex_t *);
+# else
+  /* How shall we find out?  We simply guess it and can change it is
+     this really proofs to be wrong.  */
+  const size_t __req = 8;
+# endif
+  expbuf += __req;
+  expbuf -= (expbuf - ((char *) 0)) % __req;
+  if (endbuf < expbuf + sizeof (regex_t))
+    {
+      ERROR (50);
+    }
+  __expr_ptr = (regex_t *) expbuf;
+  /* The remaining space in the buffer can be used for the compiled
+     pattern.  */
+  __expr_ptr->__REPB_PREFIX (buffer) = expbuf + sizeof (regex_t);
+  __expr_ptr->__REPB_PREFIX (allocated)
+    = endbuf - (char *) __expr_ptr->__REPB_PREFIX (buffer);
+
+  while ((__ch = (GETC ())) != eof)
+    {
+      if (__ch == '\0' || __ch == '\n')
+	{
+	  UNGETC (__ch);
+	  break;
+	}
+
+      if (__current_size + 1 >= __input_size)
+	{
+	  size_t __new_size = __input_size ? 2 * __input_size : 128;
+	  char *__new_room = (char *) alloca (__new_size);
+	  /* See whether we can use the old buffer.  */
+	  if (__new_room + __new_size == __input_buffer)
+	    {
+	      __input_size += __new_size;
+	      __input_buffer = (char *) memcpy (__new_room, __input_buffer,
+					       __current_size);
+	    }
+	  else if (__input_buffer + __input_size == __new_room)
+	    __input_size += __new_size;
+	  else
+	    {
+	      __input_size = __new_size;
+	      __input_buffer = (char *) memcpy (__new_room, __input_buffer,
+						__current_size);
+	    }
+	}
+      __input_buffer[__current_size++] = __ch;
+    }
+  if (__current_size)
+    __input_buffer[__current_size++] = '\0';
+  else
+    __input_buffer = "";
+
+  /* Now compile the pattern.  */
+  __error = regcomp (__expr_ptr, __input_buffer, REG_NEWLINE);
+  if (__error != 0)
+    /* Oh well, we have to translate POSIX error codes.  */
+    switch (__error)
+      {
+      case REG_BADPAT:
+      case REG_ECOLLATE:
+      case REG_ECTYPE:
+      case REG_EESCAPE:
+      case REG_BADRPT:
+      case REG_EEND:
+      case REG_ERPAREN:
+      default:
+	/* There is no matching error code.  */
+	ERROR (36);
+      case REG_ESUBREG:
+	ERROR (25);
+      case REG_EBRACK:
+	ERROR (49);
+      case REG_EPAREN:
+	ERROR (42);
+      case REG_EBRACE:
+	ERROR (44);
+      case REG_BADBR:
+	ERROR (46);
+      case REG_ERANGE:
+	ERROR (11);
+      case REG_ESPACE:
+      case REG_ESIZE:
+	ERROR (50);
+      }
+
+  /* Everything is ok.  */
+  RETURN ((char *) (__expr_ptr->__REPB_PREFIX (buffer)
+		    + __expr_ptr->__REPB_PREFIX (used)));
+}
+#endif
+
+
+/* Find the next match in STRING.  The compiled regular expression is
+   found in the buffer starting at EXPBUF.  `loc1' will return the
+   first character matched and `loc2' points to the next unmatched
+   character.  */
+extern int step (const char *__restrict __string,
+		 const char *__restrict __expbuf) __THROW;
+
+/* Match the beginning of STRING with the compiled regular expression
+   in EXPBUF.  If the match is successful `loc2' will contain the
+   position of the first unmatched character.  */
+extern int advance (const char *__restrict __string,
+		    const char *__restrict __expbuf) __THROW;
+
+
+__END_DECLS
+
+#endif /* regexp.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/remap_file_pages.c b/ap/libc/glibc/glibc-2.22/misc/remap_file_pages.c
new file mode 100644
index 0000000..6440726
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/remap_file_pages.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2003-2015 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/mman.h>
+#include <errno.h>
+
+/* Remap arbitrary pages of a shared backing store within an existing
+   VMA.  */
+
+int
+__remap_file_pages (void *start, size_t size, int prot, size_t pgoff,
+		    int flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (remap_file_pages)
+weak_alias (__remap_file_pages, remap_file_pages)
diff --git a/ap/libc/glibc/glibc-2.22/misc/removexattr.c b/ap/libc/glibc/glibc-2.22/misc/removexattr.c
new file mode 100644
index 0000000..26bfb0b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/removexattr.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+int
+removexattr (const char *__path, const char *__name)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (removexattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/revoke.c b/ap/libc/glibc/glibc-2.22/misc/revoke.c
new file mode 100644
index 0000000..2baf5d6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/revoke.c
@@ -0,0 +1,29 @@
+/* Revoke the access of all descriptors currently open on a file.
+   Copyright (C) 1995-2015 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 <unistd.h>
+#include <errno.h>
+
+int
+revoke (file)
+     const char *file;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (revoke)
diff --git a/ap/libc/glibc/glibc-2.22/misc/sbrk.c b/ap/libc/glibc/glibc-2.22/misc/sbrk.c
new file mode 100644
index 0000000..89ab9c4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sbrk.c
@@ -0,0 +1,64 @@
+/* Copyright (C) 1991-2015 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 <stdint.h>
+#include <unistd.h>
+
+/* Defined in brk.c.  */
+extern void *__curbrk;
+extern int __brk (void *addr);
+
+/* Defined in init-first.c.  */
+extern int __libc_multiple_libcs attribute_hidden;
+
+/* Extend the process's data space by INCREMENT.
+   If INCREMENT is negative, shrink data space by - INCREMENT.
+   Return start of new space allocated, or -1 for errors.  */
+void *
+__sbrk (intptr_t increment)
+{
+  void *oldbrk;
+
+  /* If this is not part of the dynamic library or the library is used
+     via dynamic loading in a statically linked program update
+     __curbrk from the kernel's brk value.  That way two separate
+     instances of __brk and __sbrk can share the heap, returning
+     interleaved pieces of it.  */
+  if (__curbrk == NULL || __libc_multiple_libcs)
+    if (__brk (0) < 0)		/* Initialize the break.  */
+      return (void *) -1;
+
+  if (increment == 0)
+    return __curbrk;
+
+  oldbrk = __curbrk;
+  if (increment > 0
+      ? ((uintptr_t) oldbrk + (uintptr_t) increment < (uintptr_t) oldbrk)
+      : ((uintptr_t) oldbrk < (uintptr_t) -increment))
+    {
+      __set_errno (ENOMEM);
+      return (void *) -1;
+    }
+
+  if (__brk (oldbrk + increment) < 0)
+    return (void *) -1;
+
+  return oldbrk;
+}
+libc_hidden_def (__sbrk)
+weak_alias (__sbrk, sbrk)
diff --git a/ap/libc/glibc/glibc-2.22/misc/search.h b/ap/libc/glibc/glibc-2.22/misc/search.h
new file mode 100644
index 0000000..60e3746
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/search.h
@@ -0,0 +1,174 @@
+/* Declarations for System V style searching functions.
+   Copyright (C) 1995-2015 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/>.  */
+
+#ifndef _SEARCH_H
+#define	_SEARCH_H 1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+__BEGIN_DECLS
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+/* Prototype structure for a linked-list data structure.
+   This is the type used by the `insque' and `remque' functions.  */
+
+# ifdef __USE_GNU
+struct qelem
+  {
+    struct qelem *q_forw;
+    struct qelem *q_back;
+    char q_data[1];
+  };
+# endif
+
+
+/* Insert ELEM into a doubly-linked list, after PREV.  */
+extern void insque (void *__elem, void *__prev) __THROW;
+
+/* Unlink ELEM from the doubly-linked list that it is in.  */
+extern void remque (void *__elem) __THROW;
+#endif
+
+
+/* For use with hsearch(3).  */
+#ifndef __COMPAR_FN_T
+# define __COMPAR_FN_T
+typedef int (*__compar_fn_t) (const void *, const void *);
+
+# ifdef	__USE_GNU
+typedef __compar_fn_t comparison_fn_t;
+# endif
+#endif
+
+/* Action which shall be performed in the call the hsearch.  */
+typedef enum
+  {
+    FIND,
+    ENTER
+  }
+ACTION;
+
+typedef struct entry
+  {
+    char *key;
+    void *data;
+  }
+ENTRY;
+
+/* Opaque type for internal use.  */
+struct _ENTRY;
+
+/* Family of hash table handling functions.  The functions also
+   have reentrant counterparts ending with _r.  The non-reentrant
+   functions all work on a signle internal hashing table.  */
+
+/* Search for entry matching ITEM.key in internal hash table.  If
+   ACTION is `FIND' return found entry or signal error by returning
+   NULL.  If ACTION is `ENTER' replace existing data (if any) with
+   ITEM.data.  */
+extern ENTRY *hsearch (ENTRY __item, ACTION __action) __THROW;
+
+/* Create a new hashing table which will at most contain NEL elements.  */
+extern int hcreate (size_t __nel) __THROW;
+
+/* Destroy current internal hashing table.  */
+extern void hdestroy (void) __THROW;
+
+#ifdef __USE_GNU
+/* Data type for reentrant functions.  */
+struct hsearch_data
+  {
+    struct _ENTRY *table;
+    unsigned int size;
+    unsigned int filled;
+  };
+
+/* Reentrant versions which can handle multiple hashing tables at the
+   same time.  */
+extern int hsearch_r (ENTRY __item, ACTION __action, ENTRY **__retval,
+		      struct hsearch_data *__htab) __THROW;
+extern int hcreate_r (size_t __nel, struct hsearch_data *__htab) __THROW;
+extern void hdestroy_r (struct hsearch_data *__htab) __THROW;
+#endif
+
+
+/* The tsearch routines are very interesting. They make many
+   assumptions about the compiler.  It assumes that the first field
+   in node must be the "key" field, which points to the datum.
+   Everything depends on that.  */
+/* For tsearch */
+typedef enum
+{
+  preorder,
+  postorder,
+  endorder,
+  leaf
+}
+VISIT;
+
+/* Search for an entry matching the given KEY in the tree pointed to
+   by *ROOTP and insert a new element if not found.  */
+extern void *tsearch (const void *__key, void **__rootp,
+		      __compar_fn_t __compar);
+
+/* Search for an entry matching the given KEY in the tree pointed to
+   by *ROOTP.  If no matching entry is available return NULL.  */
+extern void *tfind (const void *__key, void *const *__rootp,
+		    __compar_fn_t __compar);
+
+/* Remove the element matching KEY from the tree pointed to by *ROOTP.  */
+extern void *tdelete (const void *__restrict __key,
+		      void **__restrict __rootp,
+		      __compar_fn_t __compar);
+
+#ifndef __ACTION_FN_T
+# define __ACTION_FN_T
+typedef void (*__action_fn_t) (const void *__nodep, VISIT __value,
+			       int __level);
+#endif
+
+/* Walk through the whole tree and call the ACTION callback for every node
+   or leaf.  */
+extern void twalk (const void *__root, __action_fn_t __action);
+
+#ifdef __USE_GNU
+/* Callback type for function to free a tree node.  If the keys are atomic
+   data this function should do nothing.  */
+typedef void (*__free_fn_t) (void *__nodep);
+
+/* Destroy the whole tree, call FREEFCT for each node or leaf.  */
+extern void tdestroy (void *__root, __free_fn_t __freefct);
+#endif
+
+
+/* Perform linear search for KEY by comparing by COMPAR in an array
+   [BASE,BASE+NMEMB*SIZE).  */
+extern void *lfind (const void *__key, const void *__base,
+		    size_t *__nmemb, size_t __size, __compar_fn_t __compar);
+
+/* Perform linear search for KEY by comparing by COMPAR function in
+   array [BASE,BASE+NMEMB*SIZE) and insert entry if not found.  */
+extern void *lsearch (const void *__key, void *__base,
+		      size_t *__nmemb, size_t __size, __compar_fn_t __compar);
+
+__END_DECLS
+
+#endif /* search.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/select.c b/ap/libc/glibc/glibc-2.22/misc/select.c
new file mode 100644
index 0000000..e5cd18e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/select.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991-2015 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/time.h>
+#include <sys/types.h>
+#include <errno.h>
+
+/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
+   readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
+   (if not NULL) for exceptional conditions.  If TIMEOUT is not NULL, time out
+   after waiting the interval specified therein.  Returns the number of ready
+   descriptors, or -1 for errors.  */
+int
+__select (nfds, readfds, writefds, exceptfds, timeout)
+     int nfds;
+     fd_set *readfds;
+     fd_set *writefds;
+     fd_set *exceptfds;
+     struct timeval *timeout;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__select)
+stub_warning (select)
+
+weak_alias (__select, select)
diff --git a/ap/libc/glibc/glibc-2.22/misc/setdomain.c b/ap/libc/glibc/glibc-2.22/misc/setdomain.c
new file mode 100644
index 0000000..3cc03b1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/setdomain.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1994-2015 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 <unistd.h>
+
+/* Set the name of the current YP domain to NAME, which is LEN bytes long.
+   This call is restricted to the super-user.  */
+int
+setdomainname (name, len)
+     const char *name;
+     size_t len;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (setdomainname)
diff --git a/ap/libc/glibc/glibc-2.22/misc/setegid.c b/ap/libc/glibc/glibc-2.22/misc/setegid.c
new file mode 100644
index 0000000..37a3b6a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/setegid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1992-2015 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 <unistd.h>
+
+/* Set the effective group ID of the calling process to GID.  */
+int
+setegid (gid)
+     __gid_t gid;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (setegid)
+stub_warning (setegid)
diff --git a/ap/libc/glibc/glibc-2.22/misc/seteuid.c b/ap/libc/glibc/glibc-2.22/misc/seteuid.c
new file mode 100644
index 0000000..af92bcd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/seteuid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1992-2015 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 <unistd.h>
+
+/* Set the effective user ID of the calling process to UID.  */
+int
+seteuid (uid)
+     __uid_t uid;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (seteuid)
+stub_warning (seteuid)
diff --git a/ap/libc/glibc/glibc-2.22/misc/sethostid.c b/ap/libc/glibc/glibc-2.22/misc/sethostid.c
new file mode 100644
index 0000000..96c750e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sethostid.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Set the current machine's Internet number to ID.
+   This call is restricted to the super-user.  */
+int
+sethostid (id)
+     long int id;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+
+stub_warning (sethostid)
diff --git a/ap/libc/glibc/glibc-2.22/misc/sethostname.c b/ap/libc/glibc/glibc-2.22/misc/sethostname.c
new file mode 100644
index 0000000..c6c1440
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sethostname.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Set the name of the current host to NAME, which is LEN bytes long.
+   This call is restricted to the super-user.  */
+int
+sethostname (name, len)
+     const char *name;
+     size_t len;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+
+stub_warning (sethostname)
diff --git a/ap/libc/glibc/glibc-2.22/misc/setregid.c b/ap/libc/glibc/glibc-2.22/misc/setregid.c
new file mode 100644
index 0000000..692bff0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/setregid.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+#include <sys/types.h>
+
+/* Set the real group ID of the calling process to RGID,
+   and the effective group ID of the calling process to EGID.  */
+int
+__setregid (effective_gid, real_gid)
+     gid_t effective_gid;
+     gid_t real_gid;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (setregid)
+
+weak_alias (__setregid, setregid)
diff --git a/ap/libc/glibc/glibc-2.22/misc/setreuid.c b/ap/libc/glibc/glibc-2.22/misc/setreuid.c
new file mode 100644
index 0000000..a6290f0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/setreuid.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+#include <sys/types.h>
+
+/* Set the real user ID of the calling process to RUID,
+   and the effective user ID of the calling process to EUID.  */
+int
+__setreuid (effective_uid, real_uid)
+     uid_t effective_uid;
+     uid_t real_uid;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (setreuid)
+
+weak_alias (__setreuid, setreuid)
diff --git a/ap/libc/glibc/glibc-2.22/misc/setxattr.c b/ap/libc/glibc/glibc-2.22/misc/setxattr.c
new file mode 100644
index 0000000..148f787
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/setxattr.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2002-2015 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/xattr.h>
+
+int
+setxattr (const char *__path, const char *__name,
+	  const void *__value, size_t __size, int __flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (setxattr)
diff --git a/ap/libc/glibc/glibc-2.22/misc/sgtty.h b/ap/libc/glibc/glibc-2.22/misc/sgtty.h
new file mode 100644
index 0000000..ec08a7c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sgtty.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991-2015 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/>.  */
+
+#ifndef	_SGTTY_H
+#define	_SGTTY_H	1
+
+#include <features.h>
+
+#include <sys/ioctl.h>
+
+/* On some systems this type is not defined by <bits/ioctl-types.h>;
+   in that case, the functions are just stubs that return ENOSYS.  */
+struct sgttyb;
+
+__BEGIN_DECLS
+
+/* Fill in *PARAMS with terminal parameters associated with FD.  */
+extern int gtty (int __fd, struct sgttyb *__params) __THROW;
+
+/* Set the terminal parameters associated with FD to *PARAMS.  */
+extern int stty (int __fd, const struct sgttyb *__params) __THROW;
+
+
+__END_DECLS
+
+#endif /* sgtty.h  */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sstk.c b/ap/libc/glibc/glibc-2.22/misc/sstk.c
new file mode 100644
index 0000000..437deb1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sstk.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991-2015 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>
+
+/* Increase the size of the stack by INCREMENT,
+   and return the address of the bottom of the stack.  */
+
+void *sstk (int increment) __THROW;
+
+void *
+sstk (increment)
+     int increment;
+{
+  __set_errno (ENOSYS);
+  return (void *) -1;
+}
+
+stub_warning (sstk)
diff --git a/ap/libc/glibc/glibc-2.22/misc/stab.h b/ap/libc/glibc/glibc-2.22/misc/stab.h
new file mode 100644
index 0000000..9dc3c32
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/stab.h
@@ -0,0 +1,17 @@
+#ifndef __GNU_STAB__
+
+/* Indicate the GNU stab.h is in use.  */
+
+#define __GNU_STAB__
+
+#define __define_stab(NAME, CODE, STRING) NAME=CODE,
+
+enum __stab_debug_code
+{
+#include <bits/stab.def>
+LAST_UNUSED_STAB_CODE
+};
+
+#undef __define_stab
+
+#endif /* __GNU_STAB_ */
diff --git a/ap/libc/glibc/glibc-2.22/misc/stty.c b/ap/libc/glibc/glibc-2.22/misc/stty.c
new file mode 100644
index 0000000..0ce3e60
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/stty.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991-2015 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 <sgtty.h>
+#include <stddef.h>
+
+/* Set the terminal parameters associated with FD to *PARAMS.  */
+int
+stty (fd, params)
+     int fd;
+     const struct sgttyb *params;
+{
+  if (params == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (stty)
diff --git a/ap/libc/glibc/glibc-2.22/misc/swapoff.c b/ap/libc/glibc/glibc-2.22/misc/swapoff.c
new file mode 100644
index 0000000..c5ef7e2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/swapoff.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996-2015 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 <unistd.h>
+
+/* Stop using block special device PATH for swapping.  */
+int
+swapoff (const char *path)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (swapoff)
diff --git a/ap/libc/glibc/glibc-2.22/misc/swapon.c b/ap/libc/glibc/glibc-2.22/misc/swapon.c
new file mode 100644
index 0000000..aadb910
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/swapon.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+#include <sys/swap.h>
+
+/* Make the block special device PATH available to the system for swapping.
+   This call is restricted to the super-user.  */
+int
+swapon (const char *path, int flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (swapon)
diff --git a/ap/libc/glibc/glibc-2.22/misc/sync.c b/ap/libc/glibc/glibc-2.22/misc/sync.c
new file mode 100644
index 0000000..9e437e7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sync.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Make all changes done to all files actually appear on disk.  */
+void
+sync (void)
+{
+  __set_errno (ENOSYS);
+}
+
+
+stub_warning (sync)
diff --git a/ap/libc/glibc/glibc-2.22/misc/syncfs.c b/ap/libc/glibc/glibc-2.22/misc/syncfs.c
new file mode 100644
index 0000000..e946056
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/syncfs.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2011-2015 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 <unistd.h>
+
+/* Make all changes done to all files on the file system associated
+   with FD actually appear on disk.  */
+int
+syncfs (int fd)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+
+stub_warning (syncfs)
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/auxv.h b/ap/libc/glibc/glibc-2.22/misc/sys/auxv.h
new file mode 100644
index 0000000..81b1918
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/auxv.h
@@ -0,0 +1,36 @@
+/* Access to the auxiliary vector.
+   Copyright (C) 2012-2015 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/>.  */
+
+#ifndef _SYS_AUXV_H
+#define _SYS_AUXV_H 1
+
+#include <elf.h>
+#include <sys/cdefs.h>
+#include <bits/hwcap.h>
+
+__BEGIN_DECLS
+
+/* Return the value associated with an Elf*_auxv_t type from the auxv list
+   passed to the program on startup.  If TYPE was not present in the auxv
+   list, returns zero and sets errno to ENOENT.  */
+extern unsigned long int getauxval (unsigned long int __type)
+  __THROW;
+
+__END_DECLS
+
+#endif /* sys/auxv.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/cdefs.h b/ap/libc/glibc/glibc-2.22/misc/sys/cdefs.h
new file mode 100644
index 0000000..99e94cc
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/cdefs.h
@@ -0,0 +1,444 @@
+/* Copyright (C) 1992-2015 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/>.  */
+
+#ifndef	_SYS_CDEFS_H
+#define	_SYS_CDEFS_H	1
+
+/* We are almost always included from features.h. */
+#ifndef _FEATURES_H
+# include <features.h>
+#endif
+
+/* The GNU libc does not support any K&R compilers or the traditional mode
+   of ISO C compilers anymore.  Check for some of the combinations not
+   anymore supported.  */
+#if defined __GNUC__ && !defined __STDC__
+# error "You need a ISO C conforming compiler to use the glibc headers"
+#endif
+
+/* Some user header file might have defined this before.  */
+#undef	__P
+#undef	__PMT
+
+#ifdef __GNUC__
+
+/* All functions, except those with callbacks or those that
+   synchronize memory, are leaf functions.  */
+# if __GNUC_PREREQ (4, 6) && !defined _LIBC
+#  define __LEAF , __leaf__
+#  define __LEAF_ATTR __attribute__ ((__leaf__))
+# else
+#  define __LEAF
+#  define __LEAF_ATTR
+# endif
+
+/* GCC can always grok prototypes.  For C++ programs we add throw()
+   to help it optimize the function calls.  But this works only with
+   gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
+   as non-throwing using a function attribute since programs can use
+   the -fexceptions options for C code as well.  */
+# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+#  define __THROW	__attribute__ ((__nothrow__ __LEAF))
+#  define __THROWNL	__attribute__ ((__nothrow__))
+#  define __NTH(fct)	__attribute__ ((__nothrow__ __LEAF)) fct
+# else
+#  if defined __cplusplus && __GNUC_PREREQ (2,8)
+#   define __THROW	throw ()
+#   define __THROWNL	throw ()
+#   define __NTH(fct)	__LEAF_ATTR fct throw ()
+#  else
+#   define __THROW
+#   define __THROWNL
+#   define __NTH(fct)	fct
+#  endif
+# endif
+
+#else	/* Not GCC.  */
+
+# define __inline		/* No inline functions.  */
+
+# define __THROW
+# define __THROWNL
+# define __NTH(fct)	fct
+
+#endif	/* GCC.  */
+
+/* These two macros are not used in glibc anymore.  They are kept here
+   only because some other projects expect the macros to be defined.  */
+#define __P(args)	args
+#define __PMT(args)	args
+
+/* For these things, GCC behaves the ANSI way normally,
+   and the non-ANSI way under -traditional.  */
+
+#define __CONCAT(x,y)	x ## y
+#define __STRING(x)	#x
+
+/* This is not a typedef so `const __ptr_t' does the right thing.  */
+#define __ptr_t void *
+#define __long_double_t  long double
+
+
+/* C++ needs to know that types and declarations are C, not C++.  */
+#ifdef	__cplusplus
+# define __BEGIN_DECLS	extern "C" {
+# define __END_DECLS	}
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+
+/* The standard library needs the functions from the ISO C90 standard
+   in the std namespace.  At the same time we want to be safe for
+   future changes and we include the ISO C99 code in the non-standard
+   namespace __c99.  The C++ wrapper header take case of adding the
+   definitions to the global namespace.  */
+#if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES
+# define __BEGIN_NAMESPACE_STD	namespace std {
+# define __END_NAMESPACE_STD	}
+# define __USING_NAMESPACE_STD(name) using std::name;
+# define __BEGIN_NAMESPACE_C99	namespace __c99 {
+# define __END_NAMESPACE_C99	}
+# define __USING_NAMESPACE_C99(name) using __c99::name;
+#else
+/* For compatibility we do not add the declarations into any
+   namespace.  They will end up in the global namespace which is what
+   old code expects.  */
+# define __BEGIN_NAMESPACE_STD
+# define __END_NAMESPACE_STD
+# define __USING_NAMESPACE_STD(name)
+# define __BEGIN_NAMESPACE_C99
+# define __END_NAMESPACE_C99
+# define __USING_NAMESPACE_C99(name)
+#endif
+
+
+/* Fortify support.  */
+#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+#define __bos0(ptr) __builtin_object_size (ptr, 0)
+
+#if __GNUC_PREREQ (4,3)
+# define __warndecl(name, msg) \
+  extern void name (void) __attribute__((__warning__ (msg)))
+# define __warnattr(msg) __attribute__((__warning__ (msg)))
+# define __errordecl(name, msg) \
+  extern void name (void) __attribute__((__error__ (msg)))
+#else
+# define __warndecl(name, msg) extern void name (void)
+# define __warnattr(msg)
+# define __errordecl(name, msg) extern void name (void)
+#endif
+
+/* Support for flexible arrays.  */
+#if __GNUC_PREREQ (2,97)
+/* GCC 2.97 supports C99 flexible array members.  */
+# define __flexarr	[]
+#else
+# ifdef __GNUC__
+#  define __flexarr	[0]
+# else
+#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#   define __flexarr	[]
+#  else
+/* Some other non-C99 compiler.  Approximate with [1].  */
+#   define __flexarr	[1]
+#  endif
+# endif
+#endif
+
+
+/* __asm__ ("xyz") is used throughout the headers to rename functions
+   at the assembly language level.  This is wrapped by the __REDIRECT
+   macro, in order to support compilers that can do this some other
+   way.  When compilers don't support asm-names at all, we have to do
+   preprocessor tricks instead (which don't have exactly the right
+   semantics, but it's the best we can do).
+
+   Example:
+   int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
+
+#if defined __GNUC__ && __GNUC__ >= 2
+
+# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
+# ifdef __cplusplus
+#  define __REDIRECT_NTH(name, proto, alias) \
+     name proto __THROW __asm__ (__ASMNAME (#alias))
+#  define __REDIRECT_NTHNL(name, proto, alias) \
+     name proto __THROWNL __asm__ (__ASMNAME (#alias))
+# else
+#  define __REDIRECT_NTH(name, proto, alias) \
+     name proto __asm__ (__ASMNAME (#alias)) __THROW
+#  define __REDIRECT_NTHNL(name, proto, alias) \
+     name proto __asm__ (__ASMNAME (#alias)) __THROWNL
+# endif
+# define __ASMNAME(cname)  __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
+
+/*
+#elif __SOME_OTHER_COMPILER__
+
+# define __REDIRECT(name, proto, alias) name proto; \
+	_Pragma("let " #name " = " #alias)
+*/
+#endif
+
+/* GCC has various useful declarations that can be made with the
+   `__attribute__' syntax.  All of the ways we use this do fine if
+   they are omitted for compilers that don't understand it. */
+#if !defined __GNUC__ || __GNUC__ < 2
+# define __attribute__(xyz)	/* Ignore */
+#endif
+
+/* At some point during the gcc 2.96 development the `malloc' attribute
+   for functions was introduced.  We don't want to use it unconditionally
+   (although this would be possible) since it generates warnings.  */
+#if __GNUC_PREREQ (2,96)
+# define __attribute_malloc__ __attribute__ ((__malloc__))
+#else
+# define __attribute_malloc__ /* Ignore */
+#endif
+
+/* Tell the compiler which arguments to an allocation function
+   indicate the size of the allocation.  */
+#if __GNUC_PREREQ (4, 3)
+# define __attribute_alloc_size__(params) \
+  __attribute__ ((__alloc_size__ params))
+#else
+# define __attribute_alloc_size__(params) /* Ignore.  */
+#endif
+
+/* At some point during the gcc 2.96 development the `pure' attribute
+   for functions was introduced.  We don't want to use it unconditionally
+   (although this would be possible) since it generates warnings.  */
+#if __GNUC_PREREQ (2,96)
+# define __attribute_pure__ __attribute__ ((__pure__))
+#else
+# define __attribute_pure__ /* Ignore */
+#endif
+
+/* This declaration tells the compiler that the value is constant.  */
+#if __GNUC_PREREQ (2,5)
+# define __attribute_const__ __attribute__ ((__const__))
+#else
+# define __attribute_const__ /* Ignore */
+#endif
+
+/* At some point during the gcc 3.1 development the `used' attribute
+   for functions was introduced.  We don't want to use it unconditionally
+   (although this would be possible) since it generates warnings.  */
+#if __GNUC_PREREQ (3,1)
+# define __attribute_used__ __attribute__ ((__used__))
+# define __attribute_noinline__ __attribute__ ((__noinline__))
+#else
+# define __attribute_used__ __attribute__ ((__unused__))
+# define __attribute_noinline__ /* Ignore */
+#endif
+
+/* gcc allows marking deprecated functions.  */
+#if __GNUC_PREREQ (3,2)
+# define __attribute_deprecated__ __attribute__ ((__deprecated__))
+#else
+# define __attribute_deprecated__ /* Ignore */
+#endif
+
+/* At some point during the gcc 2.8 development the `format_arg' attribute
+   for functions was introduced.  We don't want to use it unconditionally
+   (although this would be possible) since it generates warnings.
+   If several `format_arg' attributes are given for the same function, in
+   gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
+   all designated arguments are considered.  */
+#if __GNUC_PREREQ (2,8)
+# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
+#else
+# define __attribute_format_arg__(x) /* Ignore */
+#endif
+
+/* At some point during the gcc 2.97 development the `strfmon' format
+   attribute for functions was introduced.  We don't want to use it
+   unconditionally (although this would be possible) since it
+   generates warnings.  */
+#if __GNUC_PREREQ (2,97)
+# define __attribute_format_strfmon__(a,b) \
+  __attribute__ ((__format__ (__strfmon__, a, b)))
+#else
+# define __attribute_format_strfmon__(a,b) /* Ignore */
+#endif
+
+/* The nonull function attribute allows to mark pointer parameters which
+   must not be NULL.  */
+#if __GNUC_PREREQ (3,3)
+# define __nonnull(params) __attribute__ ((__nonnull__ params))
+#else
+# define __nonnull(params)
+#endif
+
+/* If fortification mode, we warn about unused results of certain
+   function calls which can lead to problems.  */
+#if __GNUC_PREREQ (3,4)
+# define __attribute_warn_unused_result__ \
+   __attribute__ ((__warn_unused_result__))
+# if __USE_FORTIFY_LEVEL > 0
+#  define __wur __attribute_warn_unused_result__
+# endif
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+#ifndef __wur
+# define __wur /* Ignore */
+#endif
+
+/* Forces a function to be always inlined.  */
+#if __GNUC_PREREQ (3,2)
+# define __always_inline __inline __attribute__ ((__always_inline__))
+#else
+# define __always_inline __inline
+#endif
+
+/* Associate error messages with the source location of the call site rather
+   than with the source location inside the function.  */
+#if __GNUC_PREREQ (4,3)
+# define __attribute_artificial__ __attribute__ ((__artificial__))
+#else
+# define __attribute_artificial__ /* Ignore */
+#endif
+
+/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+   inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
+   or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+   older than 4.3 may define these macros and still not guarantee GNU inlining
+   semantics.
+
+   clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+   semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
+   __GNUC_GNU_INLINE__ macro definitions.  */
+#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
+     || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
+			       || defined __GNUC_GNU_INLINE__)))
+# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
+#  define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
+#  define __extern_always_inline \
+  extern __always_inline __attribute__ ((__gnu_inline__))
+# else
+#  define __extern_inline extern __inline
+#  define __extern_always_inline extern __always_inline
+# endif
+#endif
+
+#ifdef __extern_always_inline
+# define __fortify_function __extern_always_inline __attribute_artificial__
+#endif
+
+/* GCC 4.3 and above allow passing all anonymous arguments of an
+   __extern_always_inline function to some other vararg function.  */
+#if __GNUC_PREREQ (4,3)
+# define __va_arg_pack() __builtin_va_arg_pack ()
+# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
+#endif
+
+/* It is possible to compile containing GCC extensions even if GCC is
+   run in pedantic mode if the uses are carefully marked using the
+   `__extension__' keyword.  But this is not generally available before
+   version 2.8.  */
+#if !__GNUC_PREREQ (2,8)
+# define __extension__		/* Ignore */
+#endif
+
+/* __restrict is known in EGCS 1.2 and above. */
+#if !__GNUC_PREREQ (2,92)
+# define __restrict	/* Ignore */
+#endif
+
+/* ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
+     array_name[restrict]
+   GCC 3.1 supports this.  */
+#if __GNUC_PREREQ (3,1) && !defined __GNUG__
+# define __restrict_arr	__restrict
+#else
+# ifdef __GNUC__
+#  define __restrict_arr	/* Not supported in old GCC.  */
+# else
+#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#   define __restrict_arr	restrict
+#  else
+/* Some other non-C99 compiler.  */
+#   define __restrict_arr	/* Not supported.  */
+#  endif
+# endif
+#endif
+
+#if __GNUC__ >= 3
+# define __glibc_unlikely(cond)	__builtin_expect ((cond), 0)
+# define __glibc_likely(cond)	__builtin_expect ((cond), 1)
+#else
+# define __glibc_unlikely(cond)	(cond)
+# define __glibc_likely(cond)	(cond)
+#endif
+
+#if (!defined _Noreturn \
+     && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+     &&  !__GNUC_PREREQ (4,7))
+# if __GNUC_PREREQ (2,8)
+#  define _Noreturn __attribute__ ((__noreturn__))
+# else
+#  define _Noreturn
+# endif
+#endif
+
+#if (!defined _Static_assert && !defined __cplusplus \
+     && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+     && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+# define _Static_assert(expr, diagnostic) \
+    extern int (*__Static_assert_function (void)) \
+      [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
+#endif
+
+#include <bits/wordsize.h>
+
+#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+# define __LDBL_COMPAT 1
+# ifdef __REDIRECT
+#  define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
+#  define __LDBL_REDIR(name, proto) \
+  __LDBL_REDIR1 (name, proto, __nldbl_##name)
+#  define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
+#  define __LDBL_REDIR_NTH(name, proto) \
+  __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
+#  define __LDBL_REDIR1_DECL(name, alias) \
+  extern __typeof (name) name __asm (__ASMNAME (#alias));
+#  define __LDBL_REDIR_DECL(name) \
+  extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
+#  define __REDIRECT_LDBL(name, proto, alias) \
+  __LDBL_REDIR1 (name, proto, __nldbl_##alias)
+#  define __REDIRECT_NTH_LDBL(name, proto, alias) \
+  __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
+# endif
+#endif
+#if !defined __LDBL_COMPAT || !defined __REDIRECT
+# define __LDBL_REDIR1(name, proto, alias) name proto
+# define __LDBL_REDIR(name, proto) name proto
+# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
+# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+# define __LDBL_REDIR_DECL(name)
+# ifdef __REDIRECT
+#  define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
+#  define __REDIRECT_NTH_LDBL(name, proto, alias) \
+  __REDIRECT_NTH (name, proto, alias)
+# endif
+#endif
+
+#endif	 /* sys/cdefs.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/dir.h b/ap/libc/glibc/glibc-2.22/misc/sys/dir.h
new file mode 100644
index 0000000..1ffcd2a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/dir.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 1991-2015 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/>.  */
+
+#ifndef	_SYS_DIR_H
+#define	_SYS_DIR_H	1
+
+#include <features.h>
+
+#include <dirent.h>
+
+#define	direct	dirent
+
+#endif	/* sys/dir.h  */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/file.h b/ap/libc/glibc/glibc-2.22/misc/sys/file.h
new file mode 100644
index 0000000..e55b39e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/file.h
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991-2015 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/>.  */
+
+#ifndef	_SYS_FILE_H
+#define	_SYS_FILE_H	1
+
+#include <features.h>
+
+#ifndef	_FCNTL_H
+# include <fcntl.h>
+#endif
+
+__BEGIN_DECLS
+
+
+/* Alternate names for values for the WHENCE argument to `lseek'.
+   These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively.  */
+#ifndef L_SET
+# define L_SET	0	/* Seek from beginning of file.  */
+# define L_INCR	1	/* Seek from current position.  */
+# define L_XTND	2	/* Seek from end of file.  */
+#endif
+
+
+/* Operations for the `flock' call.  */
+#define	LOCK_SH	1	/* Shared lock.  */
+#define	LOCK_EX	2 	/* Exclusive lock.  */
+#define	LOCK_UN	8	/* Unlock.  */
+
+/* Can be OR'd in to one of the above.  */
+#define	LOCK_NB	4	/* Don't block when locking.  */
+
+
+/* Apply or remove an advisory lock, according to OPERATION,
+   on the file FD refers to.  */
+extern int flock (int __fd, int __operation) __THROW;
+
+
+__END_DECLS
+
+#endif /* sys/file.h  */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/ioctl.h b/ap/libc/glibc/glibc-2.22/misc/sys/ioctl.h
new file mode 100644
index 0000000..b4bf0bd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/ioctl.h
@@ -0,0 +1,45 @@
+/* Copyright (C) 1991-2015 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/>.  */
+
+#ifndef	_SYS_IOCTL_H
+#define	_SYS_IOCTL_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Get the list of `ioctl' requests and related constants.  */
+#include <bits/ioctls.h>
+
+/* Define some types used by `ioctl' requests.  */
+#include <bits/ioctl-types.h>
+
+/* On a Unix system, the system <sys/ioctl.h> probably defines some of
+   the symbols we define in <sys/ttydefaults.h> (usually with the same
+   values).  The code to generate <bits/ioctls.h> has omitted these
+   symbols to avoid the conflict, but a Unix program expects <sys/ioctl.h>
+   to define them, so we must include <sys/ttydefaults.h> here.  */
+#include <sys/ttydefaults.h>
+
+/* Perform the I/O control operation specified by REQUEST on FD.
+   One argument may follow; its presence and type depend on REQUEST.
+   Return value depends on REQUEST.  Usually -1 indicates error.  */
+extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
+
+__END_DECLS
+
+#endif /* sys/ioctl.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/mman.h b/ap/libc/glibc/glibc-2.22/misc/sys/mman.h
new file mode 100644
index 0000000..56e31b7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/mman.h
@@ -0,0 +1,151 @@
+/* Definitions for BSD-style memory management.
+   Copyright (C) 1994-2015 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/>.  */
+
+#ifndef	_SYS_MMAN_H
+#define	_SYS_MMAN_H	1
+
+#include <features.h>
+#include <bits/types.h>
+#define __need_size_t
+#include <stddef.h>
+
+#ifndef __off_t_defined
+# ifndef __USE_FILE_OFFSET64
+typedef __off_t off_t;
+# else
+typedef __off64_t off_t;
+# endif
+# define __off_t_defined
+#endif
+
+#ifndef __mode_t_defined
+typedef __mode_t mode_t;
+# define __mode_t_defined
+#endif
+
+#include <bits/mman.h>
+
+/* Return value of `mmap' in case of an error.  */
+#define MAP_FAILED	((void *) -1)
+
+__BEGIN_DECLS
+/* Map addresses starting near ADDR and extending for LEN bytes.  from
+   OFFSET into the file FD describes according to PROT and FLAGS.  If ADDR
+   is nonzero, it is the desired mapping address.  If the MAP_FIXED bit is
+   set in FLAGS, the mapping will be at ADDR exactly (which must be
+   page-aligned); otherwise the system chooses a convenient nearby address.
+   The return value is the actual mapping address chosen or MAP_FAILED
+   for errors (in which case `errno' is set).  A successful `mmap' call
+   deallocates any previous mapping for the affected region.  */
+
+#ifndef __USE_FILE_OFFSET64
+extern void *mmap (void *__addr, size_t __len, int __prot,
+		   int __flags, int __fd, __off_t __offset) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern void * __REDIRECT_NTH (mmap,
+			      (void *__addr, size_t __len, int __prot,
+			       int __flags, int __fd, __off64_t __offset),
+			      mmap64);
+# else
+#  define mmap mmap64
+# endif
+#endif
+#ifdef __USE_LARGEFILE64
+extern void *mmap64 (void *__addr, size_t __len, int __prot,
+		     int __flags, int __fd, __off64_t __offset) __THROW;
+#endif
+
+/* Deallocate any mapping for the region starting at ADDR and extending LEN
+   bytes.  Returns 0 if successful, -1 for errors (and sets errno).  */
+extern int munmap (void *__addr, size_t __len) __THROW;
+
+/* Change the memory protection of the region starting at ADDR and
+   extending LEN bytes to PROT.  Returns 0 if successful, -1 for errors
+   (and sets errno).  */
+extern int mprotect (void *__addr, size_t __len, int __prot) __THROW;
+
+/* Synchronize the region starting at ADDR and extending LEN bytes with the
+   file it maps.  Filesystem operations on a file being mapped are
+   unpredictable before this is done.  Flags are from the MS_* set.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int msync (void *__addr, size_t __len, int __flags);
+
+#ifdef __USE_MISC
+/* Advise the system about particular usage patterns the program follows
+   for the region starting at ADDR and extending LEN bytes.  */
+extern int madvise (void *__addr, size_t __len, int __advice) __THROW;
+#endif
+#ifdef __USE_XOPEN2K
+/* This is the POSIX name for this function.  */
+extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
+#endif
+
+/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
+   be memory resident.  */
+extern int mlock (const void *__addr, size_t __len) __THROW;
+
+/* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN).  */
+extern int munlock (const void *__addr, size_t __len) __THROW;
+
+/* Cause all currently mapped pages of the process to be memory resident
+   until unlocked by a call to the `munlockall', until the process exits,
+   or until the process calls `execve'.  */
+extern int mlockall (int __flags) __THROW;
+
+/* All currently mapped pages of the process' address space become
+   unlocked.  */
+extern int munlockall (void) __THROW;
+
+#ifdef __USE_MISC
+/* mincore returns the memory residency status of the pages in the
+   current process's address space specified by [start, start + len).
+   The status is returned in a vector of bytes.  The least significant
+   bit of each byte is 1 if the referenced page is in memory, otherwise
+   it is zero.  */
+extern int mincore (void *__start, size_t __len, unsigned char *__vec)
+     __THROW;
+#endif
+
+#ifdef __USE_GNU
+/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length
+   NEW_LEN.  If MREMAP_MAYMOVE is set in FLAGS the returned address
+   may differ from ADDR.  If MREMAP_FIXED is set in FLAGS the function
+   takes another parameter which is a fixed address at which the block
+   resides after a successful call.  */
+extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
+		     int __flags, ...) __THROW;
+
+/* Remap arbitrary pages of a shared backing store within an existing
+   VMA.  */
+extern int remap_file_pages (void *__start, size_t __size, int __prot,
+			     size_t __pgoff, int __flags) __THROW;
+#endif
+
+
+/* Open shared memory segment.  */
+extern int shm_open (const char *__name, int __oflag, mode_t __mode);
+
+/* Remove shared memory segment.  */
+extern int shm_unlink (const char *__name);
+
+__END_DECLS
+
+#endif	/* sys/mman.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/param.h b/ap/libc/glibc/glibc-2.22/misc/sys/param.h
new file mode 100644
index 0000000..62b7ed2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/param.h
@@ -0,0 +1,103 @@
+/* Compatibility header for old-style Unix parameters and limits.
+   Copyright (C) 1995-2015 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/>.  */
+
+#ifndef _SYS_PARAM_H
+#define _SYS_PARAM_H    1
+
+#define __need_NULL
+#include <stddef.h>
+
+#include <sys/types.h>
+#include <limits.h>
+#include <endian.h>                     /* Define BYTE_ORDER et al.  */
+#include <signal.h>                     /* Define NSIG.  */
+
+/* This file defines some things in system-specific ways.  */
+#include <bits/param.h>
+
+
+/* BSD names for some <limits.h> values.  */
+
+#define NBBY		CHAR_BIT
+
+#if !defined NGROUPS && defined NGROUPS_MAX
+# define NGROUPS	NGROUPS_MAX
+#endif
+#if !defined MAXSYMLINKS && defined SYMLOOP_MAX
+# define MAXSYMLINKS	SYMLOOP_MAX
+#endif
+#if !defined CANBSIZ && defined MAX_CANON
+# define CANBSIZ	MAX_CANON
+#endif
+#if !defined MAXPATHLEN && defined PATH_MAX
+# define MAXPATHLEN	PATH_MAX
+#endif
+#if !defined NOFILE && defined OPEN_MAX
+# define NOFILE		OPEN_MAX
+#endif
+#ifndef NCARGS
+# ifdef ARG_MAX
+#  define NCARGS	ARG_MAX
+# else
+/* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to
+   compare against some fixed limit.  */
+# define NCARGS		INT_MAX
+# endif
+#endif
+
+
+/* Magical constants.  */
+#ifndef NOGROUP
+# define NOGROUP	65535     /* Marker for empty group set member.  */
+#endif
+#ifndef NODEV
+# define NODEV		((dev_t) -1)    /* Non-existent device.  */
+#endif
+
+
+/* Unit of `st_blocks'.  */
+#ifndef DEV_BSIZE
+# define DEV_BSIZE	512
+#endif
+
+
+/* Bit map related macros.  */
+#define setbit(a,i)     ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
+#define clrbit(a,i)     ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
+#define isset(a,i)      ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
+#define isclr(a,i)      (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
+
+/* Macros for counting and rounding.  */
+#ifndef howmany
+# define howmany(x, y)  (((x) + ((y) - 1)) / (y))
+#endif
+#ifdef __GNUC__
+# define roundup(x, y)  (__builtin_constant_p (y) && powerof2 (y)             \
+                         ? (((x) + (y) - 1) & ~((y) - 1))                     \
+                         : ((((x) + ((y) - 1)) / (y)) * (y)))
+#else
+# define roundup(x, y)  ((((x) + ((y) - 1)) / (y)) * (y))
+#endif
+#define powerof2(x)     ((((x) - 1) & (x)) == 0)
+
+/* Macros for min/max.  */
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
+
+#endif  /* sys/param.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/queue.h b/ap/libc/glibc/glibc-2.22/misc/sys/queue.h
new file mode 100644
index 0000000..daf4553
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/queue.h
@@ -0,0 +1,574 @@
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)queue.h	8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef	_SYS_QUEUE_H_
+#define	_SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list.  Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction.  Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * List definitions.
+ */
+#define	LIST_HEAD(name, type)						\
+struct name {								\
+	struct type *lh_first;	/* first element */			\
+}
+
+#define	LIST_HEAD_INITIALIZER(head)					\
+	{ NULL }
+
+#define	LIST_ENTRY(type)						\
+struct {								\
+	struct type *le_next;	/* next element */			\
+	struct type **le_prev;	/* address of previous next element */	\
+}
+
+/*
+ * List functions.
+ */
+#define	LIST_INIT(head) do {						\
+	(head)->lh_first = NULL;					\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_INSERT_AFTER(listelm, elm, field) do {			\
+	if (((elm)->field.le_next = (listelm)->field.le_next) != NULL)	\
+		(listelm)->field.le_next->field.le_prev =		\
+		    &(elm)->field.le_next;				\
+	(listelm)->field.le_next = (elm);				\
+	(elm)->field.le_prev = &(listelm)->field.le_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_INSERT_BEFORE(listelm, elm, field) do {			\
+	(elm)->field.le_prev = (listelm)->field.le_prev;		\
+	(elm)->field.le_next = (listelm);				\
+	*(listelm)->field.le_prev = (elm);				\
+	(listelm)->field.le_prev = &(elm)->field.le_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_INSERT_HEAD(head, elm, field) do {				\
+	if (((elm)->field.le_next = (head)->lh_first) != NULL)		\
+		(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+	(head)->lh_first = (elm);					\
+	(elm)->field.le_prev = &(head)->lh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_REMOVE(elm, field) do {					\
+	if ((elm)->field.le_next != NULL)				\
+		(elm)->field.le_next->field.le_prev = 			\
+		    (elm)->field.le_prev;				\
+	*(elm)->field.le_prev = (elm)->field.le_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_FOREACH(var, head, field)					\
+	for ((var) = ((head)->lh_first);				\
+		(var);							\
+		(var) = ((var)->field.le_next))
+
+/*
+ * List access methods.
+ */
+#define	LIST_EMPTY(head)		((head)->lh_first == NULL)
+#define	LIST_FIRST(head)		((head)->lh_first)
+#define	LIST_NEXT(elm, field)		((elm)->field.le_next)
+
+
+/*
+ * Singly-linked List definitions.
+ */
+#define	SLIST_HEAD(name, type)						\
+struct name {								\
+	struct type *slh_first;	/* first element */			\
+}
+
+#define	SLIST_HEAD_INITIALIZER(head)					\
+	{ NULL }
+
+#define	SLIST_ENTRY(type)						\
+struct {								\
+	struct type *sle_next;	/* next element */			\
+}
+
+/*
+ * Singly-linked List functions.
+ */
+#define	SLIST_INIT(head) do {						\
+	(head)->slh_first = NULL;					\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_INSERT_AFTER(slistelm, elm, field) do {			\
+	(elm)->field.sle_next = (slistelm)->field.sle_next;		\
+	(slistelm)->field.sle_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_INSERT_HEAD(head, elm, field) do {			\
+	(elm)->field.sle_next = (head)->slh_first;			\
+	(head)->slh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_REMOVE_HEAD(head, field) do {				\
+	(head)->slh_first = (head)->slh_first->field.sle_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_REMOVE(head, elm, type, field) do {			\
+	if ((head)->slh_first == (elm)) {				\
+		SLIST_REMOVE_HEAD((head), field);			\
+	}								\
+	else {								\
+		struct type *curelm = (head)->slh_first;		\
+		while(curelm->field.sle_next != (elm))			\
+			curelm = curelm->field.sle_next;		\
+		curelm->field.sle_next =				\
+		    curelm->field.sle_next->field.sle_next;		\
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_FOREACH(var, head, field)					\
+	for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+
+/*
+ * Singly-linked List access methods.
+ */
+#define	SLIST_EMPTY(head)	((head)->slh_first == NULL)
+#define	SLIST_FIRST(head)	((head)->slh_first)
+#define	SLIST_NEXT(elm, field)	((elm)->field.sle_next)
+
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define	STAILQ_HEAD(name, type)					\
+struct name {								\
+	struct type *stqh_first;	/* first element */			\
+	struct type **stqh_last;	/* addr of last next element */		\
+}
+
+#define	STAILQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).stqh_first }
+
+#define	STAILQ_ENTRY(type)						\
+struct {								\
+	struct type *stqe_next;	/* next element */			\
+}
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define	STAILQ_INIT(head) do {						\
+	(head)->stqh_first = NULL;					\
+	(head)->stqh_last = &(head)->stqh_first;				\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_INSERT_HEAD(head, elm, field) do {			\
+	if (((elm)->field.stqe_next = (head)->stqh_first) == NULL)	\
+		(head)->stqh_last = &(elm)->field.stqe_next;		\
+	(head)->stqh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_INSERT_TAIL(head, elm, field) do {			\
+	(elm)->field.stqe_next = NULL;					\
+	*(head)->stqh_last = (elm);					\
+	(head)->stqh_last = &(elm)->field.stqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+		(head)->stqh_last = &(elm)->field.stqe_next;		\
+	(listelm)->field.stqe_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_REMOVE_HEAD(head, field) do {				\
+	if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+		(head)->stqh_last = &(head)->stqh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_REMOVE(head, elm, type, field) do {			\
+	if ((head)->stqh_first == (elm)) {				\
+		STAILQ_REMOVE_HEAD((head), field);			\
+	} else {							\
+		struct type *curelm = (head)->stqh_first;		\
+		while (curelm->field.stqe_next != (elm))			\
+			curelm = curelm->field.stqe_next;		\
+		if ((curelm->field.stqe_next =				\
+			curelm->field.stqe_next->field.stqe_next) == NULL) \
+			    (head)->stqh_last = &(curelm)->field.stqe_next; \
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_FOREACH(var, head, field)				\
+	for ((var) = ((head)->stqh_first);				\
+		(var);							\
+		(var) = ((var)->field.stqe_next))
+
+#define	STAILQ_CONCAT(head1, head2) do {				\
+	if (!STAILQ_EMPTY((head2))) {					\
+		*(head1)->stqh_last = (head2)->stqh_first;		\
+		(head1)->stqh_last = (head2)->stqh_last;		\
+		STAILQ_INIT((head2));					\
+	}								\
+} while (/*CONSTCOND*/0)
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define	STAILQ_EMPTY(head)	((head)->stqh_first == NULL)
+#define	STAILQ_FIRST(head)	((head)->stqh_first)
+#define	STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)
+
+
+/*
+ * Simple queue definitions.
+ */
+#define	SIMPLEQ_HEAD(name, type)					\
+struct name {								\
+	struct type *sqh_first;	/* first element */			\
+	struct type **sqh_last;	/* addr of last next element */		\
+}
+
+#define	SIMPLEQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).sqh_first }
+
+#define	SIMPLEQ_ENTRY(type)						\
+struct {								\
+	struct type *sqe_next;	/* next element */			\
+}
+
+/*
+ * Simple queue functions.
+ */
+#define	SIMPLEQ_INIT(head) do {						\
+	(head)->sqh_first = NULL;					\
+	(head)->sqh_last = &(head)->sqh_first;				\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_INSERT_HEAD(head, elm, field) do {			\
+	if (((elm)->field.sqe_next = (head)->sqh_first) == NULL)	\
+		(head)->sqh_last = &(elm)->field.sqe_next;		\
+	(head)->sqh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_INSERT_TAIL(head, elm, field) do {			\
+	(elm)->field.sqe_next = NULL;					\
+	*(head)->sqh_last = (elm);					\
+	(head)->sqh_last = &(elm)->field.sqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+		(head)->sqh_last = &(elm)->field.sqe_next;		\
+	(listelm)->field.sqe_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_REMOVE_HEAD(head, field) do {				\
+	if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+		(head)->sqh_last = &(head)->sqh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_REMOVE(head, elm, type, field) do {			\
+	if ((head)->sqh_first == (elm)) {				\
+		SIMPLEQ_REMOVE_HEAD((head), field);			\
+	} else {							\
+		struct type *curelm = (head)->sqh_first;		\
+		while (curelm->field.sqe_next != (elm))			\
+			curelm = curelm->field.sqe_next;		\
+		if ((curelm->field.sqe_next =				\
+			curelm->field.sqe_next->field.sqe_next) == NULL) \
+			    (head)->sqh_last = &(curelm)->field.sqe_next; \
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_FOREACH(var, head, field)				\
+	for ((var) = ((head)->sqh_first);				\
+		(var);							\
+		(var) = ((var)->field.sqe_next))
+
+/*
+ * Simple queue access methods.
+ */
+#define	SIMPLEQ_EMPTY(head)		((head)->sqh_first == NULL)
+#define	SIMPLEQ_FIRST(head)		((head)->sqh_first)
+#define	SIMPLEQ_NEXT(elm, field)	((elm)->field.sqe_next)
+
+
+/*
+ * Tail queue definitions.
+ */
+#define	_TAILQ_HEAD(name, type, qual)					\
+struct name {								\
+	qual type *tqh_first;		/* first element */		\
+	qual type *qual *tqh_last;	/* addr of last next element */	\
+}
+#define TAILQ_HEAD(name, type)	_TAILQ_HEAD(name, struct type,)
+
+#define	TAILQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).tqh_first }
+
+#define	_TAILQ_ENTRY(type, qual)					\
+struct {								\
+	qual type *tqe_next;		/* next element */		\
+	qual type *qual *tqe_prev;	/* address of previous next element */\
+}
+#define TAILQ_ENTRY(type)	_TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue functions.
+ */
+#define	TAILQ_INIT(head) do {						\
+	(head)->tqh_first = NULL;					\
+	(head)->tqh_last = &(head)->tqh_first;				\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_HEAD(head, elm, field) do {			\
+	if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)	\
+		(head)->tqh_first->field.tqe_prev =			\
+		    &(elm)->field.tqe_next;				\
+	else								\
+		(head)->tqh_last = &(elm)->field.tqe_next;		\
+	(head)->tqh_first = (elm);					\
+	(elm)->field.tqe_prev = &(head)->tqh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_TAIL(head, elm, field) do {			\
+	(elm)->field.tqe_next = NULL;					\
+	(elm)->field.tqe_prev = (head)->tqh_last;			\
+	*(head)->tqh_last = (elm);					\
+	(head)->tqh_last = &(elm)->field.tqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+		(elm)->field.tqe_next->field.tqe_prev = 		\
+		    &(elm)->field.tqe_next;				\
+	else								\
+		(head)->tqh_last = &(elm)->field.tqe_next;		\
+	(listelm)->field.tqe_next = (elm);				\
+	(elm)->field.tqe_prev = &(listelm)->field.tqe_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
+	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
+	(elm)->field.tqe_next = (listelm);				\
+	*(listelm)->field.tqe_prev = (elm);				\
+	(listelm)->field.tqe_prev = &(elm)->field.tqe_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_REMOVE(head, elm, field) do {				\
+	if (((elm)->field.tqe_next) != NULL)				\
+		(elm)->field.tqe_next->field.tqe_prev = 		\
+		    (elm)->field.tqe_prev;				\
+	else								\
+		(head)->tqh_last = (elm)->field.tqe_prev;		\
+	*(elm)->field.tqe_prev = (elm)->field.tqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_FOREACH(var, head, field)					\
+	for ((var) = ((head)->tqh_first);				\
+		(var);							\
+		(var) = ((var)->field.tqe_next))
+
+#define	TAILQ_FOREACH_REVERSE(var, head, headname, field)		\
+	for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));	\
+		(var);							\
+		(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+#define	TAILQ_CONCAT(head1, head2, field) do {				\
+	if (!TAILQ_EMPTY(head2)) {					\
+		*(head1)->tqh_last = (head2)->tqh_first;		\
+		(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last;	\
+		(head1)->tqh_last = (head2)->tqh_last;			\
+		TAILQ_INIT((head2));					\
+	}								\
+} while (/*CONSTCOND*/0)
+
+/*
+ * Tail queue access methods.
+ */
+#define	TAILQ_EMPTY(head)		((head)->tqh_first == NULL)
+#define	TAILQ_FIRST(head)		((head)->tqh_first)
+#define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
+
+#define	TAILQ_LAST(head, headname) \
+	(*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define	TAILQ_PREV(elm, headname, field) \
+	(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+
+/*
+ * Circular queue definitions.
+ */
+#define	CIRCLEQ_HEAD(name, type)					\
+struct name {								\
+	struct type *cqh_first;		/* first element */		\
+	struct type *cqh_last;		/* last element */		\
+}
+
+#define	CIRCLEQ_HEAD_INITIALIZER(head)					\
+	{ (void *)&head, (void *)&head }
+
+#define	CIRCLEQ_ENTRY(type)						\
+struct {								\
+	struct type *cqe_next;		/* next element */		\
+	struct type *cqe_prev;		/* previous element */		\
+}
+
+/*
+ * Circular queue functions.
+ */
+#define	CIRCLEQ_INIT(head) do {						\
+	(head)->cqh_first = (void *)(head);				\
+	(head)->cqh_last = (void *)(head);				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	(elm)->field.cqe_next = (listelm)->field.cqe_next;		\
+	(elm)->field.cqe_prev = (listelm);				\
+	if ((listelm)->field.cqe_next == (void *)(head))		\
+		(head)->cqh_last = (elm);				\
+	else								\
+		(listelm)->field.cqe_next->field.cqe_prev = (elm);	\
+	(listelm)->field.cqe_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {		\
+	(elm)->field.cqe_next = (listelm);				\
+	(elm)->field.cqe_prev = (listelm)->field.cqe_prev;		\
+	if ((listelm)->field.cqe_prev == (void *)(head))		\
+		(head)->cqh_first = (elm);				\
+	else								\
+		(listelm)->field.cqe_prev->field.cqe_next = (elm);	\
+	(listelm)->field.cqe_prev = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_HEAD(head, elm, field) do {			\
+	(elm)->field.cqe_next = (head)->cqh_first;			\
+	(elm)->field.cqe_prev = (void *)(head);				\
+	if ((head)->cqh_last == (void *)(head))				\
+		(head)->cqh_last = (elm);				\
+	else								\
+		(head)->cqh_first->field.cqe_prev = (elm);		\
+	(head)->cqh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_TAIL(head, elm, field) do {			\
+	(elm)->field.cqe_next = (void *)(head);				\
+	(elm)->field.cqe_prev = (head)->cqh_last;			\
+	if ((head)->cqh_first == (void *)(head))			\
+		(head)->cqh_first = (elm);				\
+	else								\
+		(head)->cqh_last->field.cqe_next = (elm);		\
+	(head)->cqh_last = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_REMOVE(head, elm, field) do {				\
+	if ((elm)->field.cqe_next == (void *)(head))			\
+		(head)->cqh_last = (elm)->field.cqe_prev;		\
+	else								\
+		(elm)->field.cqe_next->field.cqe_prev =			\
+		    (elm)->field.cqe_prev;				\
+	if ((elm)->field.cqe_prev == (void *)(head))			\
+		(head)->cqh_first = (elm)->field.cqe_next;		\
+	else								\
+		(elm)->field.cqe_prev->field.cqe_next =			\
+		    (elm)->field.cqe_next;				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_FOREACH(var, head, field)				\
+	for ((var) = ((head)->cqh_first);				\
+		(var) != (const void *)(head);				\
+		(var) = ((var)->field.cqe_next))
+
+#define	CIRCLEQ_FOREACH_REVERSE(var, head, field)			\
+	for ((var) = ((head)->cqh_last);				\
+		(var) != (const void *)(head);				\
+		(var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define	CIRCLEQ_EMPTY(head)		((head)->cqh_first == (void *)(head))
+#define	CIRCLEQ_FIRST(head)		((head)->cqh_first)
+#define	CIRCLEQ_LAST(head)		((head)->cqh_last)
+#define	CIRCLEQ_NEXT(elm, field)	((elm)->field.cqe_next)
+#define	CIRCLEQ_PREV(elm, field)	((elm)->field.cqe_prev)
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field)				\
+	(((elm)->field.cqe_next == (void *)(head))			\
+	    ? ((head)->cqh_first)					\
+	    : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field)				\
+	(((elm)->field.cqe_prev == (void *)(head))			\
+	    ? ((head)->cqh_last)					\
+	    : (elm->field.cqe_prev))
+
+#endif	/* sys/queue.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/select.h b/ap/libc/glibc/glibc-2.22/misc/sys/select.h
new file mode 100644
index 0000000..313107d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/select.h
@@ -0,0 +1,133 @@
+/* `fd_set' type and related macros, and `select'/`pselect' declarations.
+   Copyright (C) 1996-2015 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 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>  */
+
+#ifndef _SYS_SELECT_H
+#define _SYS_SELECT_H	1
+
+#include <features.h>
+
+/* Get definition of needed basic types.  */
+#include <bits/types.h>
+
+/* Get __FD_* definitions.  */
+#include <bits/select.h>
+
+/* Get __sigset_t.  */
+#include <bits/sigset.h>
+
+#ifndef __sigset_t_defined
+# define __sigset_t_defined
+typedef __sigset_t sigset_t;
+#endif
+
+/* Get definition of timer specification structures.  */
+#define __need_time_t
+#define __need_timespec
+#include <time.h>
+#define __need_timeval
+#include <bits/time.h>
+
+#ifndef __suseconds_t_defined
+typedef __suseconds_t suseconds_t;
+# define __suseconds_t_defined
+#endif
+
+
+/* The fd_set member is required to be an array of longs.  */
+typedef long int __fd_mask;
+
+/* Some versions of <linux/posix_types.h> define this macros.  */
+#undef	__NFDBITS
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT.  */
+#define __NFDBITS	(8 * (int) sizeof (__fd_mask))
+#define	__FD_ELT(d)	((d) / __NFDBITS)
+#define	__FD_MASK(d)	((__fd_mask) (1UL << ((d) % __NFDBITS)))
+
+/* fd_set for select and pselect.  */
+typedef struct
+  {
+    /* XPG4.2 requires this member name.  Otherwise avoid the name
+       from the global namespace.  */
+#ifdef __USE_XOPEN
+    __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->fds_bits)
+#else
+    __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->__fds_bits)
+#endif
+  } fd_set;
+
+/* Maximum number of file descriptors in `fd_set'.  */
+#define	FD_SETSIZE		__FD_SETSIZE
+
+#ifdef __USE_MISC
+/* Sometimes the fd_set member is assumed to have this type.  */
+typedef __fd_mask fd_mask;
+
+/* Number of bits per word of `fd_set' (some code assumes this is 32).  */
+# define NFDBITS		__NFDBITS
+#endif
+
+
+/* Access macros for `fd_set'.  */
+#define	FD_SET(fd, fdsetp)	__FD_SET (fd, fdsetp)
+#define	FD_CLR(fd, fdsetp)	__FD_CLR (fd, fdsetp)
+#define	FD_ISSET(fd, fdsetp)	__FD_ISSET (fd, fdsetp)
+#define	FD_ZERO(fdsetp)		__FD_ZERO (fdsetp)
+
+
+__BEGIN_DECLS
+
+/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
+   readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
+   (if not NULL) for exceptional conditions.  If TIMEOUT is not NULL, time out
+   after waiting the interval specified therein.  Returns the number of ready
+   descriptors, or -1 for errors.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int select (int __nfds, fd_set *__restrict __readfds,
+		   fd_set *__restrict __writefds,
+		   fd_set *__restrict __exceptfds,
+		   struct timeval *__restrict __timeout);
+
+#ifdef __USE_XOPEN2K
+/* Same as above only that the TIMEOUT value is given with higher
+   resolution and a sigmask which is been set temporarily.  This version
+   should be used.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int pselect (int __nfds, fd_set *__restrict __readfds,
+		    fd_set *__restrict __writefds,
+		    fd_set *__restrict __exceptfds,
+		    const struct timespec *__restrict __timeout,
+		    const __sigset_t *__restrict __sigmask);
+#endif
+
+
+/* Define some inlines helping to catch common problems.  */
+#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__
+# include <bits/select2.h>
+#endif
+
+__END_DECLS
+
+#endif /* sys/select.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/syslog.h b/ap/libc/glibc/glibc-2.22/misc/sys/syslog.h
new file mode 100644
index 0000000..ee01478
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/syslog.h
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)syslog.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _SYS_SYSLOG_H
+#define _SYS_SYSLOG_H 1
+
+#include <features.h>
+#define __need___va_list
+#include <stdarg.h>
+
+/* This file defines _PATH_LOG.  */
+#include <bits/syslog-path.h>
+
+/*
+ * priorities/facilities are encoded into a single 32-bit quantity, where the
+ * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
+ * (0-big number).  Both the priorities and the facilities map roughly
+ * one-to-one to strings in the syslogd(8) source code.  This mapping is
+ * included in this file.
+ *
+ * priorities (these are ordered)
+ */
+#define	LOG_EMERG	0	/* system is unusable */
+#define	LOG_ALERT	1	/* action must be taken immediately */
+#define	LOG_CRIT	2	/* critical conditions */
+#define	LOG_ERR		3	/* error conditions */
+#define	LOG_WARNING	4	/* warning conditions */
+#define	LOG_NOTICE	5	/* normal but significant condition */
+#define	LOG_INFO	6	/* informational */
+#define	LOG_DEBUG	7	/* debug-level messages */
+
+#define	LOG_PRIMASK	0x07	/* mask to extract priority part (internal) */
+				/* extract priority */
+#define	LOG_PRI(p)	((p) & LOG_PRIMASK)
+#define	LOG_MAKEPRI(fac, pri)	((fac) | (pri))
+
+#ifdef SYSLOG_NAMES
+#define	INTERNAL_NOPRI	0x10	/* the "no priority" priority */
+				/* mark "facility" */
+#define	INTERNAL_MARK	LOG_MAKEPRI(LOG_NFACILITIES << 3, 0)
+typedef struct _code {
+	char	*c_name;
+	int	c_val;
+} CODE;
+
+CODE prioritynames[] =
+  {
+    { "alert", LOG_ALERT },
+    { "crit", LOG_CRIT },
+    { "debug", LOG_DEBUG },
+    { "emerg", LOG_EMERG },
+    { "err", LOG_ERR },
+    { "error", LOG_ERR },		/* DEPRECATED */
+    { "info", LOG_INFO },
+    { "none", INTERNAL_NOPRI },		/* INTERNAL */
+    { "notice", LOG_NOTICE },
+    { "panic", LOG_EMERG },		/* DEPRECATED */
+    { "warn", LOG_WARNING },		/* DEPRECATED */
+    { "warning", LOG_WARNING },
+    { NULL, -1 }
+  };
+#endif
+
+/* facility codes */
+#define	LOG_KERN	(0<<3)	/* kernel messages */
+#define	LOG_USER	(1<<3)	/* random user-level messages */
+#define	LOG_MAIL	(2<<3)	/* mail system */
+#define	LOG_DAEMON	(3<<3)	/* system daemons */
+#define	LOG_AUTH	(4<<3)	/* security/authorization messages */
+#define	LOG_SYSLOG	(5<<3)	/* messages generated internally by syslogd */
+#define	LOG_LPR		(6<<3)	/* line printer subsystem */
+#define	LOG_NEWS	(7<<3)	/* network news subsystem */
+#define	LOG_UUCP	(8<<3)	/* UUCP subsystem */
+#define	LOG_CRON	(9<<3)	/* clock daemon */
+#define	LOG_AUTHPRIV	(10<<3)	/* security/authorization messages (private) */
+#define	LOG_FTP		(11<<3)	/* ftp daemon */
+
+	/* other codes through 15 reserved for system use */
+#define	LOG_LOCAL0	(16<<3)	/* reserved for local use */
+#define	LOG_LOCAL1	(17<<3)	/* reserved for local use */
+#define	LOG_LOCAL2	(18<<3)	/* reserved for local use */
+#define	LOG_LOCAL3	(19<<3)	/* reserved for local use */
+#define	LOG_LOCAL4	(20<<3)	/* reserved for local use */
+#define	LOG_LOCAL5	(21<<3)	/* reserved for local use */
+#define	LOG_LOCAL6	(22<<3)	/* reserved for local use */
+#define	LOG_LOCAL7	(23<<3)	/* reserved for local use */
+
+#define	LOG_NFACILITIES	24	/* current number of facilities */
+#define	LOG_FACMASK	0x03f8	/* mask to extract facility part */
+				/* facility of pri */
+#define	LOG_FAC(p)	(((p) & LOG_FACMASK) >> 3)
+
+#ifdef SYSLOG_NAMES
+CODE facilitynames[] =
+  {
+    { "auth", LOG_AUTH },
+    { "authpriv", LOG_AUTHPRIV },
+    { "cron", LOG_CRON },
+    { "daemon", LOG_DAEMON },
+    { "ftp", LOG_FTP },
+    { "kern", LOG_KERN },
+    { "lpr", LOG_LPR },
+    { "mail", LOG_MAIL },
+    { "mark", INTERNAL_MARK },		/* INTERNAL */
+    { "news", LOG_NEWS },
+    { "security", LOG_AUTH },		/* DEPRECATED */
+    { "syslog", LOG_SYSLOG },
+    { "user", LOG_USER },
+    { "uucp", LOG_UUCP },
+    { "local0", LOG_LOCAL0 },
+    { "local1", LOG_LOCAL1 },
+    { "local2", LOG_LOCAL2 },
+    { "local3", LOG_LOCAL3 },
+    { "local4", LOG_LOCAL4 },
+    { "local5", LOG_LOCAL5 },
+    { "local6", LOG_LOCAL6 },
+    { "local7", LOG_LOCAL7 },
+    { NULL, -1 }
+  };
+#endif
+
+/*
+ * arguments to setlogmask.
+ */
+#define	LOG_MASK(pri)	(1 << (pri))		/* mask for one priority */
+#define	LOG_UPTO(pri)	((1 << ((pri)+1)) - 1)	/* all priorities through pri */
+
+/*
+ * Option flags for openlog.
+ *
+ * LOG_ODELAY no longer does anything.
+ * LOG_NDELAY is the inverse of what it used to be.
+ */
+#define	LOG_PID		0x01	/* log the pid with each message */
+#define	LOG_CONS	0x02	/* log on the console if errors in sending */
+#define	LOG_ODELAY	0x04	/* delay open until first syslog() (default) */
+#define	LOG_NDELAY	0x08	/* don't delay open */
+#define	LOG_NOWAIT	0x10	/* don't wait for console forks: DEPRECATED */
+#define	LOG_PERROR	0x20	/* log to stderr as well */
+
+__BEGIN_DECLS
+
+/* Close descriptor used to write to system logger.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern void closelog (void);
+
+/* Open connection to system logger.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern void openlog (const char *__ident, int __option, int __facility);
+
+/* Set the log mask level.  */
+extern int setlogmask (int __mask) __THROW;
+
+/* Generate a log message using FMT string and option arguments.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern void syslog (int __pri, const char *__fmt, ...)
+     __attribute__ ((__format__ (__printf__, 2, 3)));
+
+#ifdef __USE_MISC
+/* Generate a log message using FMT and using arguments pointed to by AP.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
+     __attribute__ ((__format__ (__printf__, 2, 0)));
+#endif
+
+
+/* Define some macros helping to catch buffer overflows.  */
+#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
+# include <bits/syslog.h>
+#endif
+#ifdef __LDBL_COMPAT
+# include <bits/syslog-ldbl.h>
+#endif
+
+__END_DECLS
+
+#endif /* sys/syslog.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/uio.h b/ap/libc/glibc/glibc-2.22/misc/sys/uio.h
new file mode 100644
index 0000000..928f327
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/uio.h
@@ -0,0 +1,122 @@
+/* Copyright (C) 1991-2015 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/>.  */
+
+#ifndef _SYS_UIO_H
+#define _SYS_UIO_H	1
+
+#include <features.h>
+
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+/* This file defines `struct iovec'.  */
+#include <bits/uio.h>
+
+
+/* Read data from file descriptor FD, and put the result in the
+   buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
+   The buffers are filled in the order specified.
+   Operates just like 'read' (see <unistd.h>) except that data are
+   put in IOVEC instead of a contiguous buffer.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
+  __wur;
+
+/* Write data pointed by the buffers described by IOVEC, which
+   is a vector of COUNT 'struct iovec's, to file descriptor FD.
+   The data is written in the order specified.
+   Operates just like 'write' (see <unistd.h>) except that the data
+   are taken from IOVEC instead of a contiguous buffer.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
+  __wur;
+
+
+#ifdef __USE_MISC
+# ifndef __USE_FILE_OFFSET64
+/* Read data from file descriptor FD at the given position OFFSET
+   without change the file pointer, and put the result in the buffers
+   described by IOVEC, which is a vector of COUNT 'struct iovec's.
+   The buffers are filled in the order specified.  Operates just like
+   'pread' (see <unistd.h>) except that data are put in IOVEC instead
+   of a contiguous buffer.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
+		       __off_t __offset) __wur;
+
+/* Write data pointed by the buffers described by IOVEC, which is a
+   vector of COUNT 'struct iovec's, to file descriptor FD at the given
+   position OFFSET without change the file pointer.  The data is
+   written in the order specified.  Operates just like 'pwrite' (see
+   <unistd.h>) except that the data are taken from IOVEC instead of a
+   contiguous buffer.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
+			__off_t __offset) __wur;
+# else
+#  ifdef __REDIRECT
+extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
+				    int __count, __off64_t __offset),
+			   preadv64) __wur;
+extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
+				     int __count, __off64_t __offset),
+			   pwritev64) __wur;
+#  else
+#   define preadv preadv64
+#   define pwritev pwritev64
+#  endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+/* Read data from file descriptor FD at the given position OFFSET
+   without change the file pointer, and put the result in the buffers
+   described by IOVEC, which is a vector of COUNT 'struct iovec's.
+   The buffers are filled in the order specified.  Operates just like
+   'pread' (see <unistd.h>) except that data are put in IOVEC instead
+   of a contiguous buffer.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
+			 __off64_t __offset) __wur;
+
+/* Write data pointed by the buffers described by IOVEC, which is a
+   vector of COUNT 'struct iovec's, to file descriptor FD at the given
+   position OFFSET without change the file pointer.  The data is
+   written in the order specified.  Operates just like 'pwrite' (see
+   <unistd.h>) except that the data are taken from IOVEC instead of a
+   contiguous buffer.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
+			  __off64_t __offset) __wur;
+# endif
+#endif	/* Use misc.  */
+
+__END_DECLS
+
+#endif /* sys/uio.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/ustat.h b/ap/libc/glibc/glibc-2.22/misc/sys/ustat.h
new file mode 100644
index 0000000..0b811a2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/ustat.h
@@ -0,0 +1,37 @@
+/* Header describing obsolete `ustat' interface.
+   Copyright (C) 1996-2015 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/>.  */
+
+/*
+ * This interface is obsolete.  Use <sys/statfs.h> instead.
+ */
+
+#ifndef _SYS_USTAT_H
+#define	_SYS_USTAT_H	1
+
+#include <features.h>
+
+#include <sys/types.h>
+#include <bits/ustat.h>
+
+__BEGIN_DECLS
+
+extern int ustat (__dev_t __dev, struct ustat *__ubuf) __THROW;
+
+__END_DECLS
+
+#endif /* sys/ustat.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/sys/xattr.h b/ap/libc/glibc/glibc-2.22/misc/sys/xattr.h
new file mode 100644
index 0000000..29ba1da
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sys/xattr.h
@@ -0,0 +1,105 @@
+/* Copyright (C) 2002-2015 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/>.  */
+
+#ifndef _SYS_XATTR_H
+#define _SYS_XATTR_H	1
+
+#include <features.h>
+#include <sys/types.h>
+
+
+__BEGIN_DECLS
+
+/* The following constants should be used for the fifth parameter of
+   `*setxattr'.  */
+#ifndef __USE_KERNEL_XATTR_DEFS
+enum
+{
+  XATTR_CREATE = 1,	/* set value, fail if attr already exists.  */
+#define XATTR_CREATE	XATTR_CREATE
+  XATTR_REPLACE = 2	/* set value, fail if attr does not exist.  */
+#define XATTR_REPLACE	XATTR_REPLACE
+};
+#endif
+
+/* Set the attribute NAME of the file pointed to by PATH to VALUE (which
+   is SIZE bytes long).  Return 0 on success, -1 for errors.  */
+extern int setxattr (const char *__path, const char *__name,
+		     const void *__value, size_t __size, int __flags)
+	__THROW;
+
+/* Set the attribute NAME of the file pointed to by PATH to VALUE (which is
+   SIZE bytes long), not following symlinks for the last pathname component.
+   Return 0 on success, -1 for errors.  */
+extern int lsetxattr (const char *__path, const char *__name,
+		      const void *__value, size_t __size, int __flags)
+	__THROW;
+
+/* Set the attribute NAME of the file descriptor FD to VALUE (which is SIZE
+   bytes long).  Return 0 on success, -1 for errors.  */
+extern int fsetxattr (int __fd, const char *__name, const void *__value,
+		      size_t __size, int __flags) __THROW;
+
+/* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
+   SIZE bytes long).  Return 0 on success, -1 for errors.  */
+extern ssize_t getxattr (const char *__path, const char *__name,
+			 void *__value, size_t __size) __THROW;
+
+/* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
+   SIZE bytes long), not following symlinks for the last pathname component.
+   Return 0 on success, -1 for errors.  */
+extern ssize_t lgetxattr (const char *__path, const char *__name,
+			  void *__value, size_t __size) __THROW;
+
+/* Get the attribute NAME of the file descriptor FD to VALUE (which is SIZE
+   bytes long).  Return 0 on success, -1 for errors.  */
+extern ssize_t fgetxattr (int __fd, const char *__name, void *__value,
+			  size_t __size) __THROW;
+
+/* List attributes of the file pointed to by PATH into the user-supplied
+   buffer LIST (which is SIZE bytes big).  Return 0 on success, -1 for
+   errors.  */
+extern ssize_t listxattr (const char *__path, char *__list, size_t __size)
+	__THROW;
+
+/* List attributes of the file pointed to by PATH into the user-supplied
+   buffer LIST (which is SIZE bytes big), not following symlinks for the
+   last pathname component.  Return 0 on success, -1 for errors.  */
+extern ssize_t llistxattr (const char *__path, char *__list, size_t __size)
+	__THROW;
+
+/* List attributes of the file descriptor FD into the user-supplied buffer
+   LIST (which is SIZE bytes big).  Return 0 on success, -1 for errors.  */
+extern ssize_t flistxattr (int __fd, char *__list, size_t __size)
+	__THROW;
+
+/* Remove the attribute NAME from the file pointed to by PATH.  Return 0
+   on success, -1 for errors.  */
+extern int removexattr (const char *__path, const char *__name) __THROW;
+
+/* Remove the attribute NAME from the file pointed to by PATH, not
+   following symlinks for the last pathname component.  Return 0 on
+   success, -1 for errors.  */
+extern int lremovexattr (const char *__path, const char *__name) __THROW;
+
+/* Remove the attribute NAME from the file descriptor FD.  Return 0 on
+   success, -1 for errors.  */
+extern int fremovexattr (int __fd, const char *__name) __THROW;
+
+__END_DECLS
+
+#endif	/* sys/xattr.h  */
diff --git a/ap/libc/glibc/glibc-2.22/misc/syscall.c b/ap/libc/glibc/glibc-2.22/misc/syscall.c
new file mode 100644
index 0000000..7590ad3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/syscall.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1993-2015 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 <sysdep.h>
+#include <errno.h>
+#include <unistd.h>
+
+/* Do system call CALLNO, passing it the remaining arguments.
+   This only makes sense in certain operating systems.  */
+
+long int
+syscall (callno)
+     long int callno;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (syscall)
diff --git a/ap/libc/glibc/glibc-2.22/misc/syscall.h b/ap/libc/glibc/glibc-2.22/misc/syscall.h
new file mode 100644
index 0000000..4c30578
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/syscall.h
@@ -0,0 +1 @@
+#include <sys/syscall.h>
diff --git a/ap/libc/glibc/glibc-2.22/misc/sysexits.h b/ap/libc/glibc/glibc-2.22/misc/sysexits.h
new file mode 100644
index 0000000..37246b6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/sysexits.h
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 1987, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)sysexits.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef	_SYSEXITS_H
+#define	_SYSEXITS_H 1
+
+/*
+ *  SYSEXITS.H -- Exit status codes for system programs.
+ *
+ *	This include file attempts to categorize possible error
+ *	exit statuses for system programs, notably delivermail
+ *	and the Berkeley network.
+ *
+ *	Error numbers begin at EX__BASE to reduce the possibility of
+ *	clashing with other exit statuses that random programs may
+ *	already return.  The meaning of the codes is approximately
+ *	as follows:
+ *
+ *	EX_USAGE -- The command was used incorrectly, e.g., with
+ *		the wrong number of arguments, a bad flag, a bad
+ *		syntax in a parameter, or whatever.
+ *	EX_DATAERR -- The input data was incorrect in some way.
+ *		This should only be used for user's data & not
+ *		system files.
+ *	EX_NOINPUT -- An input file (not a system file) did not
+ *		exist or was not readable.  This could also include
+ *		errors like "No message" to a mailer (if it cared
+ *		to catch it).
+ *	EX_NOUSER -- The user specified did not exist.  This might
+ *		be used for mail addresses or remote logins.
+ *	EX_NOHOST -- The host specified did not exist.  This is used
+ *		in mail addresses or network requests.
+ *	EX_UNAVAILABLE -- A service is unavailable.  This can occur
+ *		if a support program or file does not exist.  This
+ *		can also be used as a catchall message when something
+ *		you wanted to do doesn't work, but you don't know
+ *		why.
+ *	EX_SOFTWARE -- An internal software error has been detected.
+ *		This should be limited to non-operating system related
+ *		errors as possible.
+ *	EX_OSERR -- An operating system error has been detected.
+ *		This is intended to be used for such things as "cannot
+ *		fork", "cannot create pipe", or the like.  It includes
+ *		things like getuid returning a user that does not
+ *		exist in the passwd file.
+ *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
+ *		etc.) does not exist, cannot be opened, or has some
+ *		sort of error (e.g., syntax error).
+ *	EX_CANTCREAT -- A (user specified) output file cannot be
+ *		created.
+ *	EX_IOERR -- An error occurred while doing I/O on some file.
+ *	EX_TEMPFAIL -- temporary failure, indicating something that
+ *		is not really an error.  In sendmail, this means
+ *		that a mailer (e.g.) could not create a connection,
+ *		and the request should be reattempted later.
+ *	EX_PROTOCOL -- the remote system returned something that
+ *		was "not possible" during a protocol exchange.
+ *	EX_NOPERM -- You did not have sufficient permission to
+ *		perform the operation.  This is not intended for
+ *		file system problems, which should use NOINPUT or
+ *		CANTCREAT, but rather for higher level permissions.
+ */
+
+#define EX_OK		0	/* successful termination */
+
+#define EX__BASE	64	/* base value for error messages */
+
+#define EX_USAGE	64	/* command line usage error */
+#define EX_DATAERR	65	/* data format error */
+#define EX_NOINPUT	66	/* cannot open input */
+#define EX_NOUSER	67	/* addressee unknown */
+#define EX_NOHOST	68	/* host name unknown */
+#define EX_UNAVAILABLE	69	/* service unavailable */
+#define EX_SOFTWARE	70	/* internal software error */
+#define EX_OSERR	71	/* system error (e.g., can't fork) */
+#define EX_OSFILE	72	/* critical OS file missing */
+#define EX_CANTCREAT	73	/* can't create (user) output file */
+#define EX_IOERR	74	/* input/output error */
+#define EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
+#define EX_PROTOCOL	76	/* remote error in protocol */
+#define EX_NOPERM	77	/* permission denied */
+#define EX_CONFIG	78	/* configuration error */
+
+#define EX__MAX	78	/* maximum listed value */
+
+#endif /* sysexits.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/syslog.c b/ap/libc/glibc/glibc-2.22/misc/syslog.c
new file mode 100644
index 0000000..9dd4cde
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/syslog.c
@@ -0,0 +1,464 @@
+/*
+ * Copyright (c) 1983, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)syslog.c	8.4 (Berkeley) 3/18/94";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/syslog.h>
+#include <sys/uio.h>
+#include <sys/un.h>
+#include <netdb.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <paths.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <bits/libc-lock.h>
+#include <signal.h>
+#include <locale.h>
+
+#include <stdarg.h>
+
+#include <libio/iolibio.h>
+#include <math_ldbl_opt.h>
+
+#include <kernel-features.h>
+
+#define ftell(s) _IO_ftell (s)
+
+static int	LogType = SOCK_DGRAM;	/* type of socket connection */
+static int	LogFile = -1;		/* fd for log */
+static int	connected;		/* have done connect */
+static int	LogStat;		/* status bits, set by openlog() */
+static const char *LogTag;		/* string to tag the entry with */
+static int	LogFacility = LOG_USER;	/* default facility code */
+static int	LogMask = 0xff;		/* mask of priorities to be logged */
+extern char	*__progname;		/* Program name, from crt0. */
+
+/* Define the lock.  */
+__libc_lock_define_initialized (static, syslog_lock)
+
+static void openlog_internal(const char *, int, int) internal_function;
+static void closelog_internal(void);
+#ifndef NO_SIGPIPE
+static void sigpipe_handler (int);
+#endif
+
+#ifndef send_flags
+# define send_flags 0
+#endif
+
+struct cleanup_arg
+{
+  void *buf;
+  struct sigaction *oldaction;
+};
+
+static void
+cancel_handler (void *ptr)
+{
+#ifndef NO_SIGPIPE
+  /* Restore the old signal handler.  */
+  struct cleanup_arg *clarg = (struct cleanup_arg *) ptr;
+
+  if (clarg != NULL && clarg->oldaction != NULL)
+    __sigaction (SIGPIPE, clarg->oldaction, NULL);
+#endif
+
+  /* Free the lock.  */
+  __libc_lock_unlock (syslog_lock);
+}
+
+
+/*
+ * syslog, vsyslog --
+ *	print message on log file; output is intended for syslogd(8).
+ */
+void
+__syslog(int pri, const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	__vsyslog_chk(pri, -1, fmt, ap);
+	va_end(ap);
+}
+ldbl_hidden_def (__syslog, syslog)
+ldbl_strong_alias (__syslog, syslog)
+
+void
+__syslog_chk(int pri, int flag, const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	__vsyslog_chk(pri, flag, fmt, ap);
+	va_end(ap);
+}
+
+void
+__vsyslog_chk(int pri, int flag, const char *fmt, va_list ap)
+{
+	struct tm now_tm;
+	time_t now;
+	int fd;
+	FILE *f;
+	char *buf = 0;
+	size_t bufsize = 0;
+	size_t msgoff;
+#ifndef NO_SIGPIPE
+ 	struct sigaction action, oldaction;
+ 	int sigpipe;
+#endif
+	int saved_errno = errno;
+	char failbuf[3 * sizeof (pid_t) + sizeof "out of memory []"];
+
+#define	INTERNALLOG	LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
+	/* Check for invalid bits. */
+	if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
+		syslog(INTERNALLOG,
+		    "syslog: unknown facility/priority: %x", pri);
+		pri &= LOG_PRIMASK|LOG_FACMASK;
+	}
+
+	/* Check priority against setlogmask values. */
+	if ((LOG_MASK (LOG_PRI (pri)) & LogMask) == 0)
+		return;
+
+	/* Set default facility if none specified. */
+	if ((pri & LOG_FACMASK) == 0)
+		pri |= LogFacility;
+
+	/* Build the message in a memory-buffer stream.  */
+	f = __open_memstream (&buf, &bufsize);
+	if (f == NULL)
+	  {
+	    /* We cannot get a stream.  There is not much we can do but
+	       emitting an error messages.  */
+	    char numbuf[3 * sizeof (pid_t)];
+	    char *nump;
+	    char *endp = __stpcpy (failbuf, "out of memory [");
+	    pid_t pid = __getpid ();
+
+	    nump = numbuf + sizeof (numbuf);
+	    /* The PID can never be zero.  */
+	    do
+	      *--nump = '0' + pid % 10;
+	    while ((pid /= 10) != 0);
+
+	    endp = __mempcpy (endp, nump, (numbuf + sizeof (numbuf)) - nump);
+	    *endp++ = ']';
+	    *endp = '\0';
+	    buf = failbuf;
+	    bufsize = endp - failbuf;
+	    msgoff = 0;
+	  }
+	else
+	  {
+	    __fsetlocking (f, FSETLOCKING_BYCALLER);
+	    fprintf (f, "<%d>", pri);
+	    (void) time (&now);
+	    f->_IO_write_ptr += __strftime_l (f->_IO_write_ptr,
+					      f->_IO_write_end
+					      - f->_IO_write_ptr,
+					      "%h %e %T ",
+					      __localtime_r (&now, &now_tm),
+					      _nl_C_locobj_ptr);
+	    msgoff = ftell (f);
+	    if (LogTag == NULL)
+	      LogTag = __progname;
+	    if (LogTag != NULL)
+	      __fputs_unlocked (LogTag, f);
+	    if (LogStat & LOG_PID)
+	      fprintf (f, "[%d]", (int) __getpid ());
+	    if (LogTag != NULL)
+	      {
+		putc_unlocked (':', f);
+		putc_unlocked (' ', f);
+	      }
+
+	    /* Restore errno for %m format.  */
+	    __set_errno (saved_errno);
+
+	    /* We have the header.  Print the user's format into the
+               buffer.  */
+	    if (flag == -1)
+	      vfprintf (f, fmt, ap);
+	    else
+	      __vfprintf_chk (f, flag, fmt, ap);
+
+	    /* Close the memory stream; this will finalize the data
+	       into a malloc'd buffer in BUF.  */
+	    fclose (f);
+	  }
+
+	/* Output to stderr if requested. */
+	if (LogStat & LOG_PERROR) {
+		struct iovec iov[2];
+		struct iovec *v = iov;
+
+		v->iov_base = buf + msgoff;
+		v->iov_len = bufsize - msgoff;
+		/* Append a newline if necessary.  */
+		if (buf[bufsize - 1] != '\n')
+		  {
+		    ++v;
+		    v->iov_base = (char *) "\n";
+		    v->iov_len = 1;
+		  }
+
+		__libc_cleanup_push (free, buf == failbuf ? NULL : buf);
+
+		/* writev is a cancellation point.  */
+		(void)__writev(STDERR_FILENO, iov, v - iov + 1);
+
+		__libc_cleanup_pop (0);
+	}
+
+	/* Prepare for multiple users.  We have to take care: open and
+	   write are cancellation points.  */
+	struct cleanup_arg clarg;
+	clarg.buf = buf;
+	clarg.oldaction = NULL;
+	__libc_cleanup_push (cancel_handler, &clarg);
+	__libc_lock_lock (syslog_lock);
+
+#ifndef NO_SIGPIPE
+	/* Prepare for a broken connection.  */
+ 	memset (&action, 0, sizeof (action));
+ 	action.sa_handler = sigpipe_handler;
+ 	sigemptyset (&action.sa_mask);
+ 	sigpipe = __sigaction (SIGPIPE, &action, &oldaction);
+	if (sigpipe == 0)
+	  clarg.oldaction = &oldaction;
+#endif
+
+	/* Get connected, output the message to the local logger. */
+	if (!connected)
+		openlog_internal(LogTag, LogStat | LOG_NDELAY, 0);
+
+	/* If we have a SOCK_STREAM connection, also send ASCII NUL as
+	   a record terminator.  */
+	if (LogType == SOCK_STREAM)
+	  ++bufsize;
+
+	if (!connected || __send(LogFile, buf, bufsize, send_flags) < 0)
+	  {
+	    if (connected)
+	      {
+		/* Try to reopen the syslog connection.  Maybe it went
+		   down.  */
+		closelog_internal ();
+		openlog_internal(LogTag, LogStat | LOG_NDELAY, 0);
+	      }
+
+	    if (!connected || __send(LogFile, buf, bufsize, send_flags) < 0)
+	      {
+		closelog_internal ();	/* attempt re-open next time */
+		/*
+		 * Output the message to the console; don't worry
+		 * about blocking, if console blocks everything will.
+		 * Make sure the error reported is the one from the
+		 * syslogd failure.
+		 */
+		if (LogStat & LOG_CONS &&
+		    (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0)
+		  {
+		    __dprintf (fd, "%s\r\n", buf + msgoff);
+		    (void)__close(fd);
+		  }
+	      }
+	  }
+
+#ifndef NO_SIGPIPE
+	if (sigpipe == 0)
+		__sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL);
+#endif
+
+	/* End of critical section.  */
+	__libc_cleanup_pop (0);
+	__libc_lock_unlock (syslog_lock);
+
+	if (buf != failbuf)
+		free (buf);
+}
+libc_hidden_def (__vsyslog_chk)
+
+void
+__vsyslog(int pri, const char *fmt, va_list ap)
+{
+  __vsyslog_chk (pri, -1, fmt, ap);
+}
+ldbl_hidden_def (__vsyslog, vsyslog)
+ldbl_weak_alias (__vsyslog, vsyslog)
+
+static struct sockaddr_un SyslogAddr;	/* AF_UNIX address of local logger */
+
+
+static void
+internal_function
+openlog_internal(const char *ident, int logstat, int logfac)
+{
+	if (ident != NULL)
+		LogTag = ident;
+	LogStat = logstat;
+	if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
+		LogFacility = logfac;
+
+	int retry = 0;
+	while (retry < 2) {
+		if (LogFile == -1) {
+			SyslogAddr.sun_family = AF_UNIX;
+			(void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
+				      sizeof(SyslogAddr.sun_path));
+			if (LogStat & LOG_NDELAY) {
+#ifdef SOCK_CLOEXEC
+# ifndef __ASSUME_SOCK_CLOEXEC
+				if (__have_sock_cloexec >= 0) {
+# endif
+					LogFile = __socket(AF_UNIX,
+							   LogType
+							   | SOCK_CLOEXEC, 0);
+# ifndef __ASSUME_SOCK_CLOEXEC
+					if (__have_sock_cloexec == 0)
+						__have_sock_cloexec
+						  = ((LogFile != -1
+						      || errno != EINVAL)
+						     ? 1 : -1);
+				}
+# endif
+#endif
+#ifndef __ASSUME_SOCK_CLOEXEC
+# ifdef SOCK_CLOEXEC
+				if (__have_sock_cloexec < 0)
+# endif
+				  LogFile = __socket(AF_UNIX, LogType, 0);
+#endif
+				if (LogFile == -1)
+					return;
+#ifndef __ASSUME_SOCK_CLOEXEC
+# ifdef SOCK_CLOEXEC
+				if (__have_sock_cloexec < 0)
+# endif
+					__fcntl(LogFile, F_SETFD, FD_CLOEXEC);
+#endif
+			}
+		}
+		if (LogFile != -1 && !connected)
+		{
+			int old_errno = errno;
+			if (__connect(LogFile, &SyslogAddr, sizeof(SyslogAddr))
+			    == -1)
+			{
+				int saved_errno = errno;
+				int fd = LogFile;
+				LogFile = -1;
+				(void)__close(fd);
+				__set_errno (old_errno);
+				if (saved_errno == EPROTOTYPE)
+				{
+					/* retry with the other type: */
+					LogType = (LogType == SOCK_DGRAM
+						   ? SOCK_STREAM : SOCK_DGRAM);
+					++retry;
+					continue;
+				}
+			} else
+				connected = 1;
+		}
+		break;
+	}
+}
+
+void
+openlog (const char *ident, int logstat, int logfac)
+{
+  /* Protect against multiple users and cancellation.  */
+  __libc_cleanup_push (cancel_handler, NULL);
+  __libc_lock_lock (syslog_lock);
+
+  openlog_internal (ident, logstat, logfac);
+
+  __libc_cleanup_pop (1);
+}
+
+#ifndef NO_SIGPIPE
+static void
+sigpipe_handler (int signo)
+{
+  closelog_internal ();
+}
+#endif
+
+static void
+closelog_internal (void)
+{
+  if (!connected)
+    return;
+
+  __close (LogFile);
+  LogFile = -1;
+  connected = 0;
+}
+
+void
+closelog (void)
+{
+  /* Protect against multiple users and cancellation.  */
+  __libc_cleanup_push (cancel_handler, NULL);
+  __libc_lock_lock (syslog_lock);
+
+  closelog_internal ();
+  LogTag = NULL;
+  LogType = SOCK_DGRAM; /* this is the default */
+
+  /* Free the lock.  */
+  __libc_cleanup_pop (1);
+}
+
+/* setlogmask -- set the log mask level */
+int
+setlogmask(pmask)
+	int pmask;
+{
+	int omask;
+
+	omask = LogMask;
+	if (pmask != 0)
+		LogMask = pmask;
+	return (omask);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/syslog.h b/ap/libc/glibc/glibc-2.22/misc/syslog.h
new file mode 100644
index 0000000..830b492
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/syslog.h
@@ -0,0 +1 @@
+#include <sys/syslog.h>
diff --git a/ap/libc/glibc/glibc-2.22/misc/truncate.c b/ap/libc/glibc/glibc-2.22/misc/truncate.c
new file mode 100644
index 0000000..750f955
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/truncate.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991-2015 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>
+
+/* Truncate PATH to LENGTH bytes.  */
+int
+__truncate (path, length)
+     const char *path;
+     off_t length;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__truncate, truncate)
+
+stub_warning (truncate)
diff --git a/ap/libc/glibc/glibc-2.22/misc/truncate64.c b/ap/libc/glibc/glibc-2.22/misc/truncate64.c
new file mode 100644
index 0000000..d1bb4ad
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/truncate64.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1997-2015 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 <unistd.h>
+
+/* Truncate PATH to LENGTH bytes.  */
+int
+truncate64 (path, length)
+     const char *path;
+     off64_t length;
+{
+  if ((off_t) length != length)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+  return __truncate (path, (off_t) length);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/tsearch.c b/ap/libc/glibc/glibc-2.22/misc/tsearch.c
new file mode 100644
index 0000000..869dc9b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tsearch.c
@@ -0,0 +1,661 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>, 1997.
+
+   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/>.  */
+
+/* Tree search for red/black trees.
+   The algorithm for adding nodes is taken from one of the many "Algorithms"
+   books by Robert Sedgewick, although the implementation differs.
+   The algorithm for deleting nodes can probably be found in a book named
+   "Introduction to Algorithms" by Cormen/Leiserson/Rivest.  At least that's
+   the book that my professor took most algorithms from during the "Data
+   Structures" course...
+
+   Totally public domain.  */
+
+/* Red/black trees are binary trees in which the edges are colored either red
+   or black.  They have the following properties:
+   1. The number of black edges on every path from the root to a leaf is
+      constant.
+   2. No two red edges are adjacent.
+   Therefore there is an upper bound on the length of every path, it's
+   O(log n) where n is the number of nodes in the tree.  No path can be longer
+   than 1+2*P where P is the length of the shortest path in the tree.
+   Useful for the implementation:
+   3. If one of the children of a node is NULL, then the other one is red
+      (if it exists).
+
+   In the implementation, not the edges are colored, but the nodes.  The color
+   interpreted as the color of the edge leading to this node.  The color is
+   meaningless for the root node, but we color the root node black for
+   convenience.  All added nodes are red initially.
+
+   Adding to a red/black tree is rather easy.  The right place is searched
+   with a usual binary tree search.  Additionally, whenever a node N is
+   reached that has two red successors, the successors are colored black and
+   the node itself colored red.  This moves red edges up the tree where they
+   pose less of a problem once we get to really insert the new node.  Changing
+   N's color to red may violate rule 2, however, so rotations may become
+   necessary to restore the invariants.  Adding a new red leaf may violate
+   the same rule, so afterwards an additional check is run and the tree
+   possibly rotated.
+
+   Deleting is hairy.  There are mainly two nodes involved: the node to be
+   deleted (n1), and another node that is to be unchained from the tree (n2).
+   If n1 has a successor (the node with a smallest key that is larger than
+   n1), then the successor becomes n2 and its contents are copied into n1,
+   otherwise n1 becomes n2.
+   Unchaining a node may violate rule 1: if n2 is black, one subtree is
+   missing one black edge afterwards.  The algorithm must try to move this
+   error upwards towards the root, so that the subtree that does not have
+   enough black edges becomes the whole tree.  Once that happens, the error
+   has disappeared.  It may not be necessary to go all the way up, since it
+   is possible that rotations and recoloring can fix the error before that.
+
+   Although the deletion algorithm must walk upwards through the tree, we
+   do not store parent pointers in the nodes.  Instead, delete allocates a
+   small array of parent pointers and fills it while descending the tree.
+   Since we know that the length of a path is O(log n), where n is the number
+   of nodes, this is likely to use less memory.  */
+
+/* Tree rotations look like this:
+      A                C
+     / \              / \
+    B   C            A   G
+   / \ / \  -->     / \
+   D E F G         B   F
+                  / \
+                 D   E
+
+   In this case, A has been rotated left.  This preserves the ordering of the
+   binary tree.  */
+
+#include <stdlib.h>
+#include <string.h>
+#include <search.h>
+
+typedef struct node_t
+{
+  /* Callers expect this to be the first element in the structure - do not
+     move!  */
+  const void *key;
+  struct node_t *left;
+  struct node_t *right;
+  unsigned int red:1;
+} *node;
+typedef const struct node_t *const_node;
+
+#undef DEBUGGING
+
+#ifdef DEBUGGING
+
+/* Routines to check tree invariants.  */
+
+#include <assert.h>
+
+#define CHECK_TREE(a) check_tree(a)
+
+static void
+check_tree_recurse (node p, int d_sofar, int d_total)
+{
+  if (p == NULL)
+    {
+      assert (d_sofar == d_total);
+      return;
+    }
+
+  check_tree_recurse (p->left, d_sofar + (p->left && !p->left->red), d_total);
+  check_tree_recurse (p->right, d_sofar + (p->right && !p->right->red), d_total);
+  if (p->left)
+    assert (!(p->left->red && p->red));
+  if (p->right)
+    assert (!(p->right->red && p->red));
+}
+
+static void
+check_tree (node root)
+{
+  int cnt = 0;
+  node p;
+  if (root == NULL)
+    return;
+  root->red = 0;
+  for(p = root->left; p; p = p->left)
+    cnt += !p->red;
+  check_tree_recurse (root, 0, cnt);
+}
+
+
+#else
+
+#define CHECK_TREE(a)
+
+#endif
+
+/* Possibly "split" a node with two red successors, and/or fix up two red
+   edges in a row.  ROOTP is a pointer to the lowest node we visited, PARENTP
+   and GPARENTP pointers to its parent/grandparent.  P_R and GP_R contain the
+   comparison values that determined which way was taken in the tree to reach
+   ROOTP.  MODE is 1 if we need not do the split, but must check for two red
+   edges between GPARENTP and ROOTP.  */
+static void
+maybe_split_for_insert (node *rootp, node *parentp, node *gparentp,
+			int p_r, int gp_r, int mode)
+{
+  node root = *rootp;
+  node *rp, *lp;
+  rp = &(*rootp)->right;
+  lp = &(*rootp)->left;
+
+  /* See if we have to split this node (both successors red).  */
+  if (mode == 1
+      || ((*rp) != NULL && (*lp) != NULL && (*rp)->red && (*lp)->red))
+    {
+      /* This node becomes red, its successors black.  */
+      root->red = 1;
+      if (*rp)
+	(*rp)->red = 0;
+      if (*lp)
+	(*lp)->red = 0;
+
+      /* If the parent of this node is also red, we have to do
+	 rotations.  */
+      if (parentp != NULL && (*parentp)->red)
+	{
+	  node gp = *gparentp;
+	  node p = *parentp;
+	  /* There are two main cases:
+	     1. The edge types (left or right) of the two red edges differ.
+	     2. Both red edges are of the same type.
+	     There exist two symmetries of each case, so there is a total of
+	     4 cases.  */
+	  if ((p_r > 0) != (gp_r > 0))
+	    {
+	      /* Put the child at the top of the tree, with its parent
+		 and grandparent as successors.  */
+	      p->red = 1;
+	      gp->red = 1;
+	      root->red = 0;
+	      if (p_r < 0)
+		{
+		  /* Child is left of parent.  */
+		  p->left = *rp;
+		  *rp = p;
+		  gp->right = *lp;
+		  *lp = gp;
+		}
+	      else
+		{
+		  /* Child is right of parent.  */
+		  p->right = *lp;
+		  *lp = p;
+		  gp->left = *rp;
+		  *rp = gp;
+		}
+	      *gparentp = root;
+	    }
+	  else
+	    {
+	      *gparentp = *parentp;
+	      /* Parent becomes the top of the tree, grandparent and
+		 child are its successors.  */
+	      p->red = 0;
+	      gp->red = 1;
+	      if (p_r < 0)
+		{
+		  /* Left edges.  */
+		  gp->left = p->right;
+		  p->right = gp;
+		}
+	      else
+		{
+		  /* Right edges.  */
+		  gp->right = p->left;
+		  p->left = gp;
+		}
+	    }
+	}
+    }
+}
+
+/* Find or insert datum into search tree.
+   KEY is the key to be located, ROOTP is the address of tree root,
+   COMPAR the ordering function.  */
+void *
+__tsearch (const void *key, void **vrootp, __compar_fn_t compar)
+{
+  node q;
+  node *parentp = NULL, *gparentp = NULL;
+  node *rootp = (node *) vrootp;
+  node *nextp;
+  int r = 0, p_r = 0, gp_r = 0; /* No they might not, Mr Compiler.  */
+
+  if (rootp == NULL)
+    return NULL;
+
+  /* This saves some additional tests below.  */
+  if (*rootp != NULL)
+    (*rootp)->red = 0;
+
+  CHECK_TREE (*rootp);
+
+  nextp = rootp;
+  while (*nextp != NULL)
+    {
+      node root = *rootp;
+      r = (*compar) (key, root->key);
+      if (r == 0)
+	return root;
+
+      maybe_split_for_insert (rootp, parentp, gparentp, p_r, gp_r, 0);
+      /* If that did any rotations, parentp and gparentp are now garbage.
+	 That doesn't matter, because the values they contain are never
+	 used again in that case.  */
+
+      nextp = r < 0 ? &root->left : &root->right;
+      if (*nextp == NULL)
+	break;
+
+      gparentp = parentp;
+      parentp = rootp;
+      rootp = nextp;
+
+      gp_r = p_r;
+      p_r = r;
+    }
+
+  q = (struct node_t *) malloc (sizeof (struct node_t));
+  if (q != NULL)
+    {
+      *nextp = q;			/* link new node to old */
+      q->key = key;			/* initialize new node */
+      q->red = 1;
+      q->left = q->right = NULL;
+
+      if (nextp != rootp)
+	/* There may be two red edges in a row now, which we must avoid by
+	   rotating the tree.  */
+	maybe_split_for_insert (nextp, rootp, parentp, r, p_r, 1);
+    }
+
+  return q;
+}
+libc_hidden_def (__tsearch)
+weak_alias (__tsearch, tsearch)
+
+
+/* Find datum in search tree.
+   KEY is the key to be located, ROOTP is the address of tree root,
+   COMPAR the ordering function.  */
+void *
+__tfind (key, vrootp, compar)
+     const void *key;
+     void *const *vrootp;
+     __compar_fn_t compar;
+{
+  node *rootp = (node *) vrootp;
+
+  if (rootp == NULL)
+    return NULL;
+
+  CHECK_TREE (*rootp);
+
+  while (*rootp != NULL)
+    {
+      node root = *rootp;
+      int r;
+
+      r = (*compar) (key, root->key);
+      if (r == 0)
+	return root;
+
+      rootp = r < 0 ? &root->left : &root->right;
+    }
+  return NULL;
+}
+libc_hidden_def (__tfind)
+weak_alias (__tfind, tfind)
+
+
+/* Delete node with given key.
+   KEY is the key to be deleted, ROOTP is the address of the root of tree,
+   COMPAR the comparison function.  */
+void *
+__tdelete (const void *key, void **vrootp, __compar_fn_t compar)
+{
+  node p, q, r, retval;
+  int cmp;
+  node *rootp = (node *) vrootp;
+  node root, unchained;
+  /* Stack of nodes so we remember the parents without recursion.  It's
+     _very_ unlikely that there are paths longer than 40 nodes.  The tree
+     would need to have around 250.000 nodes.  */
+  int stacksize = 40;
+  int sp = 0;
+  node **nodestack = alloca (sizeof (node *) * stacksize);
+
+  if (rootp == NULL)
+    return NULL;
+  p = *rootp;
+  if (p == NULL)
+    return NULL;
+
+  CHECK_TREE (p);
+
+  while ((cmp = (*compar) (key, (*rootp)->key)) != 0)
+    {
+      if (sp == stacksize)
+	{
+	  node **newstack;
+	  stacksize += 20;
+	  newstack = alloca (sizeof (node *) * stacksize);
+	  nodestack = memcpy (newstack, nodestack, sp * sizeof (node *));
+	}
+
+      nodestack[sp++] = rootp;
+      p = *rootp;
+      rootp = ((cmp < 0)
+	       ? &(*rootp)->left
+	       : &(*rootp)->right);
+      if (*rootp == NULL)
+	return NULL;
+    }
+
+  /* This is bogus if the node to be deleted is the root... this routine
+     really should return an integer with 0 for success, -1 for failure
+     and errno = ESRCH or something.  */
+  retval = p;
+
+  /* We don't unchain the node we want to delete. Instead, we overwrite
+     it with its successor and unchain the successor.  If there is no
+     successor, we really unchain the node to be deleted.  */
+
+  root = *rootp;
+
+  r = root->right;
+  q = root->left;
+
+  if (q == NULL || r == NULL)
+    unchained = root;
+  else
+    {
+      node *parent = rootp, *up = &root->right;
+      for (;;)
+	{
+	  if (sp == stacksize)
+	    {
+	      node **newstack;
+	      stacksize += 20;
+	      newstack = alloca (sizeof (node *) * stacksize);
+	      nodestack = memcpy (newstack, nodestack, sp * sizeof (node *));
+	    }
+	  nodestack[sp++] = parent;
+	  parent = up;
+	  if ((*up)->left == NULL)
+	    break;
+	  up = &(*up)->left;
+	}
+      unchained = *up;
+    }
+
+  /* We know that either the left or right successor of UNCHAINED is NULL.
+     R becomes the other one, it is chained into the parent of UNCHAINED.  */
+  r = unchained->left;
+  if (r == NULL)
+    r = unchained->right;
+  if (sp == 0)
+    *rootp = r;
+  else
+    {
+      q = *nodestack[sp-1];
+      if (unchained == q->right)
+	q->right = r;
+      else
+	q->left = r;
+    }
+
+  if (unchained != root)
+    root->key = unchained->key;
+  if (!unchained->red)
+    {
+      /* Now we lost a black edge, which means that the number of black
+	 edges on every path is no longer constant.  We must balance the
+	 tree.  */
+      /* NODESTACK now contains all parents of R.  R is likely to be NULL
+	 in the first iteration.  */
+      /* NULL nodes are considered black throughout - this is necessary for
+	 correctness.  */
+      while (sp > 0 && (r == NULL || !r->red))
+	{
+	  node *pp = nodestack[sp - 1];
+	  p = *pp;
+	  /* Two symmetric cases.  */
+	  if (r == p->left)
+	    {
+	      /* Q is R's brother, P is R's parent.  The subtree with root
+		 R has one black edge less than the subtree with root Q.  */
+	      q = p->right;
+	      if (q->red)
+		{
+		  /* If Q is red, we know that P is black. We rotate P left
+		     so that Q becomes the top node in the tree, with P below
+		     it.  P is colored red, Q is colored black.
+		     This action does not change the black edge count for any
+		     leaf in the tree, but we will be able to recognize one
+		     of the following situations, which all require that Q
+		     is black.  */
+		  q->red = 0;
+		  p->red = 1;
+		  /* Left rotate p.  */
+		  p->right = q->left;
+		  q->left = p;
+		  *pp = q;
+		  /* Make sure pp is right if the case below tries to use
+		     it.  */
+		  nodestack[sp++] = pp = &q->left;
+		  q = p->right;
+		}
+	      /* We know that Q can't be NULL here.  We also know that Q is
+		 black.  */
+	      if ((q->left == NULL || !q->left->red)
+		  && (q->right == NULL || !q->right->red))
+		{
+		  /* Q has two black successors.  We can simply color Q red.
+		     The whole subtree with root P is now missing one black
+		     edge.  Note that this action can temporarily make the
+		     tree invalid (if P is red).  But we will exit the loop
+		     in that case and set P black, which both makes the tree
+		     valid and also makes the black edge count come out
+		     right.  If P is black, we are at least one step closer
+		     to the root and we'll try again the next iteration.  */
+		  q->red = 1;
+		  r = p;
+		}
+	      else
+		{
+		  /* Q is black, one of Q's successors is red.  We can
+		     repair the tree with one operation and will exit the
+		     loop afterwards.  */
+		  if (q->right == NULL || !q->right->red)
+		    {
+		      /* The left one is red.  We perform the same action as
+			 in maybe_split_for_insert where two red edges are
+			 adjacent but point in different directions:
+			 Q's left successor (let's call it Q2) becomes the
+			 top of the subtree we are looking at, its parent (Q)
+			 and grandparent (P) become its successors. The former
+			 successors of Q2 are placed below P and Q.
+			 P becomes black, and Q2 gets the color that P had.
+			 This changes the black edge count only for node R and
+			 its successors.  */
+		      node q2 = q->left;
+		      q2->red = p->red;
+		      p->right = q2->left;
+		      q->left = q2->right;
+		      q2->right = q;
+		      q2->left = p;
+		      *pp = q2;
+		      p->red = 0;
+		    }
+		  else
+		    {
+		      /* It's the right one.  Rotate P left. P becomes black,
+			 and Q gets the color that P had.  Q's right successor
+			 also becomes black.  This changes the black edge
+			 count only for node R and its successors.  */
+		      q->red = p->red;
+		      p->red = 0;
+
+		      q->right->red = 0;
+
+		      /* left rotate p */
+		      p->right = q->left;
+		      q->left = p;
+		      *pp = q;
+		    }
+
+		  /* We're done.  */
+		  sp = 1;
+		  r = NULL;
+		}
+	    }
+	  else
+	    {
+	      /* Comments: see above.  */
+	      q = p->left;
+	      if (q->red)
+		{
+		  q->red = 0;
+		  p->red = 1;
+		  p->left = q->right;
+		  q->right = p;
+		  *pp = q;
+		  nodestack[sp++] = pp = &q->right;
+		  q = p->left;
+		}
+	      if ((q->right == NULL || !q->right->red)
+		       && (q->left == NULL || !q->left->red))
+		{
+		  q->red = 1;
+		  r = p;
+		}
+	      else
+		{
+		  if (q->left == NULL || !q->left->red)
+		    {
+		      node q2 = q->right;
+		      q2->red = p->red;
+		      p->left = q2->right;
+		      q->right = q2->left;
+		      q2->left = q;
+		      q2->right = p;
+		      *pp = q2;
+		      p->red = 0;
+		    }
+		  else
+		    {
+		      q->red = p->red;
+		      p->red = 0;
+		      q->left->red = 0;
+		      p->left = q->right;
+		      q->right = p;
+		      *pp = q;
+		    }
+		  sp = 1;
+		  r = NULL;
+		}
+	    }
+	  --sp;
+	}
+      if (r != NULL)
+	r->red = 0;
+    }
+
+  free (unchained);
+  return retval;
+}
+libc_hidden_def (__tdelete)
+weak_alias (__tdelete, tdelete)
+
+
+/* Walk the nodes of a tree.
+   ROOT is the root of the tree to be walked, ACTION the function to be
+   called at each node.  LEVEL is the level of ROOT in the whole tree.  */
+static void
+internal_function
+trecurse (const void *vroot, __action_fn_t action, int level)
+{
+  const_node root = (const_node) vroot;
+
+  if (root->left == NULL && root->right == NULL)
+    (*action) (root, leaf, level);
+  else
+    {
+      (*action) (root, preorder, level);
+      if (root->left != NULL)
+	trecurse (root->left, action, level + 1);
+      (*action) (root, postorder, level);
+      if (root->right != NULL)
+	trecurse (root->right, action, level + 1);
+      (*action) (root, endorder, level);
+    }
+}
+
+
+/* Walk the nodes of a tree.
+   ROOT is the root of the tree to be walked, ACTION the function to be
+   called at each node.  */
+void
+__twalk (const void *vroot, __action_fn_t action)
+{
+  const_node root = (const_node) vroot;
+
+  CHECK_TREE (root);
+
+  if (root != NULL && action != NULL)
+    trecurse (root, action, 0);
+}
+libc_hidden_def (__twalk)
+weak_alias (__twalk, twalk)
+
+
+
+/* The standardized functions miss an important functionality: the
+   tree cannot be removed easily.  We provide a function to do this.  */
+static void
+internal_function
+tdestroy_recurse (node root, __free_fn_t freefct)
+{
+  if (root->left != NULL)
+    tdestroy_recurse (root->left, freefct);
+  if (root->right != NULL)
+    tdestroy_recurse (root->right, freefct);
+  (*freefct) ((void *) root->key);
+  /* Free the node itself.  */
+  free (root);
+}
+
+void
+__tdestroy (void *vroot, __free_fn_t freefct)
+{
+  node root = (node) vroot;
+
+  CHECK_TREE (root);
+
+  if (root != NULL)
+    tdestroy_recurse (root, freefct);
+}
+weak_alias (__tdestroy, tdestroy)
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-dirname.c b/ap/libc/glibc/glibc-2.22/misc/tst-dirname.c
new file mode 100644
index 0000000..db08a8d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-dirname.c
@@ -0,0 +1,72 @@
+/* Test program for dirname function a la XPG.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   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/>.  */
+
+#define _GNU_SOURCE	1
+#include <libgen.h>
+#include <stdio.h>
+#include <string.h>
+
+
+static int
+test (const char *input, const char *result)
+{
+  int retval;
+  char *cp;
+  cp = strdupa (input);
+  cp = dirname (cp);
+  retval = strcmp (cp, result);
+  if (retval)
+    printf ("dirname(\"%s\") should be \"%s\", but is \"%s\"\n",
+	    input, result, cp);
+  return retval;
+}
+
+static int
+do_test (void)
+{
+  int result = 0;
+
+  /* These are the examples given in XPG4.2.  */
+  result |= test ("/usr/lib", "/usr");
+  result |= test ("/usr/", "/");
+  result |= test ("usr", ".");
+  result |= test ("/", "/");
+  result |= test (".", ".");
+  result |= test ("..", ".");
+
+  /* Some more tests.   */
+  result |= test ("/usr/lib/", "/usr");
+  result |= test ("/usr", "/");
+  result |= test ("a//", ".");
+  result |= test ("a////", ".");
+  result |= test ("////usr", "/");
+  result |= test ("////usr//", "/");
+  result |= test ("//usr", "//");
+  result |= test ("//usr//", "//");
+  result |= test ("//", "//");
+
+  /* Other Unix implementations behave like this.  */
+  result |= test ("x///y", "x");
+  result |= test ("x/////y", "x");
+
+  return result != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-efgcvt.c b/ap/libc/glibc/glibc-2.22/misc/tst-efgcvt.c
new file mode 100644
index 0000000..5083fec
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-efgcvt.c
@@ -0,0 +1,216 @@
+/* Copyright (C) 1998-2015 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/>.  */
+
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE	1
+#endif
+
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int error_count;
+
+typedef struct
+{
+  double value;
+  int ndigit;
+  int decpt;
+  char result[30];
+} testcase;
+
+typedef char * ((*efcvt_func) (double, int, int *, int *));
+
+typedef int ((*efcvt_r_func) (double, int, int *, int *, char *, size_t));
+
+
+static testcase ecvt_tests[] =
+{
+  { 0.0, 0, 1, "" },
+  { 10.0, 0, 2, "" },
+  { 10.0, 1, 2, "1" },
+  { 10.0, 5, 2, "10000" },
+  { -12.0, 5, 2, "12000" },
+  { 0.2, 4, 0, "2000" },
+  { 0.02, 4, -1, "2000" },
+  { 5.5, 1, 1, "6" },
+  { 1.0, -1, 1, "" },
+  { 0.01, 2, -1, "10" },
+  { 100.0, -2, 3, "" },
+  { 100.0, -5, 3, "" },
+  { 100.0, -4, 3, "" },
+  { 100.01, -4, 3, "" },
+  { 123.01, -4, 3, "" },
+  { 126.71, -4, 3, "" },
+  { 0.0, 4, 1, "0000" },
+#if DBL_MANT_DIG == 53
+  { 0x1p-1074, 3, -323, "494" },
+  { -0x1p-1074, 3, -323, "494" },
+#endif
+  /* -1.0 is end marker.  */
+  { -1.0, 0, 0, "" }
+};
+
+static testcase fcvt_tests[] =
+{
+  { 0.0, 0, 1, "0" },
+  { 10.0, 0, 2, "10" },
+  { 10.0, 1, 2, "100" },
+  { 10.0, 4, 2, "100000" },
+  { -12.0, 5, 2, "1200000" },
+  { 0.2, 4, 0, "2000" },
+  { 0.02, 4, -1, "200" },
+  { 5.5, 1, 1, "55" },
+  { 5.5, 0, 1, "6" },
+  { 0.01, 2, -1, "1" },
+  { 100.0, -2, 3, "100" },
+  { 100.0, -5, 3, "100" },
+  { 100.0, -4, 3, "100" },
+  { 100.01, -4, 3, "100" },
+  { 123.01, -4, 3, "100" },
+  { 126.71, -4, 3, "100" },
+  { 322.5, 16, 3, "3225000000000000000" },
+  /* -1.0 is end marker.  */
+  { -1.0, 0, 0, "" }
+};
+
+static void
+output_error (const char *name, double value, int ndigit,
+	      const char *exp_p, int exp_decpt, int exp_sign,
+	      char *res_p, int res_decpt, int res_sign)
+{
+  printf ("%s returned wrong result for value: %f, ndigits: %d\n",
+	  name, value, ndigit);
+  printf ("Result was p: \"%s\", decpt: %d, sign: %d\n",
+	  res_p, res_decpt, res_sign);
+  printf ("Should be  p: \"%s\", decpt: %d, sign: %d\n",
+	  exp_p, exp_decpt, exp_sign);
+  ++error_count;
+}
+
+
+static void
+output_r_error (const char *name, double value, int ndigit,
+		const char *exp_p, int exp_decpt, int exp_sign, int exp_return,
+		char *res_p, int res_decpt, int res_sign, int res_return)
+{
+  printf ("%s returned wrong result for value: %f, ndigits: %d\n",
+	  name, value, ndigit);
+  printf ("Result was buf: \"%s\", decpt: %d, sign: %d return value: %d\n",
+	  res_p, res_decpt, res_sign, res_return);
+  printf ("Should be  buf: \"%s\", decpt: %d, sign: %d\n",
+	  exp_p, exp_decpt, exp_sign);
+  ++error_count;
+}
+
+static void
+test (testcase tests[], efcvt_func efcvt, const char *name)
+{
+  int no = 0;
+  int decpt, sign;
+  char *p;
+
+  while (tests[no].value != -1.0)
+    {
+      p = efcvt (tests[no].value, tests[no].ndigit, &decpt, &sign);
+      if (decpt != tests[no].decpt
+	  || sign != (tests[no].value < 0)
+	  || strcmp (p, tests[no].result) != 0)
+	output_error (name, tests[no].value, tests[no].ndigit,
+		      tests[no].result, tests[no].decpt,
+		      (tests[no].value < 0),
+		      p, decpt, sign);
+      ++no;
+    }
+}
+
+static void
+test_r (testcase tests[], efcvt_r_func efcvt_r, const char *name)
+{
+  int no = 0;
+  int decpt, sign, res;
+  char buf [1024];
+
+
+  while (tests[no].value != -1.0)
+    {
+      res = efcvt_r (tests[no].value, tests[no].ndigit, &decpt, &sign,
+		     buf, sizeof (buf));
+      if (res != 0
+	  || decpt != tests[no].decpt
+	  || sign != (tests[no].value < 0)
+	  || strcmp (buf, tests[no].result) != 0)
+	output_r_error (name, tests[no].value, tests[no].ndigit,
+			tests[no].result, tests[no].decpt, 0,
+			(tests[no].value < 0),
+			buf, decpt, sign, res);
+      ++no;
+    }
+}
+
+static void
+special (void)
+{
+  int decpt, sign, res;
+  char *p;
+  char buf [1024];
+
+  p = ecvt (NAN, 10, &decpt, &sign);
+  if (sign != 0 || strcmp (p, "nan") != 0)
+    output_error ("ecvt", NAN, 10, "nan", 0, 0, p, decpt, sign);
+
+  p = ecvt (INFINITY, 10, &decpt, &sign);
+  if (sign != 0 || strcmp (p, "inf") != 0)
+    output_error ("ecvt", INFINITY, 10, "inf", 0, 0, p, decpt, sign);
+
+  /* Simply make sure these calls with large NDIGITs don't crash.  */
+  (void) ecvt (123.456, 10000, &decpt, &sign);
+  (void) fcvt (123.456, 10000, &decpt, &sign);
+
+  /* Some tests for the reentrant functions.  */
+  /* Use a too small buffer.  */
+  res = ecvt_r (123.456, 10, &decpt, &sign, buf, 1);
+  if (res == 0)
+    {
+      printf ("ecvt_r with a too small buffer was succesful.\n");
+      ++error_count;
+    }
+  res = fcvt_r (123.456, 10, &decpt, &sign, buf, 1);
+  if (res == 0)
+    {
+      printf ("fcvt_r with a too small buffer was succesful.\n");
+      ++error_count;
+    }
+}
+
+
+static int
+do_test (void)
+{
+  test (ecvt_tests, ecvt, "ecvt");
+  test (fcvt_tests, fcvt, "fcvt");
+  test_r (ecvt_tests, ecvt_r, "ecvt_r");
+  test_r (fcvt_tests, fcvt_r, "fcvt_r");
+  special ();
+
+  return error_count;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-error1.c b/ap/libc/glibc/glibc-2.22/misc/tst-error1.c
new file mode 100644
index 0000000..a97a22c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-error1.c
@@ -0,0 +1,37 @@
+#include <error.h>
+#include <mcheck.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+#include <libc-internal.h>
+
+static int
+do_test (int argc, char *argv[])
+{
+  mtrace ();
+  (void) freopen (argc == 1 ? "/dev/stdout" : argv[1], "a", stderr);
+  /* Orient the stream.  */
+  fwprintf (stderr, L"hello world\n");
+  char buf[20000];
+  static const char str[] = "hello world! ";
+  for (int i = 0; i < 1000; ++i)
+    memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
+  error (0, 0, str);
+
+  /* We're testing a large format string here and need to generate it
+     to avoid this source file being ridiculous.  So disable the warning
+     about a generated format string.  */
+  DIAG_PUSH_NEEDS_COMMENT;
+  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat-security");
+
+  error (0, 0, buf);
+  error (0, 0, buf);
+
+  DIAG_POP_NEEDS_COMMENT;
+
+  error (0, 0, str);
+  return 0;
+}
+
+#define TEST_FUNCTION do_test (argc, argv)
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-fdset.c b/ap/libc/glibc/glibc-2.22/misc/tst-fdset.c
new file mode 100644
index 0000000..077e0db
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-fdset.c
@@ -0,0 +1,67 @@
+/* Test FD* macros.
+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Robert Bihlmeyer <robbe@orcus.priv.at>.
+
+   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 <stdio.h>
+#include <sys/types.h>
+
+static int
+do_test (void)
+{
+  int retval = 0;
+  int i;
+  fd_set set;
+
+  FD_ZERO (&set);
+  for (i=0; i < FD_SETSIZE; ++i)
+    {
+      printf ("%d =>  check:", i);
+      if (FD_ISSET (i, &set) == 0)
+	fputs ("ok", stdout);
+      else
+	{
+	  fputs ("nok", stdout);
+	  retval = 1;
+	}
+      fputs (", set", stdout);
+      FD_SET (i, &set);
+      fputs (", check:", stdout);
+      if (FD_ISSET (i, &set))
+	fputs ("ok", stdout);
+      else
+	{
+	  fputs ("nok", stdout);
+	  retval = 1;
+	}
+      fputs (", clear", stdout);
+      FD_CLR (i, &set);
+      fputs (", check:", stdout);
+      if (FD_ISSET (i, &set) == 0)
+	puts ("ok");
+      else
+	{
+	  puts ("nok");
+	  retval = 1;
+	}
+    }
+
+  return retval;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-hsearch.c b/ap/libc/glibc/glibc-2.22/misc/tst-hsearch.c
new file mode 100644
index 0000000..d390f1d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-hsearch.c
@@ -0,0 +1,34 @@
+#include <search.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  int a = 1;
+  int b = 2;
+  ENTRY i;
+  ENTRY *e;
+
+  if (hcreate (20) == 0)
+    {
+      puts ("hcreate failed");
+      return 1;
+    }
+
+  i.key = (char *) "one";
+  i.data = &a;
+  if (hsearch (i, ENTER) == NULL)
+    return 1;
+
+  i.key = (char *) "one";
+  i.data = &b;
+  e = hsearch (i, ENTER);
+  printf ("e.data = %d\n", *(int *) e->data);
+  if (*(int *) e->data != 1)
+    return 1;
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-insremque.c b/ap/libc/glibc/glibc-2.22/misc/tst-insremque.c
new file mode 100644
index 0000000..9f17055
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-insremque.c
@@ -0,0 +1,61 @@
+#include <search.h>
+#include <stdio.h>
+#include <string.h>
+
+#define CHECK(cond) \
+  do									\
+    if (! (cond))							\
+      {									\
+	printf ("Condition " #cond " not true on line %d\n", __LINE__);	\
+	ret = 1;							\
+      }									\
+  while (0)
+
+static int
+do_test (void)
+{
+  struct qelem elements[4];
+  int ret = 0;
+
+  /* Linear list.  */
+  memset (elements, 0xff, sizeof (elements));
+  insque (&elements[0], NULL);
+  remque (&elements[0]);
+  insque (&elements[0], NULL);
+  insque (&elements[2], &elements[0]);
+  insque (&elements[1], &elements[0]);
+  insque (&elements[3], &elements[2]);
+  remque (&elements[2]);
+  insque (&elements[2], &elements[0]);
+  CHECK (elements[0].q_back == NULL);
+  CHECK (elements[0].q_forw == &elements[2]);
+  CHECK (elements[1].q_back == &elements[2]);
+  CHECK (elements[1].q_forw == &elements[3]);
+  CHECK (elements[2].q_back == &elements[0]);
+  CHECK (elements[2].q_forw == &elements[1]);
+  CHECK (elements[3].q_back == &elements[1]);
+  CHECK (elements[3].q_forw == NULL);
+
+  /* Circular list.  */
+  memset (elements, 0xff, sizeof (elements));
+  elements[0].q_back = &elements[0];
+  elements[0].q_forw = &elements[0];
+  insque (&elements[2], &elements[0]);
+  insque (&elements[1], &elements[0]);
+  insque (&elements[3], &elements[2]);
+  remque (&elements[2]);
+  insque (&elements[2], &elements[0]);
+  CHECK (elements[0].q_back == &elements[3]);
+  CHECK (elements[0].q_forw == &elements[2]);
+  CHECK (elements[1].q_back == &elements[2]);
+  CHECK (elements[1].q_forw == &elements[3]);
+  CHECK (elements[2].q_back == &elements[0]);
+  CHECK (elements[2].q_forw == &elements[1]);
+  CHECK (elements[3].q_back == &elements[1]);
+  CHECK (elements[3].q_forw == &elements[0]);
+
+  return ret;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-mntent.c b/ap/libc/glibc/glibc-2.22/misc/tst-mntent.c
new file mode 100644
index 0000000..876c89f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-mntent.c
@@ -0,0 +1,99 @@
+/* Test case by Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
+   and Ulrich Drepper <drepper@cygnus.com>.  */
+#include <mntent.h>
+#include <stdio.h>
+#include <string.h>
+
+
+int
+main (int argc, char *argv[])
+{
+  int result = 0;
+  struct mntent mef;
+  struct mntent *mnt = &mef;
+  FILE *fp;
+
+  mef.mnt_fsname = strdupa ("/dev/hda1");
+  mef.mnt_dir = strdupa ("/some dir");
+  mef.mnt_type = strdupa ("ext2");
+  mef.mnt_opts = strdupa ("defaults");
+  mef.mnt_freq = 1;
+  mef.mnt_passno = 2;
+
+  if (hasmntopt (mnt, "defaults"))
+    printf ("Found!\n");
+  else
+    {
+      printf ("Didn't find it\n");
+      result = 1;
+    }
+
+  fp = tmpfile ();
+  if (fp == NULL)
+    {
+      printf ("Cannot open temporary file: %m\n");
+      result = 1;
+    }
+  else
+    {
+      char buf[1024];
+
+      /* Write the name entry.  */
+      addmntent (fp, &mef);
+
+      /* Prepare for reading.  */
+      rewind (fp);
+
+      /* First, read it raw.  */
+      if (fgets (buf, sizeof (buf), fp) == NULL)
+	{
+	  printf ("Cannot read temporary file: %m");
+	  result = 1;
+	}
+      else
+	if (strcmp (buf, "/dev/hda1 /some\\040dir ext2 defaults 1 2\n") != 0)
+	  {
+	    puts ("Raw file data not correct");
+	    result = 1;
+	  }
+
+      /* Prepare for reading, part II.  */
+      rewind (fp);
+
+      /* Now read it cooked.  */
+      mnt = getmntent (fp);
+
+      if (strcmp (mnt->mnt_fsname, "/dev/hda1") != 0
+	  || strcmp (mnt->mnt_dir, "/some dir") != 0
+	  || strcmp (mnt->mnt_type, "ext2") != 0
+	  || strcmp (mnt->mnt_opts, "defaults") != 0
+	  || mnt->mnt_freq != 1
+	  || mnt->mnt_passno != 2)
+	{
+	  puts ("Error while reading written entry back in");
+	  result = 1;
+	}
+
+      /* Part III: Entry with whitespaces at the end of a line. */
+      rewind (fp);
+
+      fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp);
+
+      rewind (fp);
+
+      mnt = getmntent (fp);
+
+      if (strcmp (mnt->mnt_fsname, "/foo dir") != 0
+	  || strcmp (mnt->mnt_dir, "/bar dir") != 0
+	  || strcmp (mnt->mnt_type, "auto") != 0
+	  || strcmp (mnt->mnt_opts, "bind") != 0
+	  || mnt->mnt_freq != 0
+	  || mnt->mnt_passno != 0)
+	{
+	  puts ("Error while reading entry with trailing whitespaces");
+	  result = 1;
+	}
+   }
+
+  return result;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-mntent2.c b/ap/libc/glibc/glibc-2.22/misc/tst-mntent2.c
new file mode 100644
index 0000000..ba1ee0a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-mntent2.c
@@ -0,0 +1,44 @@
+#include <mntent.h>
+#include <stdio.h>
+#include <string.h>
+
+
+static int
+do_test (void)
+{
+  int result = 0;
+  struct mntent mef;
+
+  mef.mnt_fsname = strdupa ("/dev/sdf6");
+  mef.mnt_dir = strdupa ("/some dir");
+  mef.mnt_type = strdupa ("ext3");
+  mef.mnt_opts = strdupa ("opt1,opt2,noopt=6,rw,norw,brw");
+  mef.mnt_freq = 1;
+  mef.mnt_passno = 2;
+
+#define TEST(opt, found) \
+  if ((!!hasmntopt (&mef, (opt))) != (found))				\
+    {									\
+      printf ("Option %s was %sfound\n", (opt), (found) ? "not " : "");	\
+      result = 1;							\
+    }
+
+  TEST ("opt1", 1)
+  TEST ("opt2", 1)
+  TEST ("noopt", 1)
+  TEST ("rw", 1)
+  TEST ("norw", 1)
+  TEST ("brw", 1)
+  TEST ("opt", 0)
+  TEST ("oopt", 0)
+  TEST ("w", 0)
+  TEST ("r", 0)
+  TEST ("br", 0)
+  TEST ("nor", 0)
+  TEST ("or", 0)
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-pselect.c b/ap/libc/glibc/glibc-2.22/misc/tst-pselect.c
new file mode 100644
index 0000000..0d11a80
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-pselect.c
@@ -0,0 +1,130 @@
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/select.h>
+#include <sys/wait.h>
+#include <stdlib.h>
+
+
+static volatile int handler_called;
+
+static void
+handler (int sig)
+{
+  handler_called = 1;
+}
+
+
+static int
+do_test (void)
+{
+  struct sigaction sa;
+  sa.sa_handler = handler;
+  sa.sa_flags = 0;
+  sigemptyset (&sa.sa_mask);
+
+  if (sigaction (SIGUSR1, &sa, NULL) != 0)
+    {
+      puts ("sigaction failed");
+      return 1;
+    }
+
+  sa.sa_handler = SIG_IGN;
+  if (sigaction (SIGCHLD, &sa, NULL) != 0)
+    {
+      puts ("2nd sigaction failed");
+      return 1;
+    }
+
+  sigset_t ss_usr1;
+  sigemptyset (&ss_usr1);
+  sigaddset (&ss_usr1, SIGUSR1);
+  if (sigprocmask (SIG_BLOCK, &ss_usr1, NULL) != 0)
+    {
+      puts ("sigprocmask failed");
+      return 1;
+    }
+
+  int fds[2][2];
+
+  if (pipe (fds[0]) != 0 || pipe (fds[1]) != 0)
+    {
+      puts ("pipe failed");
+      return 1;
+    }
+
+  fd_set rfds;
+  FD_ZERO (&rfds);
+
+  sigset_t ss;
+  sigprocmask (SIG_SETMASK, NULL, &ss);
+  sigdelset (&ss, SIGUSR1);
+
+  struct timespec to = { .tv_sec = 0, .tv_nsec = 500000000 };
+
+  pid_t parent = getpid ();
+  pid_t p = fork ();
+  if (p == 0)
+    {
+      close (fds[0][1]);
+      close (fds[1][0]);
+
+      FD_SET (fds[0][0], &rfds);
+
+      int e;
+      do
+	{
+	  if (getppid () != parent)
+	    exit (2);
+
+	  errno = 0;
+	  e = pselect (fds[0][0] + 1, &rfds, NULL, NULL, &to, &ss);
+	}
+      while (e == 0);
+
+      if (e != -1)
+	{
+	  puts ("child: pselect did not fail");
+	  return 0;
+	}
+      if (errno != EINTR)
+	{
+	  puts ("child: pselect did not set errno to EINTR");
+	  return 0;
+	}
+
+      TEMP_FAILURE_RETRY (write (fds[1][1], "foo", 3));
+
+      exit (0);
+    }
+
+  close (fds[0][0]);
+  close (fds[1][1]);
+
+  FD_SET (fds[1][0], &rfds);
+
+  kill (p, SIGUSR1);
+
+  int e = pselect (fds[1][0] + 1, &rfds, NULL, NULL, NULL, &ss);
+  if (e == -1)
+    {
+      puts ("parent: pselect failed");
+      return 1;
+    }
+  if (e != 1)
+    {
+      puts ("parent: pselect did not report readable fd");
+      return 1;
+    }
+  if (!FD_ISSET (fds[1][0], &rfds))
+    {
+      puts ("parent: pselect reports wrong fd");
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-tsearch.c b/ap/libc/glibc/glibc-2.22/misc/tst-tsearch.c
new file mode 100644
index 0000000..70b6c33
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-tsearch.c
@@ -0,0 +1,352 @@
+/* Test program for tsearch et al.
+   Copyright (C) 1997-2015 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/>.  */
+
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE	1
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <search.h>
+#include <tst-stack-align.h>
+
+#define SEED 0
+#define BALANCED 1
+#define PASSES 100
+
+#if BALANCED
+#include <math.h>
+#define SIZE 1000
+#else
+#define SIZE 100
+#endif
+
+enum order
+{
+  ascending,
+  descending,
+  randomorder
+};
+
+enum action
+{
+  build,
+  build_and_del,
+  delete,
+  find
+};
+
+/* Set to 1 if a test is flunked.  */
+static int error = 0;
+
+/* The keys we add to the tree.  */
+static int x[SIZE];
+
+/* Pointers into the key array, possibly permutated, to define an order
+   for insertion/removal.  */
+static int y[SIZE];
+
+/* Flags set for each element visited during a tree walk.  */
+static int z[SIZE];
+
+/* Depths for all the elements, to check that the depth is constant for
+   all three visits.  */
+static int depths[SIZE];
+
+/* Maximum depth during a tree walk.  */
+static int max_depth;
+
+static int stack_align_check[2];
+
+/* Compare two keys.  */
+static int
+cmp_fn (const void *a, const void *b)
+{
+  if (!stack_align_check[0])
+    stack_align_check[0] = TEST_STACK_ALIGN () ? -1 : 1;
+  return *(const int *) a - *(const int *) b;
+}
+
+/* Permute an array of integers.  */
+static void
+memfry (int *string)
+{
+  int i;
+
+  for (i = 0; i < SIZE; ++i)
+    {
+      int32_t j;
+      int c;
+
+      j = random () % SIZE;
+
+      c = string[i];
+      string[i] = string[j];
+      string[j] = c;
+    }
+}
+
+static void
+walk_action (const void *nodep, const VISIT which, const int depth)
+{
+  int key = **(int **) nodep;
+
+  if (!stack_align_check[1])
+    stack_align_check[1] = TEST_STACK_ALIGN () ? -1 : 1;
+
+  if (depth > max_depth)
+    max_depth = depth;
+  if (which == leaf || which == preorder)
+    {
+      ++z[key];
+      depths[key] = depth;
+    }
+  else
+    {
+      if (depths[key] != depth)
+	{
+	  fputs ("Depth for one element is not constant during tree walk.\n",
+		 stdout);
+	}
+    }
+}
+
+static void
+walk_tree (void *root, int expected_count)
+{
+  int i;
+
+  memset (z, 0, sizeof z);
+  max_depth = 0;
+
+  twalk (root, walk_action);
+  for (i = 0; i < expected_count; ++i)
+    if (z[i] != 1)
+      {
+	fputs ("Node was not visited.\n", stdout);
+	error = 1;
+      }
+
+#if BALANCED
+  if (max_depth > log (expected_count) * 2 + 2)
+#else
+  if (max_depth > expected_count)
+#endif
+    {
+      fputs ("Depth too large during tree walk.\n", stdout);
+      error = 1;
+    }
+}
+
+/* Perform an operation on a tree.  */
+static void
+mangle_tree (enum order how, enum action what, void **root, int lag)
+{
+  int i;
+
+  if (how == randomorder)
+    {
+      for (i = 0; i < SIZE; ++i)
+	y[i] = i;
+      memfry (y);
+    }
+
+  for (i = 0; i < SIZE + lag; ++i)
+    {
+      void *elem;
+      int j, k;
+
+      switch (how)
+	{
+	case randomorder:
+	  if (i >= lag)
+	    k = y[i - lag];
+	  else
+	    /* Ensure that the array index is within bounds.  */
+	    k = y[(SIZE - i - 1 + lag) % SIZE];
+	  j = y[i % SIZE];
+	  break;
+
+	case ascending:
+	  k = i - lag;
+	  j = i;
+	  break;
+
+	case descending:
+	  k = SIZE - i - 1 + lag;
+	  j = SIZE - i - 1;
+	  break;
+
+	default:
+	  /* This never should happen, but gcc isn't smart enough to
+	     recognize it.  */
+	  abort ();
+	}
+
+      switch (what)
+	{
+	case build_and_del:
+	case build:
+	  if (i < SIZE)
+	    {
+	      if (tfind (x + j, (void *const *) root, cmp_fn) != NULL)
+		{
+		  fputs ("Found element which is not in tree yet.\n", stdout);
+		  error = 1;
+		}
+	      elem = tsearch (x + j, root, cmp_fn);
+	      if (elem == 0
+		  || tfind (x + j, (void *const *) root, cmp_fn) == NULL)
+		{
+		  fputs ("Couldn't find element after it was added.\n",
+			 stdout);
+		  error = 1;
+		}
+	    }
+
+	  if (what == build || i < lag)
+	    break;
+
+	  j = k;
+	  /* fall through */
+
+	case delete:
+	  elem = tfind (x + j, (void *const *) root, cmp_fn);
+	  if (elem == NULL || tdelete (x + j, root, cmp_fn) == NULL)
+	    {
+	      fputs ("Error deleting element.\n", stdout);
+	      error = 1;
+	    }
+	  break;
+
+	case find:
+	  if (tfind (x + j, (void *const *) root, cmp_fn) == NULL)
+	    {
+	      fputs ("Couldn't find element after it was added.\n", stdout);
+	      error = 1;
+	    }
+	  break;
+
+	}
+    }
+}
+
+
+int
+main (int argc, char **argv)
+{
+  int total_error = 0;
+  static char state[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+  void *root = NULL;
+  int i, j;
+
+  initstate (SEED, state, 8);
+
+  for (i = 0; i < SIZE; ++i)
+    x[i] = i;
+
+  /* Do this loop several times to get different permutations for the
+     random case.  */
+  fputs ("Series I\n", stdout);
+  for (i = 0; i < PASSES; ++i)
+    {
+      fprintf (stdout, "Pass %d... ", i + 1);
+      fflush (stdout);
+      error = 0;
+
+      mangle_tree (ascending, build, &root, 0);
+      mangle_tree (ascending, find, &root, 0);
+      mangle_tree (descending, find, &root, 0);
+      mangle_tree (randomorder, find, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (ascending, delete, &root, 0);
+
+      mangle_tree (ascending, build, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (descending, delete, &root, 0);
+
+      mangle_tree (ascending, build, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (randomorder, delete, &root, 0);
+
+      mangle_tree (descending, build, &root, 0);
+      mangle_tree (ascending, find, &root, 0);
+      mangle_tree (descending, find, &root, 0);
+      mangle_tree (randomorder, find, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (descending, delete, &root, 0);
+
+      mangle_tree (descending, build, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (descending, delete, &root, 0);
+
+      mangle_tree (descending, build, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (randomorder, delete, &root, 0);
+
+      mangle_tree (randomorder, build, &root, 0);
+      mangle_tree (ascending, find, &root, 0);
+      mangle_tree (descending, find, &root, 0);
+      mangle_tree (randomorder, find, &root, 0);
+      walk_tree (root, SIZE);
+      mangle_tree (randomorder, delete, &root, 0);
+
+      for (j = 1; j < SIZE; j *= 2)
+	{
+	  mangle_tree (randomorder, build_and_del, &root, j);
+	}
+
+      fputs (error ? " failed!\n" : " ok.\n", stdout);
+      total_error |= error;
+    }
+
+  fputs ("Series II\n", stdout);
+  for (i = 1; i < SIZE; i *= 2)
+    {
+      fprintf (stdout, "For size %d... ", i);
+      fflush (stdout);
+      error = 0;
+
+      mangle_tree (ascending, build_and_del, &root, i);
+      mangle_tree (descending, build_and_del, &root, i);
+      mangle_tree (ascending, build_and_del, &root, i);
+      mangle_tree (descending, build_and_del, &root, i);
+      mangle_tree (ascending, build_and_del, &root, i);
+      mangle_tree (descending, build_and_del, &root, i);
+      mangle_tree (ascending, build_and_del, &root, i);
+      mangle_tree (descending, build_and_del, &root, i);
+
+      fputs (error ? " failed!\n" : " ok.\n", stdout);
+      total_error |= error;
+    }
+
+  for (i = 0; i < 2; ++i)
+    if (stack_align_check[i] == 0)
+      {
+        printf ("stack alignment check %d not run\n", i);
+        total_error |= 1;
+      }
+    else if (stack_align_check[i] != 1)
+      {
+        printf ("stack insufficiently aligned in check %d\n", i);
+        total_error |= 1;
+      }
+
+  return total_error;
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/ttyent.h b/ap/libc/glibc/glibc-2.22/misc/ttyent.h
new file mode 100644
index 0000000..fe418a5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ttyent.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ttyent.h	8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef	_TTYENT_H
+#define	_TTYENT_H	1
+
+#include <features.h>
+
+#define	_PATH_TTYS	"/etc/ttys"
+
+#define	_TTYS_OFF	"off"
+#define	_TTYS_ON	"on"
+#define	_TTYS_SECURE	"secure"
+#define	_TTYS_WINDOW	"window"
+
+struct ttyent {
+	char	*ty_name;	/* terminal device name */
+	char	*ty_getty;	/* command to execute, usually getty */
+	char	*ty_type;	/* terminal type for termcap */
+#define	TTY_ON		0x01	/* enable logins (start ty_getty program) */
+#define	TTY_SECURE	0x02	/* allow uid of 0 to login */
+	int	ty_status;	/* status flags */
+	char 	*ty_window;	/* command to start up window manager */
+	char	*ty_comment;	/* comment field */
+};
+
+
+__BEGIN_DECLS
+
+extern struct ttyent *getttyent (void) __THROW;
+extern struct ttyent *getttynam (const char *__tty) __THROW;
+extern int setttyent (void) __THROW;
+extern int endttyent (void) __THROW;
+
+__END_DECLS
+
+#endif /* ttyent.h */
diff --git a/ap/libc/glibc/glibc-2.22/misc/ttyslot.c b/ap/libc/glibc/glibc-2.22/misc/ttyslot.c
new file mode 100644
index 0000000..0ed14d7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ttyslot.c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)ttyslot.c	8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <ttyent.h>
+#include <alloca.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+int
+ttyslot (void)
+{
+	struct ttyent *ttyp;
+	int slot;
+	char *p;
+	int cnt;
+	size_t buflen = __sysconf (_SC_TTY_NAME_MAX) + 1;
+	char *name;
+
+	if (buflen == 0)
+	  /* This should be enough if no fixed value is given.  */
+	  buflen = 32;
+
+	name = __alloca (buflen);
+
+	__setttyent();
+	for (cnt = 0; cnt < 3; ++cnt)
+		if (__ttyname_r (cnt, name, buflen) == 0) {
+			if ((p = rindex(name, '/')))
+				++p;
+			else
+				p = name;
+			for (slot = 1; (ttyp = __getttyent()); ++slot)
+				if (!strcmp(ttyp->ty_name, p)) {
+					__endttyent();
+					return(slot);
+				}
+			break;
+		}
+	__endttyent();
+	return(0);
+}
diff --git a/ap/libc/glibc/glibc-2.22/misc/ualarm.c b/ap/libc/glibc/glibc-2.22/misc/ualarm.c
new file mode 100644
index 0000000..c6b0972
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ualarm.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds.
+   If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go
+   off every INTERVAL microseconds thereafter.
+
+   Returns the number of microseconds remaining before the alarm.  */
+useconds_t
+ualarm (value, interval)
+     useconds_t value;
+     useconds_t interval;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (ualarm)
diff --git a/ap/libc/glibc/glibc-2.22/misc/usleep.c b/ap/libc/glibc/glibc-2.22/misc/usleep.c
new file mode 100644
index 0000000..a28b77c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/usleep.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Sleep USECONDS microseconds, or until a previously set timer goes off.  */
+int
+usleep (useconds)
+     useconds_t useconds;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (usleep)
diff --git a/ap/libc/glibc/glibc-2.22/misc/ustat.c b/ap/libc/glibc/glibc-2.22/misc/ustat.c
new file mode 100644
index 0000000..1e84062
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ustat.c
@@ -0,0 +1,31 @@
+/* Return info on filesystem.
+   Copyright (C) 1995-2015 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 <unistd.h>
+#include <errno.h>
+#include <sys/ustat.h>
+
+int
+ustat (dev, ust)
+     dev_t dev;
+     struct ustat * ust;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (ustat)
diff --git a/ap/libc/glibc/glibc-2.22/misc/ustat.h b/ap/libc/glibc/glibc-2.22/misc/ustat.h
new file mode 100644
index 0000000..cba150e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/ustat.h
@@ -0,0 +1 @@
+#include <sys/ustat.h>
diff --git a/ap/libc/glibc/glibc-2.22/misc/utimes.c b/ap/libc/glibc/glibc-2.22/misc/utimes.c
new file mode 100644
index 0000000..6b969e7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/utimes.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991-2015 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/time.h>
+#include <errno.h>
+#include <stddef.h>
+
+/* Change the access time of FILE to TVP[0] and
+   the modification time of FILE to TVP[1].  */
+int
+__utimes (file, tvp)
+     const char *file;
+     const struct timeval tvp[2];
+{
+  if (file == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+weak_alias (__utimes, utimes)
+
+stub_warning (utimes)
diff --git a/ap/libc/glibc/glibc-2.22/misc/vhangup.c b/ap/libc/glibc/glibc-2.22/misc/vhangup.c
new file mode 100644
index 0000000..9782540
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/vhangup.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+
+/* Revoke access permissions to all processes currently communicating
+   with the control terminal, and then send a SIGHUP signal to the process
+   group of the control terminal.  */
+int
+vhangup (void)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (vhangup)
diff --git a/ap/libc/glibc/glibc-2.22/misc/writev.c b/ap/libc/glibc/glibc-2.22/misc/writev.c
new file mode 100644
index 0000000..34e7841
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/writev.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991-2015 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 <unistd.h>
+#include <sys/uio.h>
+
+/* Write data pointed by the buffers described by VECTOR, which
+   is a vector of COUNT `struct iovec's, to file descriptor FD.
+   The data is written in the order specified.
+   Operates just like `write' (see <unistd.h>) except that the data
+   are taken from VECTOR instead of a contiguous buffer.  */
+ssize_t
+__writev (fd, vector, count)
+     int fd;
+     const struct iovec *vector;
+     int count;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__writev, writev)
+
+stub_warning (writev)