diff --git a/ap/libc/glibc/glibc-2.23/signal/Makefile b/ap/libc/glibc/glibc-2.23/signal/Makefile
new file mode 100644
index 0000000..9d29ff4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/Makefile
@@ -0,0 +1,50 @@
+# 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 signal routines.
+#
+subdir	:= signal
+
+include ../Makeconfig
+
+headers	:= signal.h sys/signal.h bits/signum.h bits/sigcontext.h \
+	   bits/sigaction.h bits/sigset.h bits/siginfo.h bits/sigstack.h \
+	   bits/sigthread.h
+
+routines	:= signal raise killpg \
+		   sigaction sigprocmask kill \
+		   sigpending sigsuspend sigwait \
+		   sigblock sigsetmask sigpause sigvec \
+		   sigstack sigaltstack sigintr \
+		   sigsetops sigempty sigfillset sigaddset sigdelset sigismem \
+		   sigreturn \
+		   siggetmask sysv_signal \
+		   sigisempty sigandset sigorset \
+		   allocrtsig sigtimedwait sigwaitinfo sigqueue \
+		   sighold sigrelse sigignore sigset
+
+tests		:= tst-signal tst-sigset tst-sigsimple tst-raise tst-sigset2
+
+
+include ../Rules
+
+CFLAGS-sigpause.c = -fexceptions
+CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-sigtimedwait.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-sigwaitinfo.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/ap/libc/glibc/glibc-2.23/signal/Versions b/ap/libc/glibc/glibc-2.23/signal/Versions
new file mode 100644
index 0000000..4d86930
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/Versions
@@ -0,0 +1,54 @@
+libc {
+  GLIBC_2.0 {
+    # functions with special/multiple interfaces
+    __sigaddset; __sigdelset; __sigismember; __sysv_signal;
+
+    # functions used in inline functions or macros
+    __sigpause;
+
+    # functions used in other libraries
+     __sigaction;
+
+    # b*
+    bsd_signal;
+
+    # g*
+    gsignal;
+
+    # k*
+    kill; killpg;
+
+    # p*
+    psignal;
+
+    # r*
+    raise;
+
+    # s*
+    sigaction; sigaddset; sigaltstack; sigandset; sigblock; sigdelset;
+    sigemptyset; sigfillset; siggetmask; siginterrupt; sigisemptyset;
+    sigismember; siglongjmp; signal; sigorset; sigpause; sigpending;
+    sigprocmask; sigreturn; sigsetmask; sigstack; sigsuspend; sigvec;
+    sigwait; ssignal;
+  }
+  GLIBC_2.1 {
+    # helper functions
+    __libc_current_sigrtmin; __libc_current_sigrtmax; __libc_allocate_rtsig;
+
+    # s*
+    sighold; sigrelse; sigignore; sigset; sysv_signal;
+
+    # New RT signal functions.
+    sigqueue; sigtimedwait; sigwaitinfo;
+  }
+  GLIBC_2.1.3 {
+    # LinuxThreads needs this entry point.
+    __sigsuspend;
+  }
+  GLIBC_2.2 {
+    # Needed to provide a pointer to the XPG sigpause function.
+    __xpg_sigpause;
+  }
+  GLIBC_2.21 {
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/allocrtsig.c b/ap/libc/glibc/glibc-2.23/signal/allocrtsig.c
new file mode 100644
index 0000000..463e5e3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/allocrtsig.c
@@ -0,0 +1,78 @@
+/* Handle real-time signal allocation.  Generic version.
+   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 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/>.  */
+
+#include <signal.h>
+
+/* Another sysdeps file can #define this and then #include this file.  */
+#ifndef RESERVED_SIGRT
+# define RESERVED_SIGRT 0
+#endif
+
+/* In these variables we keep track of the used variables.  If the
+   platform does not support any real-time signals we will define the
+   values to some unreasonable value which will signal failing of all
+   the functions below.  */
+#ifdef __SIGRTMIN
+static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT;
+static int current_rtmax = __SIGRTMAX;
+#endif
+
+/* Return number of available real-time signal with highest priority.  */
+int
+__libc_current_sigrtmin (void)
+{
+#ifdef __SIGRTMIN
+  return current_rtmin;
+#else
+  return -1;
+#endif
+}
+libc_hidden_def (__libc_current_sigrtmin)
+strong_alias (__libc_current_sigrtmin, __libc_current_sigrtmin_private)
+
+/* Return number of available real-time signal with lowest priority.  */
+int
+__libc_current_sigrtmax (void)
+{
+#ifdef __SIGRTMIN
+  return current_rtmax;
+#else
+  return -1;
+#endif
+}
+libc_hidden_def (__libc_current_sigrtmax)
+strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private)
+
+/* Allocate real-time signal with highest/lowest available
+   priority.  Please note that we don't use a lock since we assume
+   this function to be called at program start.  */
+int
+__libc_allocate_rtsig (int high)
+{
+#ifndef __SIGRTMIN
+  return -1;
+#else
+  if (current_rtmin == -1 || current_rtmin > current_rtmax)
+    /* We don't have any more signals available.  */
+    return -1;
+
+  return high ? current_rtmin++ : current_rtmax--;
+#endif
+}
+strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private)
diff --git a/ap/libc/glibc/glibc-2.23/signal/kill.c b/ap/libc/glibc/glibc-2.23/signal/kill.c
new file mode 100644
index 0000000..b1dabb7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/kill.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <signal.h>
+
+
+/* Send signal SIG to process number PID.  If PID is zero,
+   send SIG to all processes in the current process's process group.
+   If PID is < -1, send SIG to all processes in process group - PID.  */
+int
+__kill (int pid, int sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (kill)
+
+weak_alias (__kill, kill)
diff --git a/ap/libc/glibc/glibc-2.23/signal/killpg.c b/ap/libc/glibc/glibc-2.23/signal/killpg.c
new file mode 100644
index 0000000..1a70031
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/killpg.c
@@ -0,0 +1,32 @@
+/* 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 <signal.h>
+
+
+/* Send SIG to all processes in process group PGRP.
+   If PGRP is zero, send SIG to all processes in
+   the current process's process group.  */
+int
+killpg (__pid_t pgrp, int sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (killpg)
diff --git a/ap/libc/glibc/glibc-2.23/signal/raise.c b/ap/libc/glibc/glibc-2.23/signal/raise.c
new file mode 100644
index 0000000..13194f2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/raise.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <signal.h>
+#include <errno.h>
+
+/* Raise the signal SIG.  */
+int
+raise (int sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (raise, gsignal)
+
+stub_warning (raise)
+stub_warning (gsignal)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigaction.c b/ap/libc/glibc/glibc-2.23/signal/sigaction.c
new file mode 100644
index 0000000..b45e342
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigaction.c
@@ -0,0 +1,39 @@
+/* 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 <signal.h>
+
+
+/* If ACT is not NULL, change the action for SIG to *ACT.
+   If OACT is not NULL, put the old action for SIG in *OACT.  */
+int
+__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
+{
+  if (sig <= 0 || sig >= NSIG)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__sigaction)
+stub_warning (sigaction)
+
+weak_alias (__sigaction, sigaction)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigaddset.c b/ap/libc/glibc/glibc-2.23/signal/sigaddset.c
new file mode 100644
index 0000000..2020cb4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigaddset.c
@@ -0,0 +1,32 @@
+/* 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 "sigsetops.h"
+
+/* Add SIGNO to SET.  */
+int
+sigaddset (sigset_t *set, int signo)
+{
+  if (set == NULL || signo <= 0 || signo >= NSIG)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __sigaddset (set, signo);
+}
+libc_hidden_def (sigaddset)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigaltstack.c b/ap/libc/glibc/glibc-2.23/signal/sigaltstack.c
new file mode 100644
index 0000000..34e3545
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigaltstack.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <signal.h>
+
+/* Run signals handlers on the stack specified by SS (if not NULL).
+   If OSS is not NULL, it is filled in with the old signal stack status.  */
+int
+sigaltstack (const struct sigaltstack *ss, struct sigaltstack *oss)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (sigaltstack)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigandset.c b/ap/libc/glibc/glibc-2.23/signal/sigandset.c
new file mode 100644
index 0000000..e6a188f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigandset.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 <signal.h>
+#define __need_NULL
+#include <stddef.h>
+
+/* Combine sets LEFT and RIGHT by logical AND and place result in DEST.  */
+int
+sigandset (sigset_t *dest, const sigset_t *left, const sigset_t *right)
+{
+  if (dest == NULL || left == NULL || right == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __sigandset (dest, left, right);
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigblock.c b/ap/libc/glibc/glibc-2.23/signal/sigblock.c
new file mode 100644
index 0000000..f10b15b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigblock.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <signal.h>
+
+/* Block signals in MASK, returning the old mask.  */
+int
+__sigblock (int mask)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (sigblock)
+
+weak_alias (__sigblock, sigblock)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigdelset.c b/ap/libc/glibc/glibc-2.23/signal/sigdelset.c
new file mode 100644
index 0000000..e60e166
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigdelset.c
@@ -0,0 +1,32 @@
+/* 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 "sigsetops.h"
+
+/* Add SIGNO to SET.  */
+int
+sigdelset (sigset_t *set, int signo)
+{
+  if (set == NULL || signo <= 0 || signo >= NSIG)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __sigdelset (set, signo);
+}
+libc_hidden_def (sigdelset)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigempty.c b/ap/libc/glibc/glibc-2.23/signal/sigempty.c
new file mode 100644
index 0000000..2c96de9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigempty.c
@@ -0,0 +1,36 @@
+/* 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 <signal.h>
+#include <string.h>
+
+/* Clear all signals from SET.  */
+int
+sigemptyset (sigset_t *set)
+{
+  if (set == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  memset (set, 0, sizeof (sigset_t));
+
+  return 0;
+}
+libc_hidden_def (sigemptyset)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigfillset.c b/ap/libc/glibc/glibc-2.23/signal/sigfillset.c
new file mode 100644
index 0000000..8ab9ec3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigfillset.c
@@ -0,0 +1,45 @@
+/* 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 <signal.h>
+#include <string.h>
+
+/* Set all signals in SET.  */
+int
+sigfillset (sigset_t *set)
+{
+  if (set == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  memset (set, 0xff, sizeof (sigset_t));
+
+  /* If the implementation uses a cancellation signal don't set the bit.  */
+#ifdef SIGCANCEL
+  __sigdelset (set, SIGCANCEL);
+#endif
+  /* Likewise for the signal to implement setxid.  */
+#ifdef SIGSETXID
+  __sigdelset (set, SIGSETXID);
+#endif
+
+  return 0;
+}
+libc_hidden_def (sigfillset)
diff --git a/ap/libc/glibc/glibc-2.23/signal/siggetmask.c b/ap/libc/glibc/glibc-2.23/signal/siggetmask.c
new file mode 100644
index 0000000..0deb339
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/siggetmask.c
@@ -0,0 +1,28 @@
+/* siggetmask -- useless alias for `sigblock (0)' for old Linux compatibility.
+   Copyright (C) 1996-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 <signal.h>
+
+int
+siggetmask (void)
+{
+  return __sigblock (0);
+}
+
+link_warning (siggetmask,
+	      "warning: `siggetmask' is obsolete; `sigprocmask' is best")
diff --git a/ap/libc/glibc/glibc-2.23/signal/sighold.c b/ap/libc/glibc/glibc-2.23/signal/sighold.c
new file mode 100644
index 0000000..d1f9f64
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sighold.c
@@ -0,0 +1,39 @@
+/* Add SIG to the calling process' signal mask.
+   Copyright (C) 1998-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define __need_NULL
+#include <stddef.h>
+#include <signal.h>
+
+int
+sighold (int sig)
+{
+  sigset_t set;
+
+  /* Retrieve current signal set.  */
+  if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0)
+    return -1;
+
+  /* Add the specified signal.  */
+  if (sigaddset (&set, sig) < 0)
+    return -1;
+
+  /* Set the new mask.  */
+  return __sigprocmask (SIG_SETMASK, &set, NULL);
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigignore.c b/ap/libc/glibc/glibc-2.23/signal/sigignore.c
new file mode 100644
index 0000000..c695fe5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigignore.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1998-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 <signal.h>
+
+
+/* Set the disposition for SIG to SIG_IGN.  */
+int
+sigignore (int sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (sigignore)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigintr.c b/ap/libc/glibc/glibc-2.23/signal/sigintr.c
new file mode 100644
index 0000000..002ea9f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigintr.c
@@ -0,0 +1,31 @@
+/* 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 <errno.h>
+#include <signal.h>
+
+/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
+   (causing them to fail with EINTR); if INTERRUPT is zero, make system
+   calls be restarted after signal SIG.  */
+int
+siginterrupt (int sig, int interrupt)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (siginterrupt)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigisempty.c b/ap/libc/glibc/glibc-2.23/signal/sigisempty.c
new file mode 100644
index 0000000..ec35deb
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigisempty.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 <signal.h>
+#define __need_NULL
+#include <stddef.h>
+
+/* Test whether SET is empty.  */
+int
+sigisemptyset (const sigset_t *set)
+{
+  if (set == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+    return __sigisemptyset (set);
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigismem.c b/ap/libc/glibc/glibc-2.23/signal/sigismem.c
new file mode 100644
index 0000000..ead8a05
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigismem.c
@@ -0,0 +1,32 @@
+/* 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 "sigsetops.h"
+
+/* Return 1 if SIGNO is in SET, 0 if not.  */
+int
+sigismember (const sigset_t *set, int signo)
+{
+  if (set == NULL || signo <= 0 || signo >= NSIG)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __sigismember (set, signo);
+}
+libc_hidden_def (sigismember)
diff --git a/ap/libc/glibc/glibc-2.23/signal/signal.c b/ap/libc/glibc/glibc-2.23/signal/signal.c
new file mode 100644
index 0000000..731d42c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/signal.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 <signal.h>
+
+
+/* Set the handler for the signal SIG to HANDLER,
+   returning the old handler, or SIG_ERR on error.  */
+__sighandler_t
+signal (int sig, __sighandler_t handler)
+{
+  __set_errno (ENOSYS);
+  return SIG_ERR;
+}
+
+weak_alias (signal, ssignal)
+
+stub_warning (signal)
+stub_warning (ssignal)
diff --git a/ap/libc/glibc/glibc-2.23/signal/signal.h b/ap/libc/glibc/glibc-2.23/signal/signal.h
new file mode 100644
index 0000000..47e995a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/signal.h
@@ -0,0 +1,377 @@
+/* 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.14 Signal handling <signal.h>
+ */
+
+#ifndef	_SIGNAL_H
+
+#if !defined __need_sig_atomic_t && !defined __need_sigset_t
+# define _SIGNAL_H
+#endif
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+#include <bits/sigset.h>		/* __sigset_t, __sig_atomic_t.  */
+
+/* An integral type that can be modified atomically, without the
+   possibility of a signal arriving in the middle of the operation.  */
+#if defined __need_sig_atomic_t || defined _SIGNAL_H
+# ifndef __sig_atomic_t_defined
+#  define __sig_atomic_t_defined
+__BEGIN_NAMESPACE_STD
+typedef __sig_atomic_t sig_atomic_t;
+__END_NAMESPACE_STD
+# endif
+# undef __need_sig_atomic_t
+#endif
+
+#if defined __need_sigset_t || (defined _SIGNAL_H && defined __USE_POSIX)
+# ifndef __sigset_t_defined
+#  define __sigset_t_defined
+typedef __sigset_t sigset_t;
+# endif
+# undef __need_sigset_t
+#endif
+
+#ifdef _SIGNAL_H
+
+#include <bits/types.h>
+#include <bits/signum.h>
+
+#if defined __USE_XOPEN || defined __USE_XOPEN2K
+# ifndef __pid_t_defined
+typedef __pid_t pid_t;
+#  define __pid_t_defined
+#endif
+#ifdef __USE_XOPEN
+# endif
+# ifndef __uid_t_defined
+typedef __uid_t uid_t;
+#  define __uid_t_defined
+# endif
+#endif	/* Unix98 */
+
+#ifdef __USE_POSIX199309
+/* We need `struct timespec' later on.  */
+# define __need_timespec
+# include <time.h>
+#endif
+
+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
+/* Get the `siginfo_t' type plus the needed symbols.  */
+# include <bits/siginfo.h>
+#endif
+
+
+/* Type of a signal handler.  */
+typedef void (*__sighandler_t) (int);
+
+/* The X/Open definition of `signal' specifies the SVID semantic.  Use
+   the additional function `sysv_signal' when X/Open compatibility is
+   requested.  */
+extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
+     __THROW;
+#ifdef __USE_GNU
+extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
+     __THROW;
+#endif
+
+/* Set the handler for the signal SIG to HANDLER, returning the old
+   handler, or SIG_ERR on error.
+   By default `signal' has the BSD semantic.  */
+__BEGIN_NAMESPACE_STD
+#ifdef __USE_MISC
+extern __sighandler_t signal (int __sig, __sighandler_t __handler)
+     __THROW;
+#else
+/* Make sure the used `signal' implementation is the SVID version. */
+# ifdef __REDIRECT_NTH
+extern __sighandler_t __REDIRECT_NTH (signal,
+				      (int __sig, __sighandler_t __handler),
+				      __sysv_signal);
+# else
+#  define signal __sysv_signal
+# endif
+#endif
+__END_NAMESPACE_STD
+
+#ifdef __USE_XOPEN
+/* The X/Open definition of `signal' conflicts with the BSD version.
+   So they defined another function `bsd_signal'.  */
+extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
+     __THROW;
+#endif
+
+/* Send signal SIG to process number PID.  If PID is zero,
+   send SIG to all processes in the current process's process group.
+   If PID is < -1, send SIG to all processes in process group - PID.  */
+#ifdef __USE_POSIX
+extern int kill (__pid_t __pid, int __sig) __THROW;
+#endif /* Use POSIX.  */
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+/* Send SIG to all processes in process group PGRP.
+   If PGRP is zero, send SIG to all processes in
+   the current process's process group.  */
+extern int killpg (__pid_t __pgrp, int __sig) __THROW;
+#endif /* Use misc || X/Open Unix.  */
+
+__BEGIN_NAMESPACE_STD
+/* Raise signal SIG, i.e., send SIG to yourself.  */
+extern int raise (int __sig) __THROW;
+__END_NAMESPACE_STD
+
+#ifdef __USE_MISC
+/* SVID names for the same things.  */
+extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
+     __THROW;
+extern int gsignal (int __sig) __THROW;
+#endif /* Use misc.  */
+
+#ifdef __USE_XOPEN2K8
+/* Print a message describing the meaning of the given signal number.  */
+extern void psignal (int __sig, const char *__s);
+
+/* Print a message describing the meaning of the given signal information.  */
+extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
+#endif /* POSIX 2008.  */
+
+
+
+/* The `sigpause' function in X/Open defines the argument as the
+   signal number.  This requires redirecting to another function
+   because the default version in glibc uses an old BSD interface.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+
+#ifdef __USE_XOPEN
+# ifdef __GNUC__
+extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
+# else
+extern int __sigpause (int __sig_or_mask, int __is_sig);
+/* Remove a signal from the signal mask and suspend the process.  */
+#  define sigpause(sig) __sigpause ((sig), 1)
+# endif
+#endif
+
+
+#ifdef __USE_MISC
+/* None of the following functions should be used anymore.  They are here
+   only for compatibility.  A single word (`int') is not guaranteed to be
+   enough to hold a complete signal mask and therefore these functions
+   simply do not work in many situations.  Use `sigprocmask' instead.  */
+
+/* Compute mask for signal SIG.  */
+# define sigmask(sig)	__sigmask(sig)
+
+/* Block signals in MASK, returning the old mask.  */
+extern int sigblock (int __mask) __THROW __attribute_deprecated__;
+
+/* Set the mask of blocked signals to MASK, returning the old mask.  */
+extern int sigsetmask (int __mask) __THROW __attribute_deprecated__;
+
+/* Return currently selected signal mask.  */
+extern int siggetmask (void) __THROW __attribute_deprecated__;
+#endif /* Use misc.  */
+
+
+#ifdef __USE_MISC
+# define NSIG	_NSIG
+#endif
+
+#ifdef __USE_GNU
+typedef __sighandler_t sighandler_t;
+#endif
+
+/* 4.4 BSD uses the name `sig_t' for this.  */
+#ifdef __USE_MISC
+typedef __sighandler_t sig_t;
+#endif
+
+#ifdef __USE_POSIX
+
+/* Clear all signals from SET.  */
+extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
+
+/* Set all signals in SET.  */
+extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
+
+/* Add SIGNO to SET.  */
+extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
+
+/* Remove SIGNO from SET.  */
+extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
+
+/* Return 1 if SIGNO is in SET, 0 if not.  */
+extern int sigismember (const sigset_t *__set, int __signo)
+     __THROW __nonnull ((1));
+
+# ifdef __USE_GNU
+/* Return non-empty value is SET is not empty.  */
+extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1));
+
+/* Build new signal set by combining the two inputs set using logical AND.  */
+extern int sigandset (sigset_t *__set, const sigset_t *__left,
+		      const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
+
+/* Build new signal set by combining the two inputs set using logical OR.  */
+extern int sigorset (sigset_t *__set, const sigset_t *__left,
+		     const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
+# endif /* GNU */
+
+/* Get the system-specific definitions of `struct sigaction'
+   and the `SA_*' and `SIG_*'. constants.  */
+# include <bits/sigaction.h>
+
+/* Get and/or change the set of blocked signals.  */
+extern int sigprocmask (int __how, const sigset_t *__restrict __set,
+			sigset_t *__restrict __oset) __THROW;
+
+/* Change the set of blocked signals to SET,
+   wait until a signal arrives, and restore the set of blocked signals.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int sigsuspend (const sigset_t *__set) __nonnull ((1));
+
+/* Get and/or set the action for signal SIG.  */
+extern int sigaction (int __sig, const struct sigaction *__restrict __act,
+		      struct sigaction *__restrict __oact) __THROW;
+
+/* Put in SET all signals that are blocked and waiting to be delivered.  */
+extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
+
+
+/* Select any of pending signals from SET or wait for any to arrive.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
+     __nonnull ((1, 2));
+
+# ifdef __USE_POSIX199309
+/* Select any of pending signals from SET and place information in INFO.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int sigwaitinfo (const sigset_t *__restrict __set,
+			siginfo_t *__restrict __info) __nonnull ((1));
+
+/* Select any of pending signals from SET and place information in INFO.
+   Wait the time specified by TIMEOUT if no signal is pending.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int sigtimedwait (const sigset_t *__restrict __set,
+			 siginfo_t *__restrict __info,
+			 const struct timespec *__restrict __timeout)
+     __nonnull ((1));
+
+/* Send signal SIG to the process PID.  Associate data in VAL with the
+   signal.  */
+extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
+     __THROW;
+# endif	/* Use POSIX 199306.  */
+
+#endif /* Use POSIX.  */
+
+#ifdef __USE_MISC
+
+/* Names of the signals.  This variable exists only for compatibility.
+   Use `strsignal' instead (see <string.h>).  */
+extern const char *const _sys_siglist[_NSIG];
+extern const char *const sys_siglist[_NSIG];
+
+
+/* Get machine-dependent `struct sigcontext' and signal subcodes.  */
+# include <bits/sigcontext.h>
+
+/* Restore the state saved in SCP.  */
+extern int sigreturn (struct sigcontext *__scp) __THROW;
+
+#endif /* Use misc.  */
+
+
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+# define __need_size_t
+# include <stddef.h>
+
+/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
+   (causing them to fail with EINTR); if INTERRUPT is zero, make system
+   calls be restarted after signal SIG.  */
+extern int siginterrupt (int __sig, int __interrupt) __THROW;
+
+# include <bits/sigstack.h>
+# if defined __USE_XOPEN || defined __USE_XOPEN2K8
+/* This will define `ucontext_t' and `mcontext_t'.  */
+#  include <sys/ucontext.h>
+# endif
+
+/* Run signals handlers on the stack specified by SS (if not NULL).
+   If OSS is not NULL, it is filled in with the old signal stack status.
+   This interface is obsolete and on many platform not implemented.  */
+extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
+     __THROW __attribute_deprecated__;
+
+/* Alternate signal handler stack interface.
+   This interface should always be preferred over `sigstack'.  */
+extern int sigaltstack (const struct sigaltstack *__restrict __ss,
+			struct sigaltstack *__restrict __oss) __THROW;
+
+#endif /* Use POSIX.1-2008 or X/Open Unix.  */
+
+#ifdef __USE_XOPEN_EXTENDED
+/* Simplified interface for signal management.  */
+
+/* Add SIG to the calling process' signal mask.  */
+extern int sighold (int __sig) __THROW;
+
+/* Remove SIG from the calling process' signal mask.  */
+extern int sigrelse (int __sig) __THROW;
+
+/* Set the disposition of SIG to SIG_IGN.  */
+extern int sigignore (int __sig) __THROW;
+
+/* Set the disposition of SIG.  */
+extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
+#endif
+
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
+/* Some of the functions for handling signals in threaded programs must
+   be defined here.  */
+# include <bits/pthreadtypes.h>
+# include <bits/sigthread.h>
+#endif /* use Unix98 */
+
+/* The following functions are used internally in the C library and in
+   other code which need deep insights.  */
+
+/* Return number of available real-time signal with highest priority.  */
+extern int __libc_current_sigrtmin (void) __THROW;
+/* Return number of available real-time signal with lowest priority.  */
+extern int __libc_current_sigrtmax (void) __THROW;
+
+#endif /* signal.h  */
+
+__END_DECLS
+
+#endif /* not signal.h */
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigorset.c b/ap/libc/glibc/glibc-2.23/signal/sigorset.c
new file mode 100644
index 0000000..13573d7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigorset.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 <signal.h>
+#define __need_NULL
+#include <stddef.h>
+
+/* Combine sets LEFT and RIGHT by logical OR and place result in DEST.  */
+int
+sigorset (sigset_t *dest, const sigset_t *left, const sigset_t *right)
+{
+  if (dest == NULL || left == NULL || right == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  return __sigorset (dest, left, right);
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigpause.c b/ap/libc/glibc/glibc-2.23/signal/sigpause.c
new file mode 100644
index 0000000..c572ef0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigpause.c
@@ -0,0 +1,49 @@
+/* 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/>.  */
+
+#define sigpause __rename_sigpause
+#include <errno.h>
+#include <signal.h>
+#undef sigpause
+
+int
+__sigpause (int sig_or_mask, int is_sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (__sigpause)
+libc_hidden_def (__sigpause)
+
+int
+__attribute__ ((weak))
+__default_sigpause (int mask)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__default_sigpause, sigpause)
+stub_warning (sigpause)
+
+
+int
+__attribute ((weak))
+__xpg___sigpause (int sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigpending.c b/ap/libc/glibc/glibc-2.23/signal/sigpending.c
new file mode 100644
index 0000000..12e0fae
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigpending.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <stddef.h>
+#include <signal.h>
+
+
+/* Store in SET all signals that are blocked and pending.  */
+int
+sigpending (sigset_t *set)
+{
+  if (set == NULL)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (sigpending)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigprocmask.c b/ap/libc/glibc/glibc-2.23/signal/sigprocmask.c
new file mode 100644
index 0000000..2ec2386
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigprocmask.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 <errno.h>
+#include <signal.h>
+
+
+/* If SET is not NULL, modify the current set of blocked signals
+   according to HOW, which may be SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK.
+   If OSET is not NULL, store the old set of blocked signals in *OSET.  */
+int
+__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
+{
+  switch (how)
+    {
+    case SIG_BLOCK:
+    case SIG_UNBLOCK:
+    case SIG_SETMASK:
+      break;
+    default:
+      __set_errno (EINVAL);
+      return -1;
+    }
+
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+/* No stub warning because abort calls __sigprocmask,
+   and we don't want warnings for every use of abort on
+   a system without safe signals.  */
+
+weak_alias (__sigprocmask, sigprocmask)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigqueue.c b/ap/libc/glibc/glibc-2.23/signal/sigqueue.c
new file mode 100644
index 0000000..9fe02a7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigqueue.c
@@ -0,0 +1,31 @@
+/* Implementation of sigqueue function from POSIX.1b.
+   Copyright (C) 1997-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 <signal.h>
+#include <sys/types.h>
+
+int
+__sigqueue (pid_t pid, int sig, const union sigval val)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__sigqueue, sigqueue)
+
+stub_warning (sigqueue)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigrelse.c b/ap/libc/glibc/glibc-2.23/signal/sigrelse.c
new file mode 100644
index 0000000..5dcba53
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigrelse.c
@@ -0,0 +1,39 @@
+/* Remove SIG from the calling process' signal mask.
+   Copyright (C) 1998-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define __need_NULL
+#include <stddef.h>
+#include <signal.h>
+
+int
+sigrelse (int sig)
+{
+  sigset_t set;
+
+  /* Retrieve current signal set.  */
+  if (__sigprocmask (SIG_SETMASK, NULL, &set) < 0)
+    return -1;
+
+  /* Remove the specified signal.  */
+  if (sigdelset (&set, sig) < 0)
+    return -1;
+
+  /* Set the new mask.  */
+  return __sigprocmask (SIG_SETMASK, &set, NULL);
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigreturn.c b/ap/libc/glibc/glibc-2.23/signal/sigreturn.c
new file mode 100644
index 0000000..a0797c6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigreturn.c
@@ -0,0 +1,29 @@
+/* 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 <signal.h>
+#include <errno.h>
+
+int
+__sigreturn (struct sigcontext *context)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (sigreturn)
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigset.c b/ap/libc/glibc/glibc-2.23/signal/sigset.c
new file mode 100644
index 0000000..f475772
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigset.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1998-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 <signal.h>
+
+
+/* Set the disposition for SIG.  */
+__sighandler_t
+sigset (int sig, __sighandler_t disp)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (sigset)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigsetmask.c b/ap/libc/glibc/glibc-2.23/signal/sigsetmask.c
new file mode 100644
index 0000000..504359c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigsetmask.c
@@ -0,0 +1,29 @@
+/* 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 <signal.h>
+
+int
+__sigsetmask (int mask)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (sigsetmask)
+
+weak_alias (__sigsetmask, sigsetmask)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigsetops.c b/ap/libc/glibc/glibc-2.23/signal/sigsetops.c
new file mode 100644
index 0000000..0317662
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigsetops.c
@@ -0,0 +1,11 @@
+/* Define the real-function versions of all inline functions
+   defined in signal.h (or bits/sigset.h).  */
+
+#include <features.h>
+
+#define _EXTERN_INLINE
+#ifndef __USE_EXTERN_INLINES
+# define __USE_EXTERN_INLINES	1
+#endif
+
+#include "signal.h"
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigsetops.h b/ap/libc/glibc/glibc-2.23/signal/sigsetops.h
new file mode 100644
index 0000000..b6e8ddd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigsetops.h
@@ -0,0 +1,32 @@
+/* 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/>.  */
+
+/* Definitions relevant to functions that operate on `sigset_t's.  */
+
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+
+#define	BITS		(_NSIG - 1)
+#define	ELT(signo)	(((signo) - 1) / BITS)
+#define	MASK(signo)	(1 << (((signo) - 1) % BITS))
+
+#undef	sigemptyset
+#undef	sigfillset
+#undef	sigaddset
+#undef	sigdelset
+#undef	sigismember
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigstack.c b/ap/libc/glibc/glibc-2.23/signal/sigstack.c
new file mode 100644
index 0000000..b3b7dce
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigstack.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <signal.h>
+
+/* Run signals handlers on the stack specified by SS (if not NULL).
+   If OSS is not NULL, it is filled in with the old signal stack status.  */
+int
+sigstack (struct sigstack *ss, struct sigstack *oss)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (sigstack)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigsuspend.c b/ap/libc/glibc/glibc-2.23/signal/sigsuspend.c
new file mode 100644
index 0000000..8e2cda5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigsuspend.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 <signal.h>
+
+
+/* Change the set of blocked signals to SET,
+   wait until a signal arrives, and restore the set of blocked signals.  */
+int
+__sigsuspend (const sigset_t *set)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__sigsuspend)
+weak_alias (__sigsuspend, sigsuspend)
+
+stub_warning (sigsuspend)
+stub_warning (__sigsuspend)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigtimedwait.c b/ap/libc/glibc/glibc-2.23/signal/sigtimedwait.c
new file mode 100644
index 0000000..90e4244
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigtimedwait.c
@@ -0,0 +1,32 @@
+/* Implementation of sigtimedwait function from POSIX.1b.
+   Copyright (C) 1997-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 <signal.h>
+
+int
+__sigtimedwait (const sigset_t *set, siginfo_t *info,
+		const struct timespec *timeout)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__sigtimedwait)
+weak_alias (__sigtimedwait, sigtimedwait)
+
+stub_warning (sigtimedwait)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigvec.c b/ap/libc/glibc/glibc-2.23/signal/sigvec.c
new file mode 100644
index 0000000..1c73fb6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigvec.c
@@ -0,0 +1,202 @@
+/* ABI compatibility for obsolete sigvec function from 4.2BSD.
+   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 <shlib-compat.h>
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_21)
+
+# include <signal.h>
+# include <errno.h>
+# include <stddef.h>
+
+
+/* These are the struct sigvec and SV_* bit definitions that
+   used to be in <signal.h>.  The whole interface now exists
+   solely for ABI compatibility, so it can just be here.  */
+struct sigvec
+  {
+    __sighandler_t sv_handler;	/* Signal handler.  */
+    int sv_mask;		/* Mask of signals to be blocked.  */
+
+    int sv_flags;		/* Flags (see below).  */
+  };
+# define SV_ONSTACK	(1 << 0)/* Take the signal on the signal stack.  */
+# define SV_INTERRUPT	(1 << 1)/* Do not restart system calls.  */
+# define SV_RESETHAND	(1 << 2)/* Reset handler to SIG_DFL on receipt.  */
+
+
+/* Include macros to convert between `sigset_t' and old-style mask. */
+# include <sigset-cvt-mask.h>
+
+# ifndef SA_RESETHAND
+/* When sigaction lacks the extension bit for it,
+   we use a wrapper handler to support SV_RESETHAND.  */
+struct sigvec_wrapper_data
+{
+  __sighandler_t sw_handler;
+  unsigned int sw_mask;
+};
+
+static void sigvec_wrapper_handler (int sig) __THROW;
+
+static struct sigvec_wrapper_data sigvec_wrapper_data[NSIG];
+# endif
+
+
+/* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member
+   of VEC.  The signals in `sv_mask' will be blocked while the handler runs.
+   If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
+   reset to SIG_DFL before `sv_handler' is entered.  If OVEC is non-NULL,
+   it is filled in with the old information for SIG.  */
+int
+__sigvec (int sig,
+          const struct sigvec *vec,
+          struct sigvec *ovec)
+{
+  struct sigaction old;
+
+# ifndef SA_RESETHAND
+  if (vec == NULL || !(vec->sv_flags & SV_RESETHAND))
+# endif
+    {
+      struct sigaction new, *n;
+
+      if (vec == NULL)
+	n = NULL;
+      else
+	{
+	  __sighandler_t handler;
+	  unsigned int mask;
+	  unsigned int sv_flags;
+	  unsigned int sa_flags;
+
+	  handler = vec->sv_handler;
+	  mask = vec->sv_mask;
+	  sv_flags = vec->sv_flags;
+	  sa_flags = 0;
+	  if (sv_flags & SV_ONSTACK)
+	    {
+# ifdef SA_ONSTACK
+	      sa_flags |= SA_ONSTACK;
+# else
+	      __set_errno (ENOSYS);
+	      return -1;
+# endif
+	    }
+# ifdef SA_RESTART
+	  if (!(sv_flags & SV_INTERRUPT))
+	    sa_flags |= SA_RESTART;
+# endif
+# ifdef SA_RESETHAND
+	  if (sv_flags & SV_RESETHAND)
+	    sa_flags |= SA_RESETHAND;
+# endif
+	  n = &new;
+	  new.sa_handler = handler;
+	  if (sigset_set_old_mask (&new.sa_mask, mask) < 0)
+	    return -1;
+	  new.sa_flags = sa_flags;
+	}
+
+      if (__sigaction (sig, n, &old) < 0)
+	return -1;
+    }
+# ifndef SA_RESETHAND
+  else
+    {
+      __sighandler_t handler;
+      unsigned int mask;
+      struct sigvec_wrapper_data *data;
+      struct sigaction wrapper;
+
+      handler = vec->sv_handler;
+      mask = (unsigned int)vec->sv_mask;
+      data = &sigvec_wrapper_data[sig];
+      wrapper.sa_handler = sigvec_wrapper_handler;
+      /* FIXME: should we set wrapper.sa_mask, wrapper.sa_flags??  */
+      data->sw_handler = handler;
+      data->sw_mask = mask;
+
+      if (__sigaction (sig, &wrapper, &old) < 0)
+	return -1;
+    }
+# endif
+
+  if (ovec != NULL)
+    {
+      __sighandler_t handler;
+      unsigned int sv_flags;
+      unsigned int sa_flags;
+      unsigned int mask;
+
+      handler = old.sa_handler;
+      sv_flags = 0;
+      sa_flags = old.sa_flags;
+# ifndef SA_RESETHAND
+      if (handler == sigvec_wrapper_handler)
+	{
+	  handler = sigvec_wrapper_data[sig].sw_handler;
+	  /* should we use data->sw_mask?? */
+	  sv_flags |= SV_RESETHAND;
+	}
+# else
+     if (sa_flags & SA_RESETHAND)
+	sv_flags |= SV_RESETHAND;
+# endif
+      mask = sigset_get_old_mask (&old.sa_mask);
+# ifdef SA_ONSTACK
+     if (sa_flags & SA_ONSTACK)
+	sv_flags |= SV_ONSTACK;
+# endif
+# ifdef SA_RESTART
+     if (!(sa_flags & SA_RESTART))
+# endif
+	sv_flags |= SV_INTERRUPT;
+      ovec->sv_handler = handler;
+      ovec->sv_mask = (int)mask;
+      ovec->sv_flags = (int)sv_flags;
+    }
+
+  return 0;
+}
+
+compat_symbol (libc, __sigvec, sigvec, GLIBC_2_0);
+
+# ifndef SA_RESETHAND
+static void
+sigvec_wrapper_handler (int sig)
+{
+  struct sigvec_wrapper_data *data;
+  struct sigaction act;
+  int save;
+  __sighandler_t handler;
+
+  data = &sigvec_wrapper_data[sig];
+  act.sa_handler = SIG_DFL;
+  act.sa_flags = 0;
+  sigset_set_old_mask (&act.sa_mask, data->sw_mask);
+  handler = data->sw_handler;
+  save = errno;
+  (void) __sigaction (sig, &act, (struct sigaction *) NULL);
+  __set_errno (save);
+
+  (*handler) (sig);
+}
+# endif  /* No SA_RESETHAND.  */
+
+#endif  /* SHLIB_COMPAT */
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigwait.c b/ap/libc/glibc/glibc-2.23/signal/sigwait.c
new file mode 100644
index 0000000..d87676b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigwait.c
@@ -0,0 +1,30 @@
+/* sigwait - implementation of sigwait function from POSIX.1c.
+   Copyright (C) 1996-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 <signal.h>
+
+int
+__sigwait (const sigset_t *set, int *sig)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__sigwait, sigwait)
+
+stub_warning (sigwait)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sigwaitinfo.c b/ap/libc/glibc/glibc-2.23/signal/sigwaitinfo.c
new file mode 100644
index 0000000..6c32f3e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sigwaitinfo.c
@@ -0,0 +1,31 @@
+/* Implementation of sigwaitinfo function from POSIX.1b.
+   Copyright (C) 1997-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 <signal.h>
+
+int
+__sigwaitinfo (const sigset_t *set, siginfo_t *info)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__sigwaitinfo)
+weak_alias (__sigwaitinfo, sigwaitinfo)
+
+stub_warning (sigwaitinfo)
diff --git a/ap/libc/glibc/glibc-2.23/signal/sys/signal.h b/ap/libc/glibc/glibc-2.23/signal/sys/signal.h
new file mode 100644
index 0000000..2e602da
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sys/signal.h
@@ -0,0 +1 @@
+#include <signal.h>
diff --git a/ap/libc/glibc/glibc-2.23/signal/sysv_signal.c b/ap/libc/glibc/glibc-2.23/signal/sysv_signal.c
new file mode 100644
index 0000000..3010c3e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/sysv_signal.c
@@ -0,0 +1,39 @@
+/* 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 <signal.h>
+
+/* Set the handler for the signal SIG to HANDLER,
+   returning the old handler, or SIG_ERR on error.  */
+__sighandler_t
+__sysv_signal (int sig, __sighandler_t handler)
+{
+  /* Check signal extents to protect __sigismember.  */
+  if (handler == SIG_ERR || sig < 1 || sig >= NSIG)
+    {
+      __set_errno (EINVAL);
+      return SIG_ERR;
+    }
+
+  __set_errno (ENOSYS);
+
+  return SIG_ERR;
+}
+weak_alias (__sysv_signal, sysv_signal)
+
+stub_warning (sysv_signal)
diff --git a/ap/libc/glibc/glibc-2.23/signal/tst-raise.c b/ap/libc/glibc/glibc-2.23/signal/tst-raise.c
new file mode 100644
index 0000000..889cc62
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/tst-raise.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+   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 <error.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+volatile int count;
+
+void
+sh (int sig)
+{
+  ++count;
+}
+
+int
+main (void)
+{
+  struct sigaction sa;
+  sa.sa_handler = sh;
+  sigemptyset (&sa.sa_mask);
+  sa.sa_flags = 0;
+  if (sigaction (SIGUSR1, &sa, NULL) < 0)
+    {
+      printf ("sigaction failed: %m\n");
+      exit (1);
+    }
+  if (raise (SIGUSR1) < 0)
+    {
+      printf ("first raise failed: %m\n");
+      exit (1);
+    }
+  if (raise (SIGUSR1) < 0)
+    {
+      printf ("second raise failed: %m\n");
+      exit (1);
+    }
+  if (count != 2)
+    {
+      printf ("signal handler not called 2 times\n");
+      exit (1);
+    }
+  exit (0);
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/tst-signal.c b/ap/libc/glibc/glibc-2.23/signal/tst-signal.c
new file mode 100644
index 0000000..6d31787
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/tst-signal.c
@@ -0,0 +1,44 @@
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int win = 0;
+
+static void
+handler (int sig)
+{
+  printf ("Received signal %d (%s).\n", sig, strsignal(sig));
+  win = 1;
+}
+
+int
+main (void)
+{
+  if (signal (SIGTERM, handler) == SIG_ERR)
+    {
+      perror ("signal: SIGTERM");
+      exit (EXIT_FAILURE);
+    }
+
+  puts ("Set handler.");
+
+  printf ("Sending myself signal %d.\n", SIGTERM);
+  fflush (stdout);
+
+  if (raise (SIGTERM) < 0)
+    {
+      perror ("raise: SIGTERM");
+      exit (EXIT_FAILURE);
+    }
+
+  if (!win)
+    {
+      puts ("Didn't get any signal.  Test FAILED!");
+      exit (EXIT_FAILURE);
+    }
+
+  puts ("Got a signal.  Test succeeded.");
+
+  return EXIT_SUCCESS;
+}
diff --git a/ap/libc/glibc/glibc-2.23/signal/tst-sigset.c b/ap/libc/glibc/glibc-2.23/signal/tst-sigset.c
new file mode 100644
index 0000000..d47adcc
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/tst-sigset.c
@@ -0,0 +1,43 @@
+/* Test sig*set functions.  */
+
+#include <signal.h>
+#include <stdio.h>
+
+#define TEST_FUNCTION do_test ()
+static int
+do_test (void)
+{
+  int result = 0;
+  int sig = -1;
+
+#define TRY(call)							      \
+  if (call)								      \
+    {									      \
+      printf ("%s (sig = %d): %m\n", #call, sig);			      \
+      result = 1;							      \
+    }									      \
+  else
+
+
+  sigset_t set;
+  TRY (sigemptyset (&set) != 0);
+
+#ifdef SIGRTMAX
+  int max_sig = SIGRTMAX;
+#else
+  int max_sig = NSIG - 1;
+#endif
+
+  for (sig = 1; sig <= max_sig; ++sig)
+    {
+      TRY (sigismember (&set, sig) != 0);
+      TRY (sigaddset (&set, sig) != 0);
+      TRY (sigismember (&set, sig) == 0);
+      TRY (sigdelset (&set, sig) != 0);
+      TRY (sigismember (&set, sig) != 0);
+    }
+
+  return result;
+}
+
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/signal/tst-sigset2.c b/ap/libc/glibc/glibc-2.23/signal/tst-sigset2.c
new file mode 100644
index 0000000..f653323
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/tst-sigset2.c
@@ -0,0 +1,184 @@
+/* sigset_SIG_HOLD_bug.c [BZ #1951] */
+#include <errno.h>
+#include <error.h>
+#include <inttypes.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#define TEST_SIG SIGINT
+
+
+/* Print mask of blocked signals for this process */
+static void
+printSigMask (const char *msg)
+{
+  sigset_t currMask;
+  int sig;
+  int cnt;
+
+  if (msg != NULL)
+    printf ("%s", msg);
+
+  if (sigprocmask (SIG_BLOCK, NULL, &currMask) == -1)
+    error (1, errno, "sigaction");
+
+  cnt = 0;
+  for (sig = 1; sig < NSIG; sig++)
+    {
+      if (sigismember (&currMask, sig))
+	{
+	  cnt++;
+	  printf ("\t\t%d (%s)\n", sig, strsignal (sig));
+        }
+    }
+
+  if (cnt == 0)
+    printf ("\t\t<empty signal set>\n");
+} /* printSigMask */
+
+static void
+handler (int sig)
+{
+  printf ("Caught signal %d\n", sig);
+  printSigMask ("Signal mask in handler\n");
+  printf ("Handler returning\n");
+  _exit (1);
+} /* handler */
+
+static void
+printDisposition (sighandler_t disp)
+{
+  if (disp == SIG_HOLD)
+    printf ("SIG_HOLD");
+  else if (disp == SIG_DFL)
+    printf ("SIG_DFL");
+  else if (disp == SIG_IGN)
+    printf ("SIG_IGN");
+  else
+    printf ("handled at %" PRIxPTR, (uintptr_t) disp);
+} /* printDisposition */
+
+static int
+returnTest1 (void)
+{
+  sighandler_t prev;
+
+  printf ("===== TEST 1 =====\n");
+  printf ("Blocking signal with sighold()\n");
+  if (sighold (TEST_SIG) == -1)
+    error (1, errno, "sighold");
+  printSigMask ("Signal mask after sighold()\n");
+
+  printf ("About to use sigset() to establish handler\n");
+  prev = sigset (TEST_SIG, handler);
+  if (prev == SIG_ERR)
+    error(1, errno, "sigset");
+
+  printf ("Previous disposition: ");
+  printDisposition (prev);
+  printf (" (should be SIG_HOLD)\n");
+  if (prev != SIG_HOLD)
+    {
+      printf("TEST FAILED!!!\n");
+      return 1;
+    }
+  return 0;
+} /* returnTest1 */
+
+static int
+returnTest2 (void)
+{
+  sighandler_t prev;
+
+  printf ("\n===== TEST 2 =====\n");
+
+  printf ("About to use sigset() to set SIG_HOLD\n");
+  prev = sigset (TEST_SIG, SIG_HOLD);
+  if (prev == SIG_ERR)
+    error (1, errno, "sigset");
+
+  printf ("Previous disposition: ");
+  printDisposition (prev);
+  printf (" (should be SIG_DFL)\n");
+  if (prev != SIG_DFL)
+    {
+      printf("TEST FAILED!!!\n");
+      return 1;
+    }
+  return 0;
+} /* returnTest2 */
+
+static int
+returnTest3 (void)
+{
+  sighandler_t prev;
+
+  printf ("\n===== TEST 3 =====\n");
+
+  printf ("About to use sigset() to set SIG_HOLD\n");
+  prev = sigset (TEST_SIG, SIG_HOLD);
+  if (prev == SIG_ERR)
+    error (1, errno, "sigset");
+
+  printf ("About to use sigset() to set SIG_HOLD (again)\n");
+  prev = sigset (TEST_SIG, SIG_HOLD);
+  if (prev == SIG_ERR)
+    error (1, errno, "sigset");
+
+  printf ("Previous disposition: ");
+  printDisposition (prev);
+  printf (" (should be SIG_HOLD)\n");
+  if (prev != SIG_HOLD)
+    {
+      printf("TEST FAILED!!!\n");
+      return 1;
+    }
+  return 0;
+} /* returnTest3 */
+
+int
+main (int argc, char *argv[])
+{
+  pid_t childPid;
+
+  childPid = fork();
+  if (childPid == -1)
+    error (1, errno, "fork");
+
+  if (childPid == 0)
+    exit (returnTest1 ());
+
+  int status;
+  if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
+    error (1, errno, "waitpid");
+  int result = !WIFEXITED (status) || WEXITSTATUS (status) != 0;
+
+  childPid = fork();
+  if (childPid == -1)
+    error (1, errno, "fork");
+
+  if (childPid == 0)
+    exit (returnTest2 ());
+
+  if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
+    error (1, errno, "waitpid");
+  result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0;
+
+  childPid = fork();
+  if (childPid == -1)
+    error (1, errno, "fork");
+
+  if (childPid == 0)
+    exit (returnTest3 ());
+
+  if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
+    error (1, errno, "waitpid");
+  result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0;
+
+  return result;
+} /* main */
diff --git a/ap/libc/glibc/glibc-2.23/signal/tst-sigsimple.c b/ap/libc/glibc/glibc-2.23/signal/tst-sigsimple.c
new file mode 100644
index 0000000..ea65a5d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/signal/tst-sigsimple.c
@@ -0,0 +1,56 @@
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
+
+   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 <stdio.h>
+#include <string.h>
+
+
+static int
+do_test (void)
+{
+  int result = 0;
+  int e;
+
+#define RUN(test) \
+  errno = 0;								      \
+  e = test;								      \
+  if (e != -1)								      \
+    {									      \
+      printf ("%s returned %d\n", #test, e);				      \
+      result = 1;							      \
+    }									      \
+  else if (errno != EINVAL)						      \
+    {									      \
+      printf ("%s didn't set errno to EINVAL (%s instead)\n",		      \
+	      #test, strerror (errno));					      \
+      result = 1;							      \
+    }
+
+  RUN (sighold (-1));
+  RUN (sighold (_NSIG + 100));
+
+  RUN (sigrelse (-1));
+  RUN (sigrelse (_NSIG + 100));
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
