diff --git a/ap/libc/glibc/glibc-2.23/resource/Makefile b/ap/libc/glibc/glibc-2.23/resource/Makefile
new file mode 100644
index 0000000..3aaadfd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/Makefile
@@ -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/>.
+
+subdir := resource
+
+include ../Makeconfig
+
+headers	  := sys/resource.h bits/resource.h sys/vlimit.h sys/vtimes.h	\
+	     ulimit.h
+
+routines := getrlimit setrlimit getrlimit64 setrlimit64 getrusage ulimit      \
+	    vlimit vtimes getpriority setpriority nice
+
+tests = tst-getrlimit bug-ulimit1
+
+include ../Rules
diff --git a/ap/libc/glibc/glibc-2.23/resource/Versions b/ap/libc/glibc/glibc-2.23/resource/Versions
new file mode 100644
index 0000000..d6c2cce
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/Versions
@@ -0,0 +1,28 @@
+libc {
+  GLIBC_2.0 {
+    # g*
+    getpriority; getrlimit; getrusage;
+
+    # n*
+    nice;
+
+    # s*
+    setpriority; setrlimit;
+
+    # u*
+    ulimit;
+
+    # v*
+    vlimit; vtimes;
+  }
+  GLIBC_2.1 {
+    # g*
+    getrlimit64;
+
+    # s*
+    setrlimit64;
+  }
+  GLIBC_PRIVATE {
+    __getrlimit;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.23/resource/bug-ulimit1.c b/ap/libc/glibc/glibc-2.23/resource/bug-ulimit1.c
new file mode 100644
index 0000000..334d7ff
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/bug-ulimit1.c
@@ -0,0 +1,21 @@
+#include <ulimit.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+  int retval = 0;
+  long int res;
+
+  res = ulimit (UL_SETFSIZE, 10000);
+  printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res);
+  if (res != 10000)
+    retval = 1;
+
+  res = ulimit (UL_GETFSIZE);
+  printf ("Result of ulimit(UL_GETFSIZE): %ld\n", res);
+  if (res != 10000)
+    retval = 1;
+
+  return retval;
+}
diff --git a/ap/libc/glibc/glibc-2.23/resource/getpriority.c b/ap/libc/glibc/glibc-2.23/resource/getpriority.c
new file mode 100644
index 0000000..379fef9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/getpriority.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 <sys/resource.h>
+
+/* Return the highest priority of any process specified by WHICH and WHO
+   (see <sys/resource.h>); if WHO is zero, the current process, process group,
+   or user (as specified by WHO) is used.  A lower priority number means higher
+   priority.  Priorities range from PRIO_MIN to PRIO_MAX.  */
+int
+__getpriority (enum __priority_which which, id_t who)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__getpriority)
+weak_alias (__getpriority, getpriority)
+
+stub_warning (getpriority)
diff --git a/ap/libc/glibc/glibc-2.23/resource/getrlimit.c b/ap/libc/glibc/glibc-2.23/resource/getrlimit.c
new file mode 100644
index 0000000..4d3e058
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/getrlimit.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 <sys/resource.h>
+#include <sys/types.h>
+
+/* Put the soft and hard limits for RESOURCE in *RLIMITS.
+   Returns 0 if successful, -1 if not (and sets errno).  */
+int
+__getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__getrlimit)
+weak_alias (__getrlimit, getrlimit)
+
+stub_warning (getrlimit)
diff --git a/ap/libc/glibc/glibc-2.23/resource/getrlimit64.c b/ap/libc/glibc/glibc-2.23/resource/getrlimit64.c
new file mode 100644
index 0000000..769046b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/getrlimit64.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 <sys/resource.h>
+#include <sys/types.h>
+
+/* Put the soft and hard limits for RESOURCE in *RLIMITS.
+   Returns 0 if successful, -1 if not (and sets errno).  */
+int
+__getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
+{
+  struct rlimit rlimits32;
+
+  if (__getrlimit (resource, &rlimits32) < 0)
+    return -1;
+
+  if (rlimits32.rlim_cur == RLIM_INFINITY)
+    rlimits->rlim_cur = RLIM64_INFINITY;
+  else
+    rlimits->rlim_cur = rlimits32.rlim_cur;
+  if (rlimits32.rlim_max == RLIM_INFINITY)
+    rlimits->rlim_max = RLIM64_INFINITY;
+  else
+    rlimits->rlim_max = rlimits32.rlim_max;
+
+  return 0;
+}
+libc_hidden_def (__getrlimit64)
+weak_alias (__getrlimit64, getrlimit64)
+libc_hidden_weak (getrlimit64)
diff --git a/ap/libc/glibc/glibc-2.23/resource/getrusage.c b/ap/libc/glibc/glibc-2.23/resource/getrusage.c
new file mode 100644
index 0000000..0db1e6f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/getrusage.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 <sys/resource.h>
+#include <errno.h>
+
+/* Return resource usage information on process indicated by WHO
+   and put it in *USAGE.  Returns 0 for success, -1 for failure.  */
+int
+__getrusage (enum __rusage_who who, struct rusage *usage)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (getrusage)
+
+weak_alias (__getrusage, getrusage)
diff --git a/ap/libc/glibc/glibc-2.23/resource/nice.c b/ap/libc/glibc/glibc-2.23/resource/nice.c
new file mode 100644
index 0000000..64b2c57
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/nice.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 <unistd.h>
+
+/* Increment the scheduling priority of the calling process by INCR.
+   The superuser may use a negative INCR to decrement the priority.  */
+int
+nice (int incr)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (nice)
diff --git a/ap/libc/glibc/glibc-2.23/resource/setpriority.c b/ap/libc/glibc/glibc-2.23/resource/setpriority.c
new file mode 100644
index 0000000..49c29b1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/setpriority.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 <sys/resource.h>
+
+/* Set the priority of all processes specified by WHICH and WHO
+   to PRIO.  Returns 0 on success, -1 on errors.  */
+int
+__setpriority (enum __priority_which which, id_t who, int prio)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+libc_hidden_def (__setpriority)
+weak_alias (__setpriority, setpriority)
+
+stub_warning (setpriority)
diff --git a/ap/libc/glibc/glibc-2.23/resource/setrlimit.c b/ap/libc/glibc/glibc-2.23/resource/setrlimit.c
new file mode 100644
index 0000000..a6ddcc4
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/setrlimit.c
@@ -0,0 +1,34 @@
+/* Set process resource limits.  Stub version.
+   Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <sys/resource.h>
+#include <sys/types.h>
+
+/* Set the soft and hard limits for RESOURCE to *RLIMITS.
+   Only the super-user can increase hard limits.
+   Return 0 if successful, -1 if not (and sets errno).  */
+int
+__setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__setrlimit, setrlimit)
+
+stub_warning (setrlimit)
diff --git a/ap/libc/glibc/glibc-2.23/resource/setrlimit64.c b/ap/libc/glibc/glibc-2.23/resource/setrlimit64.c
new file mode 100644
index 0000000..8e6ec2b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/setrlimit64.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <sys/resource.h>
+#include <sys/types.h>
+
+/* Set the soft and hard limits for RESOURCE to *RLIMITS.
+   Only the super-user can increase hard limits.
+   Return 0 if successful, -1 if not (and sets errno).  */
+int
+setrlimit64 (enum __rlimit_resource resource, const struct rlimit64 *rlimits)
+{
+  struct rlimit rlimits32;
+
+  if (rlimits->rlim_cur >= RLIM_INFINITY)
+    rlimits32.rlim_cur = RLIM_INFINITY;
+  else
+    rlimits32.rlim_cur = rlimits->rlim_cur;
+  if (rlimits->rlim_max >= RLIM_INFINITY)
+    rlimits32.rlim_max = RLIM_INFINITY;
+  else
+    rlimits32.rlim_max = rlimits->rlim_max;
+
+  return __setrlimit (resource, &rlimits32);
+}
diff --git a/ap/libc/glibc/glibc-2.23/resource/sys/resource.h b/ap/libc/glibc/glibc-2.23/resource/sys/resource.h
new file mode 100644
index 0000000..dfef7ac
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/sys/resource.h
@@ -0,0 +1,102 @@
+/* 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/>.  */
+
+#ifndef	_SYS_RESOURCE_H
+#define	_SYS_RESOURCE_H	1
+
+#include <features.h>
+
+/* Get the system-dependent definitions of structures and bit values.  */
+#include <bits/resource.h>
+
+#ifndef __id_t_defined
+typedef __id_t id_t;
+# define __id_t_defined
+#endif
+
+__BEGIN_DECLS
+
+/* The X/Open standard defines that all the functions below must use
+   `int' as the type for the first argument.  When we are compiling with
+   GNU extensions we change this slightly to provide better error
+   checking.  */
+#if defined __USE_GNU && !defined __cplusplus
+typedef enum __rlimit_resource __rlimit_resource_t;
+typedef enum __rusage_who __rusage_who_t;
+typedef enum __priority_which __priority_which_t;
+#else
+typedef int __rlimit_resource_t;
+typedef int __rusage_who_t;
+typedef int __priority_which_t;
+#endif
+
+/* Put the soft and hard limits for RESOURCE in *RLIMITS.
+   Returns 0 if successful, -1 if not (and sets errno).  */
+#ifndef __USE_FILE_OFFSET64
+extern int getrlimit (__rlimit_resource_t __resource,
+		      struct rlimit *__rlimits) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
+				       struct rlimit *__rlimits), getrlimit64);
+# else
+#  define getrlimit getrlimit64
+# endif
+#endif
+#ifdef __USE_LARGEFILE64
+extern int getrlimit64 (__rlimit_resource_t __resource,
+			struct rlimit64 *__rlimits) __THROW;
+#endif
+
+/* Set the soft and hard limits for RESOURCE to *RLIMITS.
+   Only the super-user can increase hard limits.
+   Return 0 if successful, -1 if not (and sets errno).  */
+#ifndef __USE_FILE_OFFSET64
+extern int setrlimit (__rlimit_resource_t __resource,
+		      const struct rlimit *__rlimits) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
+				       const struct rlimit *__rlimits),
+			   setrlimit64);
+# else
+#  define setrlimit setrlimit64
+# endif
+#endif
+#ifdef __USE_LARGEFILE64
+extern int setrlimit64 (__rlimit_resource_t __resource,
+			const struct rlimit64 *__rlimits) __THROW;
+#endif
+
+/* Return resource usage information on process indicated by WHO
+   and put it in *USAGE.  Returns 0 for success, -1 for failure.  */
+extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
+
+/* Return the highest priority of any process specified by WHICH and WHO
+   (see above); if WHO is zero, the current process, process group, or user
+   (as specified by WHO) is used.  A lower priority number means higher
+   priority.  Priorities range from PRIO_MIN to PRIO_MAX (above).  */
+extern int getpriority (__priority_which_t __which, id_t __who) __THROW;
+
+/* Set the priority of all processes specified by WHICH and WHO (see above)
+   to PRIO.  Returns 0 on success, -1 on errors.  */
+extern int setpriority (__priority_which_t __which, id_t __who, int __prio)
+     __THROW;
+
+__END_DECLS
+
+#endif	/* sys/resource.h  */
diff --git a/ap/libc/glibc/glibc-2.23/resource/sys/vlimit.h b/ap/libc/glibc/glibc-2.23/resource/sys/vlimit.h
new file mode 100644
index 0000000..d21b42d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/sys/vlimit.h
@@ -0,0 +1,67 @@
+/* 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/>.  */
+
+#ifndef _SYS_VLIMIT_H
+#define _SYS_VLIMIT_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* This interface is obsolete, and is superseded by <sys/resource.h>.  */
+
+/* Kinds of resource limit.  */
+enum __vlimit_resource
+{
+  /* Setting this non-zero makes it impossible to raise limits.
+     Only the super-use can set it to zero.
+
+     This is not implemented in recent versions of BSD, nor by
+     the GNU C library.  */
+  LIM_NORAISE,
+
+  /* CPU time available for each process (seconds).  */
+  LIM_CPU,
+
+  /* Largest file which can be created (bytes).  */
+  LIM_FSIZE,
+
+  /* Maximum size of the data segment (bytes).  */
+  LIM_DATA,
+
+  /* Maximum size of the stack segment (bytes).  */
+  LIM_STACK,
+
+  /* Largest core file that will be created (bytes).  */
+  LIM_CORE,
+
+  /* Resident set size (bytes).  */
+  LIM_MAXRSS
+};
+
+/* This means no limit.  */
+#define INFINITY 0x7fffffff
+
+
+/* Set the soft limit for RESOURCE to be VALUE.
+   Returns 0 for success, -1 for failure.  */
+extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW;
+
+
+__END_DECLS
+
+#endif /* sys/vlimit.h  */
diff --git a/ap/libc/glibc/glibc-2.23/resource/sys/vtimes.h b/ap/libc/glibc/glibc-2.23/resource/sys/vtimes.h
new file mode 100644
index 0000000..c6af2ba
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/sys/vtimes.h
@@ -0,0 +1,68 @@
+/* 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/>.  */
+
+#ifndef _SYS_VTIMES_H
+#define _SYS_VTIMES_H	1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* This interface is obsolete; use `getrusage' instead.  */
+
+/* Granularity of the `vm_utime' and `vm_stime' fields of a `struct vtimes'.
+   (This is the frequency of the machine's power supply, in Hz.)  */
+#define	VTIMES_UNITS_PER_SECOND	60
+
+struct vtimes
+{
+  /* User time used in units of 1/VTIMES_UNITS_PER_SECOND seconds.  */
+  int vm_utime;
+  /* System time used in units of 1/VTIMES_UNITS_PER_SECOND seconds.  */
+  int vm_stime;
+
+  /* Amount of data and stack memory used (kilobyte-seconds).  */
+  unsigned int vm_idsrss;
+  /* Amount of text memory used (kilobyte-seconds).  */
+  unsigned int vm_ixrss;
+  /* Maximum resident set size (text, data, and stack) (kilobytes).  */
+  int vm_maxrss;
+
+  /* Number of hard page faults (i.e. those that required I/O).  */
+  int vm_majflt;
+  /* Number of soft page faults (i.e. those serviced by reclaiming
+     a page from the list of pages awaiting reallocation.  */
+  int vm_minflt;
+
+  /* Number of times a process was swapped out of physical memory.  */
+  int vm_nswap;
+
+  /* Number of input operations via the file system.  Note: This
+     and `ru_oublock' do not include operations with the cache.  */
+  int vm_inblk;
+  /* Number of output operations via the file system.  */
+  int vm_oublk;
+};
+
+/* If CURRENT is not NULL, write statistics for the current process into
+   *CURRENT.  If CHILD is not NULL, write statistics for all terminated child
+   processes into *CHILD.  Returns 0 for success, -1 for failure.  */
+extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW;
+
+__END_DECLS
+
+#endif /* sys/vtimes.h  */
diff --git a/ap/libc/glibc/glibc-2.23/resource/tst-getrlimit.c b/ap/libc/glibc/glibc-2.23/resource/tst-getrlimit.c
new file mode 100644
index 0000000..6748034
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/tst-getrlimit.c
@@ -0,0 +1,112 @@
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/resource.h>
+
+
+static struct
+{
+  const char *name;
+  int resource;
+  bool required;
+} tests[] =
+  {
+    /* The following 7 limits are part of POSIX and must exist.  */
+    { "RLIMIT_CORE", RLIMIT_CORE, true },
+    { "RLIMIT_CPU", RLIMIT_CPU, true },
+    { "RLIMIT_DATA", RLIMIT_DATA, true },
+    { "RLIMIT_FSIZE", RLIMIT_FSIZE, true },
+    { "RLIMIT_NOFILE", RLIMIT_NOFILE, true },
+    { "RLIMIT_STACK", RLIMIT_STACK, true },
+    { "RLIMIT_AS", RLIMIT_AS, true },
+    /* The following are traditional Unix limits which are also
+       expected (by us).  */
+    { "RLIMIT_RSS", RLIMIT_RSS, true },
+    { "RLIMIT_NPROC", RLIMIT_NPROC, true },
+    /* The following are extensions.  */
+#ifdef RLIMIT_MEMLOCK
+    { "RLIMIT_MEMLOCK", RLIMIT_MEMLOCK, false },
+#endif
+#ifdef RLIMIT_LOCKS
+    { "RLIMIT_LOCKS", RLIMIT_LOCKS, false },
+#endif
+#ifdef RLIMIT_SIGPENDING
+    { "RLIMIT_SIGPENDING", RLIMIT_SIGPENDING, false },
+#endif
+#ifdef RLIMIT_MSGQUEUE
+    { "RLIMIT_MSGQUEUE", RLIMIT_MSGQUEUE, false },
+#endif
+#ifdef RLIMIT_NICE
+    { "RLIMIT_NICE", RLIMIT_NICE, false },
+#endif
+#ifdef RLIMIT_RTPRIO
+    { "RLIMIT_RTPRIO", RLIMIT_RTPRIO, false },
+#endif
+  };
+#define ntests (sizeof (tests) / sizeof (tests[0]))
+
+
+static int
+do_test (void)
+{
+  int status = 0;
+
+  for (int i = 0; i < ntests; ++i)
+    {
+      bool this_ok = true;
+
+      struct rlimit r;
+      int res = getrlimit (tests[i].resource, &r);
+      if (res == -1)
+	{
+	  if (errno == EINVAL)
+	    {
+	      if (tests[i].required)
+		{
+		  printf ("limit %s expectedly not available for getrlimit\n",
+			  tests[i].name);
+		  status = 1;
+		  this_ok = false;
+		}
+	    }
+	  else
+	    {
+	      printf ("getrlimit for %s returned unexpected error: %m\n",
+		      tests[i].name);
+	      status = 1;
+	      this_ok = false;
+	    }
+	}
+
+      struct rlimit64 r64;
+      res = getrlimit64 (tests[i].resource, &r64);
+      if (res == -1)
+	{
+	  if (errno == EINVAL)
+	    {
+	      if (tests[i].required)
+		{
+		  printf ("limit %s expectedly not available for getrlimit64"
+			  "\n", tests[i].name);
+		  status = 1;
+		  this_ok = false;
+		}
+	    }
+	  else
+	    {
+	      printf ("getrlimit64 for %s returned unexpected error: %m\n",
+		      tests[i].name);
+	      status = 1;
+	      this_ok = false;
+	    }
+	}
+
+      if (this_ok)
+	printf ("limit %s OK\n", tests[i].name);
+    }
+
+  return status;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/ap/libc/glibc/glibc-2.23/resource/ulimit.c b/ap/libc/glibc/glibc-2.23/resource/ulimit.c
new file mode 100644
index 0000000..6e017fa
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/ulimit.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 <sys/resource.h>
+
+/* Function depends on CMD:
+   1 = Return the limit on the size of a file, in units of 512 bytes.
+   2 = Set the limit on the size of a file to NEWLIMIT.  Only the
+       super-user can increase the limit.
+   3 = Return the maximum possible address of the data segment.
+   4 = Return the maximum number of files that the calling process
+       can open.
+   Returns -1 on errors.  */
+long int
+__ulimit (int cmd, ...)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+weak_alias (__ulimit, ulimit)
+
+stub_warning (ulimit)
diff --git a/ap/libc/glibc/glibc-2.23/resource/ulimit.h b/ap/libc/glibc/glibc-2.23/resource/ulimit.h
new file mode 100644
index 0000000..aefc1b9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/ulimit.h
@@ -0,0 +1,47 @@
+/* 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/>.  */
+
+#ifndef _ULIMIT_H
+#define _ULIMIT_H	1
+
+#include <features.h>
+
+/* Constants used as the first parameter for `ulimit'.  They denote limits
+   which can be set or retrieved using this function.  */
+enum
+{
+  UL_GETFSIZE = 1,			/* Return limit on the size of a file,
+					   in units of 512 bytes.  */
+#define UL_GETFSIZE	UL_GETFSIZE
+  UL_SETFSIZE,				/* Set limit on the size of a file to
+					   second argument.  */
+#define UL_SETFSIZE	UL_SETFSIZE
+  __UL_GETMAXBRK,			/* Return the maximum possible address
+					   of the data segment.  */
+  __UL_GETOPENMAX			/* Return the maximum number of files
+					   that the calling process can open.*/
+};
+
+
+__BEGIN_DECLS
+
+/* Control process limits according to CMD.  */
+extern long int ulimit (int __cmd, ...) __THROW;
+
+__END_DECLS
+
+#endif /* ulimit.h */
diff --git a/ap/libc/glibc/glibc-2.23/resource/vlimit.c b/ap/libc/glibc/glibc-2.23/resource/vlimit.c
new file mode 100644
index 0000000..d817eea
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/vlimit.c
@@ -0,0 +1,48 @@
+/* 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/>.  */
+
+/* This is generic in the sense that it will work with the BSD, SYSV,
+   or stub versions of getrlimit.  Separate versions could be written
+   for efficiency, but it's probably not worth it.  */
+
+#include <sys/vlimit.h>
+#include <sys/resource.h>
+#include <errno.h>
+
+/* Set the soft limit for RESOURCE to be VALUE.
+   Returns 0 for success, -1 for failure.  */
+int
+vlimit (enum __vlimit_resource resource, int value)
+{
+  if (resource >= LIM_CPU && resource <= LIM_MAXRSS)
+    {
+      /* The rlimit codes happen to each be one less
+	 than the corresponding vlimit codes.  */
+      enum __rlimit_resource rlimit_res =
+	(enum __rlimit_resource) ((int) resource - 1);
+      struct rlimit lims;
+
+      if (__getrlimit (rlimit_res, &lims) < 0)
+	return -1;
+
+      lims.rlim_cur = value;
+      return __setrlimit (rlimit_res, &lims);
+    }
+
+  __set_errno (EINVAL);
+  return -1;
+}
diff --git a/ap/libc/glibc/glibc-2.23/resource/vtimes.c b/ap/libc/glibc/glibc-2.23/resource/vtimes.c
new file mode 100644
index 0000000..40d03ff
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/resource/vtimes.c
@@ -0,0 +1,62 @@
+/* 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 <sys/vtimes.h>
+#include <sys/resource.h>
+
+/* Return the number of 1/VTIMES_UNITS_PER_SECOND-second
+   units in the `struct timeval' TV.  */
+#define TIMEVAL_TO_VTIMES(tv) \
+  ((tv.tv_sec * VTIMES_UNITS_PER_SECOND) + \
+   (tv.tv_usec * VTIMES_UNITS_PER_SECOND / 1000000))
+
+/* If VT is not NULL, write statistics for WHO into *VT.
+   Return 0 for success, -1 for failure.  */
+static int
+vtimes_one (struct vtimes *vt, enum __rusage_who who)
+{
+  if (vt != NULL)
+    {
+      struct rusage usage;
+
+      if (__getrusage (who, &usage) < 0)
+	return -1;
+
+      vt->vm_utime = TIMEVAL_TO_VTIMES (usage.ru_utime);
+      vt->vm_stime = TIMEVAL_TO_VTIMES (usage.ru_stime);
+      vt->vm_idsrss = usage.ru_idrss + usage.ru_isrss;
+      vt->vm_majflt = usage.ru_majflt;
+      vt->vm_minflt = usage.ru_minflt;
+      vt->vm_nswap = usage.ru_nswap;
+      vt->vm_inblk = usage.ru_inblock;
+      vt->vm_oublk = usage.ru_oublock;
+    }
+  return 0;
+}
+
+/* If CURRENT is not NULL, write statistics for the current process into
+   *CURRENT.  If CHILD is not NULL, write statistics for all terminated child
+   processes into *CHILD.  Returns 0 for success, -1 for failure.  */
+int
+vtimes (struct vtimes *current, struct vtimes *child)
+{
+  if (vtimes_one (current, RUSAGE_SELF) < 0
+      || vtimes_one (child, RUSAGE_CHILDREN) < 0)
+    return -1;
+  return 0;
+}
