diff --git a/ap/libc/glibc/glibc-2.23/setjmp/Makefile b/ap/libc/glibc/glibc-2.23/setjmp/Makefile
new file mode 100644
index 0000000..5b677cc
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/Makefile
@@ -0,0 +1,37 @@
+# Copyright (C) 1991-2016 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+#
+#	Makefile for setjmp/longjmp routines
+#
+subdir	:= setjmp
+
+include ../Makeconfig
+
+headers	:= setjmp.h bits/setjmp.h bits/setjmp2.h
+
+routines	:= setjmp sigjmp bsd-setjmp bsd-_setjmp \
+		   longjmp __longjmp jmp-unwind
+
+tests		:= tst-setjmp jmpbug bug269-setjmp tst-setjmp-fp \
+		   tst-sigsetjmp tst-setjmp-static
+tests-static	:= tst-setjmp-static
+
+
+include ../Rules
+
+$(objpfx)tst-setjmp-fp: $(libm)
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/Versions b/ap/libc/glibc/glibc-2.23/setjmp/Versions
new file mode 100644
index 0000000..2baa49a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/Versions
@@ -0,0 +1,16 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    _longjmp; __sigsetjmp; _setjmp;
+
+    # l*
+    longjmp;
+
+    # s*
+    setjmp;
+  }
+  GLIBC_PRIVATE {
+    # helper functions
+    __libc_longjmp; __libc_siglongjmp;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/__longjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/__longjmp.c
new file mode 100644
index 0000000..e4fc2aa
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/__longjmp.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <setjmp.h>
+
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.  */
+void
+__longjmp (__jmp_buf env, int val)
+{
+  if (val == 0)
+    val = 1;
+
+  __set_errno (ENOSYS);
+  /* No way to signal failure.	*/
+}
+
+stub_warning (longjmp)
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/bits/setjmp2.h b/ap/libc/glibc/glibc-2.23/setjmp/bits/setjmp2.h
new file mode 100644
index 0000000..dbf3454
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/bits/setjmp2.h
@@ -0,0 +1,40 @@
+/* Checking macros for setjmp functions.
+   Copyright (C) 2009-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp2.h> directly; use <setjmp.h> instead."
+#endif
+
+/* Variant of the longjmp functions which perform some sanity checking.  */
+#ifdef __REDIRECT_NTH
+extern void __REDIRECT_NTHNL (longjmp,
+			      (struct __jmp_buf_tag __env[1], int __val),
+			      __longjmp_chk) __attribute__ ((__noreturn__));
+extern void __REDIRECT_NTHNL (_longjmp,
+			      (struct __jmp_buf_tag __env[1], int __val),
+			      __longjmp_chk) __attribute__ ((__noreturn__));
+extern void __REDIRECT_NTHNL (siglongjmp,
+			      (struct __jmp_buf_tag __env[1], int __val),
+			      __longjmp_chk) __attribute__ ((__noreturn__));
+#else
+extern void __longjmp_chk (struct __jmp_buf_tag __env[1], int __val),
+     __THROWNL __attribute__ ((__noreturn__));
+# define longjmp __longjmp_chk
+# define _longjmp __longjmp_chk
+# define siglongjmp __longjmp_chk
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/bsd-_setjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/bsd-_setjmp.c
new file mode 100644
index 0000000..a710d90
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/bsd-_setjmp.c
@@ -0,0 +1,34 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'.  Stub version.
+   Copyright (C) 1994-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+#include <setjmp.h>
+
+#undef _setjmp
+
+/* This implementation in C will not usually work, because the call
+   really needs to be a tail-call so __sigsetjmp saves the state of
+   the caller, not the state of this `setjmp' frame which then
+   immediate unwinds.  */
+
+int
+_setjmp (jmp_buf env)
+{
+  return __sigsetjmp (env, 0);
+}
+libc_hidden_def (_setjmp)
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/bsd-setjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/bsd-setjmp.c
new file mode 100644
index 0000000..53eef87
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/bsd-setjmp.c
@@ -0,0 +1,33 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'.  Stub version.
+   Copyright (C) 1994-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+#include <setjmp.h>
+
+#undef setjmp
+
+/* This implementation in C will not usually work, because the call
+   really needs to be a tail-call so __sigsetjmp saves the state of
+   the caller, not the state of this `setjmp' frame which then
+   immediate unwinds.  */
+
+int
+setjmp (jmp_buf env)
+{
+  return __sigsetjmp (env, 1);
+}
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/bug269-setjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/bug269-setjmp.c
new file mode 100644
index 0000000..4bf5b7c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/bug269-setjmp.c
@@ -0,0 +1,106 @@
+/* Copyright (C) 2004-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Test case for Bugzilla # 269 */
+
+#include <stdio.h>
+#include <setjmp.h>
+#include <stdlib.h>
+
+jmp_buf buf1;
+jmp_buf buf2;
+int *p;
+int n_x = 6;
+
+static int g_counter = 0;
+
+int
+f (void)
+{
+  static int counter = 0;
+  static int way_point1 = 3;
+  static int way_point2 = 2;
+  int lose = 0;
+
+  if (setjmp (buf1) != 101)
+    {
+      int a[n_x];		/* reallocate stack space */
+      g_counter++;
+      p = &a[0];
+      if (g_counter < 5)
+	longjmp (buf1, 2);
+      else if (g_counter == 5)
+	longjmp (buf1, 101);
+      else
+	{
+	  _setjmp (buf2);
+	  _longjmp (buf1, 101);
+	}
+    }
+
+  way_point1--;
+
+  if (counter == 0)
+    {
+      counter++;
+      {
+	int a[n_x];		/* reallocate stack space */
+	g_counter++;
+	p = &a[0];
+	if (g_counter < 5)
+	  longjmp (buf1, 2);
+	else if (g_counter == 5)
+	  longjmp (buf1, 101);
+	else
+	  {
+	    _setjmp (buf2);
+	    _longjmp (buf1, 101);
+	  }
+      }
+    }
+
+  way_point2--;
+
+  if (counter == 1)
+    {
+      counter++;
+      longjmp (buf2, 2);
+    }
+
+  lose = !(way_point1 == 0 && way_point2 == 0
+	   && g_counter == 6 && counter == 2);
+
+  return lose;
+}
+
+static int
+do_test (void)
+{
+  int lose;
+
+  lose = f ();
+
+  if (lose)
+    puts ("Test FAILED!");
+  else
+    puts ("Test succeeded!");
+
+  return lose ? EXIT_FAILURE : EXIT_SUCCESS;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/jmp-unwind.c b/ap/libc/glibc/glibc-2.23/setjmp/jmp-unwind.c
new file mode 100644
index 0000000..f8dd4ce
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/jmp-unwind.c
@@ -0,0 +1,28 @@
+/* _longjmp_unwind -- Clean up stack frames unwound by longjmp.  Stub version.
+   Copyright (C) 1995-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <setjmp.h>
+
+void
+_longjmp_unwind (jmp_buf env, int val)
+{
+
+  /* This function can perform any cleanups necessary to safely unwind the
+     stack frames around the current context which ENV unwinds past.  */
+
+}
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/jmpbug.c b/ap/libc/glibc/glibc-2.23/setjmp/jmpbug.c
new file mode 100644
index 0000000..8594c5a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/jmpbug.c
@@ -0,0 +1,41 @@
+/* setjmp vs alloca test case.  Exercised bug on sparc.  */
+
+#include <stdio.h>
+#include <setjmp.h>
+#include <alloca.h>
+
+static void
+sub5 (jmp_buf buf)
+{
+  longjmp (buf, 1);
+}
+
+static void
+test (int x)
+{
+  jmp_buf buf;
+  char *volatile foo;
+  int arr[100];
+
+  arr[77] = x;
+  if (setjmp (buf))
+    {
+      printf ("made it ok; %d\n", arr[77]);
+      return;
+    }
+
+  foo = (char *) alloca (128);
+  (void) foo;
+  sub5 (buf);
+}
+
+int
+main (void)
+{
+  int i;
+
+  for (i = 123; i < 345; ++i)
+    test (i);
+
+  return 0;
+}
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/longjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/longjmp.c
new file mode 100644
index 0000000..e10c45e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/longjmp.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+#include <setjmp.h>
+#include <signal.h>
+
+
+/* Set the signal mask to the one specified in ENV, and jump
+   to the position specified in ENV, causing the setjmp
+   call there to return VAL, or 1 if VAL is 0.  */
+void
+__libc_siglongjmp (sigjmp_buf env, int val)
+{
+  /* Perform any cleanups needed by the frames being unwound.  */
+  _longjmp_unwind (env, val);
+
+  if (env[0].__mask_was_saved)
+    /* Restore the saved signal mask.  */
+    (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask,
+			  (sigset_t *) NULL);
+
+  /* Call the machine-dependent function to restore machine state.  */
+  __longjmp (env[0].__jmpbuf, val ?: 1);
+}
+
+#ifndef __libc_siglongjmp
+strong_alias (__libc_siglongjmp, __libc_longjmp)
+libc_hidden_def (__libc_longjmp)
+weak_alias (__libc_siglongjmp, _longjmp)
+weak_alias (__libc_siglongjmp, longjmp)
+weak_alias (__libc_siglongjmp, siglongjmp)
+#endif
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/setjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/setjmp.c
new file mode 100644
index 0000000..b4f2c9a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/setjmp.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <setjmp.h>
+
+
+/* Save the current program position in ENV and return 0.  */
+int
+__libc_sigsetjmp (jmp_buf env, int savemask)
+{
+  /* Save the signal mask if requested.  */
+  __sigjmp_save (env, savemask);
+
+  __set_errno (ENOSYS);
+  /* No way to signal failure.	*/
+  return 0;
+}
+
+weak_alias (__libc_sigsetjmp, __sigsetjmp)
+stub_warning (__sigsetjmp)
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/setjmp.h b/ap/libc/glibc/glibc-2.23/setjmp/setjmp.h
new file mode 100644
index 0000000..ccfb70a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/setjmp.h
@@ -0,0 +1,114 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/*
+ *	ISO C99 Standard: 7.13 Nonlocal jumps	<setjmp.h>
+ */
+
+#ifndef	_SETJMP_H
+#define	_SETJMP_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+#include <bits/setjmp.h>		/* Get `__jmp_buf'.  */
+#include <bits/sigset.h>		/* Get `__sigset_t'.  */
+
+
+/* Calling environment, plus possibly a saved signal mask.  */
+struct __jmp_buf_tag
+  {
+    /* NOTE: The machine-dependent definitions of `__sigsetjmp'
+       assume that a `jmp_buf' begins with a `__jmp_buf' and that
+       `__mask_was_saved' follows it.  Do not move these members
+       or add others before it.  */
+    __jmp_buf __jmpbuf;		/* Calling environment.  */
+    int __mask_was_saved;	/* Saved the signal mask?  */
+    __sigset_t __saved_mask;	/* Saved signal mask.  */
+  };
+
+
+__BEGIN_NAMESPACE_STD
+
+typedef struct __jmp_buf_tag jmp_buf[1];
+
+/* Store the calling environment in ENV, also saving the signal mask.
+   Return 0.  */
+extern int setjmp (jmp_buf __env) __THROWNL;
+
+__END_NAMESPACE_STD
+
+/* Store the calling environment in ENV, also saving the
+   signal mask if SAVEMASK is nonzero.  Return 0.
+   This is the internal name for `sigsetjmp'.  */
+extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
+
+/* Store the calling environment in ENV, not saving the signal mask.
+   Return 0.  */
+extern int _setjmp (struct __jmp_buf_tag __env[1]) __THROWNL;
+
+/* Do not save the signal mask.  This is equivalent to the `_setjmp'
+   BSD function.  */
+#define setjmp(env)	_setjmp (env)
+
+
+__BEGIN_NAMESPACE_STD
+
+/* Jump to the environment saved in ENV, making the
+   `setjmp' call there return VAL, or 1 if VAL is 0.  */
+extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
+     __THROWNL __attribute__ ((__noreturn__));
+
+__END_NAMESPACE_STD
+
+#if defined __USE_MISC || defined __USE_XOPEN
+/* Same.  Usually `_longjmp' is used with `_setjmp', which does not save
+   the signal mask.  But it is how ENV was saved that determines whether
+   `longjmp' restores the mask; `_longjmp' is just an alias.  */
+extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
+     __THROWNL __attribute__ ((__noreturn__));
+#endif
+
+
+#ifdef	__USE_POSIX
+/* Use the same type for `jmp_buf' and `sigjmp_buf'.
+   The `__mask_was_saved' flag determines whether
+   or not `longjmp' will restore the signal mask.  */
+typedef struct __jmp_buf_tag sigjmp_buf[1];
+
+/* Store the calling environment in ENV, also saving the
+   signal mask if SAVEMASK is nonzero.  Return 0.  */
+# define sigsetjmp(env, savemask)	__sigsetjmp (env, savemask)
+
+/* Jump to the environment saved in ENV, making the
+   sigsetjmp call there return VAL, or 1 if VAL is 0.
+   Restore the signal mask if that sigsetjmp call saved it.
+   This is just an alias `longjmp'.  */
+extern void siglongjmp (sigjmp_buf __env, int __val)
+     __THROWNL __attribute__ ((__noreturn__));
+#endif /* Use POSIX.  */
+
+
+/* Define helper functions to catch unsafe code.  */
+#if __USE_FORTIFY_LEVEL > 0
+# include <bits/setjmp2.h>
+#endif
+
+__END_DECLS
+
+#endif /* setjmp.h  */
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/sigjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/sigjmp.c
new file mode 100644
index 0000000..a7f9f67
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/sigjmp.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stddef.h>
+#include <setjmp.h>
+#include <signal.h>
+
+/* This function is called by the `sigsetjmp' macro
+   before doing a `__setjmp' on ENV[0].__jmpbuf.
+   Always return zero.  */
+
+int
+__sigjmp_save (sigjmp_buf env, int savemask)
+{
+  env[0].__mask_was_saved = (savemask &&
+			     __sigprocmask (SIG_BLOCK, (sigset_t *) NULL,
+					    &env[0].__saved_mask) == 0);
+
+  return 0;
+}
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp-fp.c b/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp-fp.c
new file mode 100644
index 0000000..142232a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp-fp.c
@@ -0,0 +1,105 @@
+/* Test that setjmp/longjmp do not save and restore floating-point
+   exceptions and rounding modes.
+   Copyright (C) 2013-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fenv.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static jmp_buf __attribute__ ((unused)) env;
+static int result = 0;
+
+#if defined FE_TONEAREST && defined FE_TOWARDZERO
+static int expected_rounding_mode = FE_TONEAREST;
+
+static void
+change_rounding_mode (void)
+{
+  if (fesetround (FE_TOWARDZERO) == 0)
+    expected_rounding_mode = FE_TOWARDZERO;
+  else
+    puts ("fesetround (FE_TOWARDZERO) failed, continuing test");
+  longjmp (env, 1);
+}
+#endif
+
+#ifdef FE_INVALID
+static int expected_exceptions = 0;
+
+static void
+raise_exception (void)
+{
+  if (feraiseexcept (FE_INVALID) == 0)
+    expected_exceptions = FE_INVALID;
+  else
+    puts ("feraiseexcept (FE_INVALID) failed, continuing test");
+  longjmp (env, 1);
+}
+#endif
+
+static int
+do_test (void)
+{
+#if defined FE_TONEAREST && defined FE_TOWARDZERO
+  if (fesetround (FE_TONEAREST) == 0)
+    {
+      if (setjmp (env) == 0)
+	change_rounding_mode ();
+      else
+	{
+	  if (fegetround () == expected_rounding_mode)
+	    puts ("PASS: longjmp preserved rounding mode");
+	  else
+	    {
+	      puts ("FAIL: longjmp changed rounding mode");
+	      result = 1;
+	    }
+	}
+    }
+  else
+    puts ("fesetround (FE_TONEAREST) failed, not testing rounding modes");
+#else
+  puts ("rounding mode test not supported");
+#endif
+#ifdef FE_INVALID
+  if (feclearexcept (FE_ALL_EXCEPT) == 0)
+    {
+      if (setjmp (env) == 0)
+	raise_exception ();
+      else
+	{
+	  if (fetestexcept (FE_INVALID) == expected_exceptions)
+	    puts ("PASS: longjmp preserved exceptions");
+	  else
+	    {
+	      puts ("FAIL: longjmp changed exceptions");
+	      result = 1;
+	    }
+	}
+    }
+  else
+    puts ("feclearexcept (FE_ALL_EXCEPT) failed, not testing exceptions");
+#else
+  puts ("exception test not supported");
+#endif
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp-static.c b/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp-static.c
new file mode 100644
index 0000000..5ca5df8
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp-static.c
@@ -0,0 +1 @@
+#include "tst-setjmp.c"
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp.c
new file mode 100644
index 0000000..efa4930
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/tst-setjmp.c
@@ -0,0 +1,120 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <stdio.h>
+#include <setjmp.h>
+#include <stdlib.h>
+
+static jmp_buf env;
+static int last_value = -1, lose = 0;
+
+static void
+jump (int val)
+{
+  longjmp (env, val);
+}
+
+static int
+do_test (void)
+{
+  int value;
+
+  value = setjmp (env);
+  if (value != last_value + 1)
+    {
+      fputs("Shouldn't have ", stdout);
+      lose = 1;
+    }
+  last_value = value;
+  switch (value)
+    {
+    case 0:
+      puts("Saved environment.");
+      jump (0);
+    default:
+      printf ("Jumped to %d.\n", value);
+      if (value < 10)
+	jump (value + 1);
+    }
+
+  if (!lose && value == 10)
+    {
+      /* Do a second test, this time without `setjmp' being a macro.
+         This is not required by ISO C but we have this for compatibility.  */
+#undef setjmp
+      extern int setjmp (jmp_buf);
+
+      last_value = -1;
+      lose = 0;
+
+      value = setjmp (env);
+      if (value != last_value + 1)
+	{
+	  fputs("Shouldn't have ", stdout);
+	  lose = 1;
+	}
+      last_value = value;
+      switch (value)
+	{
+	case 0:
+	  puts("Saved environment.");
+	  jump (0);
+	default:
+	  printf ("Jumped to %d.\n", value);
+	  if (value < 10)
+	    jump (value + 1);
+	}
+    }
+
+  if (!lose && value == 10)
+    {
+      /* And again for the `_setjmp' function.  */
+#ifndef _setjmp
+      extern int _setjmp (jmp_buf);
+#endif
+      last_value = -1;
+      lose = 0;
+
+      value = _setjmp (env);
+      if (value != last_value + 1)
+	{
+	  fputs("Shouldn't have ", stdout);
+	  lose = 1;
+	}
+      last_value = value;
+      switch (value)
+	{
+	case 0:
+	  puts("Saved environment.");
+	  jump (0);
+	default:
+	  printf ("Jumped to %d.\n", value);
+	  if (value < 10)
+	    jump (value + 1);
+	}
+    }
+
+  if (lose || value != 10)
+    puts ("Test FAILED!");
+  else
+    puts ("Test succeeded!");
+
+  return lose ? EXIT_FAILURE : EXIT_SUCCESS;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/setjmp/tst-sigsetjmp.c b/ap/libc/glibc/glibc-2.23/setjmp/tst-sigsetjmp.c
new file mode 100644
index 0000000..bea05b5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/setjmp/tst-sigsetjmp.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 2013-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* Test case for BZ #15493 */
+
+#include <stdlib.h>
+#include <signal.h>
+#include <setjmp.h>
+
+static int
+do_test (void)
+{
+  sigjmp_buf sj;
+  sigset_t m;
+
+  sigemptyset (&m);
+  sigprocmask (SIG_SETMASK, &m, NULL);
+  if (sigsetjmp (sj, 0) == 0)
+    {
+      sigaddset (&m, SIGUSR1);
+      sigprocmask (SIG_SETMASK, &m, NULL);
+      siglongjmp (sj, 1);
+      return EXIT_FAILURE;
+    }
+  sigprocmask (SIG_SETMASK, NULL, &m);
+  return sigismember (&m, SIGUSR1) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
