diff --git a/ap/libc/glibc/glibc-2.22/assert/Depend b/ap/libc/glibc/glibc-2.22/assert/Depend
new file mode 100644
index 0000000..981111e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/Depend
@@ -0,0 +1,2 @@
+iconvdata
+localedata
diff --git a/ap/libc/glibc/glibc-2.22/assert/Makefile b/ap/libc/glibc/glibc-2.22/assert/Makefile
new file mode 100644
index 0000000..416116c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/Makefile
@@ -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/>.
+
+#
+#	Sub-makefile for assert portion of the library.
+#
+subdir	:= assert
+
+include ../Makeconfig
+
+headers	:= assert.h
+
+routines := assert assert-perr __assert
+tests := test-assert test-assert-perr
+
+include ../Rules
diff --git a/ap/libc/glibc/glibc-2.22/assert/Versions b/ap/libc/glibc/glibc-2.22/assert/Versions
new file mode 100644
index 0000000..9e1a5f2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/Versions
@@ -0,0 +1,10 @@
+libc {
+  GLIBC_2.0 {
+    # functions used in inline functions or macros
+    __assert_fail; __assert_perror_fail;
+  }
+  GLIBC_2.2 {
+    # just for standard compliance
+    __assert;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.22/assert/__assert.c b/ap/libc/glibc/glibc-2.22/assert/__assert.c
new file mode 100644
index 0000000..fb8a363
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/__assert.c
@@ -0,0 +1,26 @@
+/* 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/>.  */
+
+/* We have to see the prototype.  */
+#undef NDEBUG
+#include <assert.h>
+
+void
+__assert (const char *assertion, const char *file, int line)
+{
+  __assert_fail (assertion, file, line, (const char *) 0);
+}
diff --git a/ap/libc/glibc/glibc-2.22/assert/assert-perr.c b/ap/libc/glibc/glibc-2.22/assert/assert-perr.c
new file mode 100644
index 0000000..204b9c4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/assert-perr.c
@@ -0,0 +1,38 @@
+/* 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 <assert.h>
+#include <libintl.h>
+#include <string.h>
+
+
+/* This function, when passed an error number, a filename, and a line
+   number, prints a message on the standard error stream of the form:
+	a.c:10: foobar: Unexpected error: Computer bought the farm
+   It then aborts program execution via a call to `abort'.  */
+void
+__assert_perror_fail (int errnum,
+		      const char *file, unsigned int line,
+		      const char *function)
+{
+  char errbuf[1024];
+
+  char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
+  __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
+		      e, file, line, function);
+}
+libc_hidden_def (__assert_perror_fail)
diff --git a/ap/libc/glibc/glibc-2.22/assert/assert.c b/ap/libc/glibc/glibc-2.22/assert/assert.c
new file mode 100644
index 0000000..21563f6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/assert.c
@@ -0,0 +1,104 @@
+/* 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 <assert.h>
+#include <atomic.h>
+#include <ldsodefs.h>
+#include <libintl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sysdep.h>
+#include <unistd.h>
+#include <sys/mman.h>
+
+
+extern const char *__progname;
+
+#include <wchar.h>
+#include <libio/iolibio.h>
+#define fflush(s) _IO_fflush (s)
+
+/* This function, when passed a string containing an asserted
+   expression, a filename, and a line number, prints a message
+   on the standard error stream of the form:
+	a.c:10: foobar: Assertion `a == b' failed.
+   It then aborts program execution via a call to `abort'.  */
+
+#ifdef FATAL_PREPARE_INCLUDE
+# include FATAL_PREPARE_INCLUDE
+#endif
+
+
+void
+__assert_fail_base (const char *fmt, const char *assertion, const char *file,
+		    unsigned int line, const char *function)
+{
+  char *str;
+
+#ifdef FATAL_PREPARE
+  FATAL_PREPARE;
+#endif
+
+  int total;
+  if (__asprintf (&str, fmt,
+		  __progname, __progname[0] ? ": " : "",
+		  file, line,
+		  function ? function : "", function ? ": " : "",
+		  assertion, &total) >= 0)
+    {
+      /* Print the message.  */
+      (void) __fxprintf (NULL, "%s", str);
+      (void) fflush (stderr);
+
+      total = (total + 1 + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1);
+      struct abort_msg_s *buf = __mmap (NULL, total, PROT_READ | PROT_WRITE,
+					MAP_ANON | MAP_PRIVATE, -1, 0);
+      if (__glibc_likely (buf != MAP_FAILED))
+	{
+	  buf->size = total;
+	  strcpy (buf->msg, str);
+
+	  /* We have to free the old buffer since the application might
+	     catch the SIGABRT signal.  */
+	  struct abort_msg_s *old = atomic_exchange_acq (&__abort_msg, buf);
+
+	  if (old != NULL)
+	    __munmap (old, old->size);
+	}
+
+      free (str);
+    }
+  else
+    {
+      /* At least print a minimal message.  */
+      static const char errstr[] = "Unexpected error.\n";
+      __libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
+    }
+
+  abort ();
+}
+
+
+#undef __assert_fail
+void
+__assert_fail (const char *assertion, const char *file, unsigned int line,
+	       const char *function)
+{
+  __assert_fail_base (_("%s%s%s:%u: %s%sAssertion `%s' failed.\n%n"),
+		      assertion, file, line, function);
+}
+hidden_def(__assert_fail)
diff --git a/ap/libc/glibc/glibc-2.22/assert/assert.h b/ap/libc/glibc/glibc-2.22/assert/assert.h
new file mode 100644
index 0000000..d04c58c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/assert.h
@@ -0,0 +1,118 @@
+/* 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/>.  */
+
+/*
+ *	ISO C99 Standard: 7.2 Diagnostics	<assert.h>
+ */
+
+#ifdef	_ASSERT_H
+
+# undef	_ASSERT_H
+# undef	assert
+# undef __ASSERT_VOID_CAST
+
+# ifdef	__USE_GNU
+#  undef assert_perror
+# endif
+
+#endif /* assert.h	*/
+
+#define	_ASSERT_H	1
+#include <features.h>
+
+#if defined __cplusplus && __GNUC_PREREQ (2,95)
+# define __ASSERT_VOID_CAST static_cast<void>
+#else
+# define __ASSERT_VOID_CAST (void)
+#endif
+
+/* void assert (int expression);
+
+   If NDEBUG is defined, do nothing.
+   If not, and EXPRESSION is zero, print an error message and abort.  */
+
+#ifdef	NDEBUG
+
+# define assert(expr)		(__ASSERT_VOID_CAST (0))
+
+/* void assert_perror (int errnum);
+
+   If NDEBUG is defined, do nothing.  If not, and ERRNUM is not zero, print an
+   error message with the error text for ERRNUM and abort.
+   (This is a GNU extension.) */
+
+# ifdef	__USE_GNU
+#  define assert_perror(errnum)	(__ASSERT_VOID_CAST (0))
+# endif
+
+#else /* Not NDEBUG.  */
+
+__BEGIN_DECLS
+
+/* This prints an "Assertion failed" message and aborts.  */
+extern void __assert_fail (const char *__assertion, const char *__file,
+			   unsigned int __line, const char *__function)
+     __THROW __attribute__ ((__noreturn__));
+
+/* Likewise, but prints the error text for ERRNUM.  */
+extern void __assert_perror_fail (int __errnum, const char *__file,
+				  unsigned int __line, const char *__function)
+     __THROW __attribute__ ((__noreturn__));
+
+
+/* The following is not at all used here but needed for standard
+   compliance.  */
+extern void __assert (const char *__assertion, const char *__file, int __line)
+     __THROW __attribute__ ((__noreturn__));
+
+
+__END_DECLS
+
+# define assert(expr)							\
+  ((expr)								\
+   ? __ASSERT_VOID_CAST (0)						\
+   : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION))
+
+# ifdef	__USE_GNU
+#  define assert_perror(errnum)						\
+  (!(errnum)								\
+   ? __ASSERT_VOID_CAST (0)						\
+   : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION))
+# endif
+
+/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
+   which contains the name of the function currently being defined.
+   This is broken in G++ before version 2.6.
+   C9x has a similar variable called __func__, but prefer the GCC one since
+   it demangles C++ function names.  */
+# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
+#   define __ASSERT_FUNCTION	__PRETTY_FUNCTION__
+# else
+#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#   define __ASSERT_FUNCTION	__func__
+#  else
+#   define __ASSERT_FUNCTION	((const char *) 0)
+#  endif
+# endif
+
+#endif /* NDEBUG.  */
+
+
+#if defined __USE_ISOC11 && !defined __cplusplus
+# undef static_assert
+# define static_assert _Static_assert
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/assert/test-assert-perr.c b/ap/libc/glibc/glibc-2.22/assert/test-assert-perr.c
new file mode 100644
index 0000000..8496db6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/test-assert-perr.c
@@ -0,0 +1,86 @@
+/* Test assert_perror().
+ *
+ * This is hairier than you'd think, involving games with
+ * stdio and signals.
+ *
+ */
+
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <setjmp.h>
+
+jmp_buf rec;
+char buf[160];
+
+static void
+sigabrt (int unused)
+{
+  longjmp (rec, 1);  /* recover control */
+}
+
+#undef NDEBUG
+#include <assert.h>
+static void
+assert1 (void)
+{
+  assert_perror (1);
+}
+
+static void
+assert2 (void)
+{
+  assert_perror (0);
+}
+
+#define NDEBUG
+#include <assert.h>
+static void
+assert3 (void)
+{
+  assert_perror (2);
+}
+
+int
+main(void)
+{
+  volatile int failed = 1;  /* safety in presence of longjmp() */
+
+  fclose (stderr);
+  stderr = tmpfile ();
+  if (!stderr)
+    abort ();
+
+  signal (SIGABRT, sigabrt);
+
+  if (!setjmp (rec))
+    assert1 ();
+  else
+    failed = 0;  /* should happen */
+
+  if (!setjmp (rec))
+    assert2 ();
+  else
+    failed = 1; /* should not happen */
+
+  if (!setjmp (rec))
+    assert3 ();
+  else
+    failed = 1; /* should not happen */
+
+  rewind (stderr);
+  fgets (buf, 160, stderr);
+  if (!strstr(buf, strerror (1)))
+    failed = 1;
+
+  fgets (buf, 160, stderr);
+  if (strstr (buf, strerror (0)))
+    failed = 1;
+
+  fgets (buf, 160, stderr);
+  if (strstr (buf, strerror (2)))
+    failed = 1;
+
+  return failed;
+}
diff --git a/ap/libc/glibc/glibc-2.22/assert/test-assert.c b/ap/libc/glibc/glibc-2.22/assert/test-assert.c
new file mode 100644
index 0000000..26b58d4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/assert/test-assert.c
@@ -0,0 +1,88 @@
+/* Test assert().
+ *
+ * This is hairier than you'd think, involving games with
+ * stdio and signals.
+ *
+ */
+
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <setjmp.h>
+
+jmp_buf rec;
+char buf[160];
+
+static void
+sigabrt (int unused)
+{
+  longjmp (rec, 1);  /* recover control */
+}
+
+#undef NDEBUG
+#include <assert.h>
+static void
+assert1 (void)
+{
+  assert (1 == 2);
+}
+
+static void
+assert2 (void)
+{
+  assert (1 == 1);
+}
+
+
+#define NDEBUG
+#include <assert.h>
+static void
+assert3 (void)
+{
+  assert (2 == 3);
+}
+
+int
+main (void)
+{
+
+  volatile int failed = 1;
+
+  fclose (stderr);
+  stderr = tmpfile ();
+  if(!stderr)
+    abort ();
+
+  signal (SIGABRT, sigabrt);
+
+  if (!setjmp (rec))
+    assert1 ();
+  else
+    failed = 0;  /* should happen */
+
+  if (!setjmp (rec))
+    assert2 ();
+  else
+    failed = 1; /* should not happen */
+
+  if (!setjmp (rec))
+    assert3 ();
+  else
+    failed = 1; /* should not happen */
+
+  rewind (stderr);
+  fgets (buf, 160, stderr);
+  if (!strstr (buf, "1 == 2"))
+    failed = 1;
+
+  fgets (buf, 160, stderr);
+  if (strstr (buf, "1 == 1"))
+    failed = 1;
+
+  fgets (buf, 160, stderr);
+  if (strstr (buf, "2 == 3"))
+    failed = 1;
+
+  return failed;
+}
