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

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/Makefile b/ap/libc/glibc/glibc-2.22/sysvipc/Makefile
new file mode 100644
index 0000000..3e1daf7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/Makefile
@@ -0,0 +1,36 @@
+# Copyright (C) 1995-2015 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+#
+#	Sub-makefile for sysvipc portion of the library.
+#
+subdir	:= sysvipc
+
+include ../Makeconfig
+
+headers	:= sys/ipc.h sys/msg.h sys/sem.h sys/shm.h \
+	   bits/ipctypes.h bits/ipc.h bits/msq.h bits/sem.h bits/shm.h
+
+routines := ftok \
+	    msgsnd msgrcv msgget msgctl \
+	    semop semget semctl semtimedop \
+	    shmat shmdt shmget shmctl
+
+include ../Rules
+
+CFLAGS-msgrcv.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/Versions b/ap/libc/glibc/glibc-2.22/sysvipc/Versions
new file mode 100644
index 0000000..4c797e2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/Versions
@@ -0,0 +1,20 @@
+libc {
+  GLIBC_2.0 {
+    # f*
+    ftok;
+
+    # m*
+    msgctl; msgget; msgrcv; msgsnd;
+
+    # s*
+    semctl; semget; semop; shmat; shmctl; shmdt; shmget;
+  }
+  GLIBC_2.3.3 {
+    # Non-standard function.
+    semtimedop;
+  }
+  GLIBC_PRIVATE {
+    # Cancellation point entries.
+    __libc_msgrcv; __libc_msgsnd;
+  }
+}
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/ftok.c b/ap/libc/glibc/glibc-2.22/sysvipc/ftok.c
new file mode 100644
index 0000000..6297459
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/ftok.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/ipc.h>
+#include <sys/stat.h>
+
+key_t
+ftok (pathname, proj_id)
+     const char *pathname;
+     int proj_id;
+{
+  struct stat64 st;
+  key_t key;
+
+  if (__xstat64 (_STAT_VER, pathname, &st) < 0)
+    return (key_t) -1;
+
+  key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16)
+	 | ((proj_id & 0xff) << 24));
+
+  return key;
+}
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/msgctl.c b/ap/libc/glibc/glibc-2.22/sysvipc/msgctl.c
new file mode 100644
index 0000000..c532bd9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/msgctl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/msg.h>
+#include <errno.h>
+
+/* Allows to control internal state and destruction of message queue
+   objects.  */
+
+int
+msgctl (msqid, cmd, buf)
+     int msqid;
+     int cmd;
+     struct msqid_ds *buf;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msgctl)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/msgget.c b/ap/libc/glibc/glibc-2.22/sysvipc/msgget.c
new file mode 100644
index 0000000..0d68701
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/msgget.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/msg.h>
+#include <errno.h>
+
+/* Return descriptor for message queue associated with KEY.  The MSGFLG
+   parameter describes how to proceed with clashing of key values.  */
+
+int
+msgget (key, msgflg)
+     key_t key;
+     int msgflg;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msgget)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/msgrcv.c b/ap/libc/glibc/glibc-2.22/sysvipc/msgrcv.c
new file mode 100644
index 0000000..1a78f9e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/msgrcv.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/msg.h>
+#include <errno.h>
+
+/* Read a message from the queue associated with the message queue
+   descriptor MSQID.  At most MSGSZ bytes of the message are placed
+   in the buffer specified by the MSGP parameter.  The MSGTYP parameter
+   describes which message is returned in MSGFLG describes the behaviour
+   in buffer overflow or queue underflow.  */
+
+ssize_t
+msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
+     int msqid;
+     void *msgp;
+     size_t msgsz;
+     long msgtyp;
+     int msgflg;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msgrcv)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/msgsnd.c b/ap/libc/glibc/glibc-2.22/sysvipc/msgsnd.c
new file mode 100644
index 0000000..49eba4b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/msgsnd.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
+
+   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/msg.h>
+#include <errno.h>
+
+/* Send a message to the queue associated with the message queue
+   descriptor MSQID.  The parameter MSGP points to a structure
+   describing messages where the parameter MSGSZ gives the length
+   of the text.  The MSGFLG parameter describes the action taken
+   when the limit of the message queue length is reached.  */
+
+int
+msgsnd (msqid, msgp, msgsz, msgflg)
+     int msqid;
+     const void *msgp;
+     size_t msgsz;
+     int msgflg;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msgsnd)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/semctl.c b/ap/libc/glibc/glibc-2.22/sysvipc/semctl.c
new file mode 100644
index 0000000..4624b20
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/semctl.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/sem.h>
+#include <errno.h>
+
+/* Return identifier for array of NSEMS semaphores associated with
+   KEY.  */
+
+int
+semctl (int semid, int semnum, int cmd, ...)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (semctl)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/semget.c b/ap/libc/glibc/glibc-2.22/sysvipc/semget.c
new file mode 100644
index 0000000..be850cd
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/semget.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/sem.h>
+#include <errno.h>
+
+/* Return identifier for array of NSEMS semaphores associated with
+   KEY.  */
+
+int
+semget (key, nsems, semflg)
+     key_t key;
+     int nsems;
+     int semflg;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (semget)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/semop.c b/ap/libc/glibc/glibc-2.22/sysvipc/semop.c
new file mode 100644
index 0000000..1f03797
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/semop.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
+
+   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/sem.h>
+#include <errno.h>
+
+/* Perform user-defined atomical operation of array of semaphores.  */
+
+int
+semop (semid, sops, nsops)
+     int semid;
+     struct sembuf *sops;
+     size_t nsops;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (semop)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/semtimedop.c b/ap/libc/glibc/glibc-2.22/sysvipc/semtimedop.c
new file mode 100644
index 0000000..b1769bb
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/semtimedop.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2003-2015 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 <sys/sem.h>
+#include <errno.h>
+
+/* Perform user-defined atomical operation of array of semaphores.  */
+
+int
+semtimedop (semid, sops, nsops, timeout)
+     int semid;
+     struct sembuf *sops;
+     size_t nsops;
+     const struct timespec *timeout;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (semtimedop)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/shmat.c b/ap/libc/glibc/glibc-2.22/sysvipc/shmat.c
new file mode 100644
index 0000000..30fb015
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/shmat.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/shm.h>
+#include <errno.h>
+
+/* Attach the shared memory segment associated with SHMID to the data
+   segment of the calling process.  SHMADDR and SHMFLG determine how
+   and where the segment is attached.  */
+
+void *
+shmat (shmid, shmaddr, shmflg)
+     int shmid;
+     const void *shmaddr;
+     int shmflg;
+{
+  __set_errno (ENOSYS);
+  return (void *) -1;
+}
+
+stub_warning (shmat)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/shmctl.c b/ap/libc/glibc/glibc-2.22/sysvipc/shmctl.c
new file mode 100644
index 0000000..2c4f198
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/shmctl.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/shm.h>
+#include <errno.h>
+
+/* Provide operations to control over shared memory segments.  */
+
+int
+shmctl (shmid, cmd, buf)
+     int shmid;
+     int cmd;
+     struct shmid_ds *buf;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (shmctl)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/shmdt.c b/ap/libc/glibc/glibc-2.22/sysvipc/shmdt.c
new file mode 100644
index 0000000..660a69b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/shmdt.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+   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/shm.h>
+#include <errno.h>
+
+/* Detach shared memory segment starting at address specified by SHMADDR
+   from the caller's data segment.  */
+
+int
+shmdt (shmaddr)
+     const void *shmaddr;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (shmdt)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/shmget.c b/ap/libc/glibc/glibc-2.22/sysvipc/shmget.c
new file mode 100644
index 0000000..973c0c7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/shmget.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
+
+   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/shm.h>
+#include <errno.h>
+
+/* Return an identifier for an shared memory segment of at least size SIZE
+   which is associated with KEY.  */
+
+int
+shmget (key, size, shmflg)
+     key_t key;
+     size_t size;
+     int shmflg;
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (shmget)
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/sys/ipc.h b/ap/libc/glibc/glibc-2.22/sysvipc/sys/ipc.h
new file mode 100644
index 0000000..7079ba9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/sys/ipc.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_IPC_H
+#define _SYS_IPC_H	1
+
+#include <features.h>
+
+#if !defined __USE_MISC && !defined __USE_XOPEN && __GNUC__ >= 2
+# warning "Files using this header must be compiled with _GNU_SOURCE or _XOPEN_SOURCE"
+#endif
+
+/* Get system dependent definition of `struct ipc_perm' and more.  */
+#include <bits/ipctypes.h>
+#include <bits/ipc.h>
+
+#ifndef __uid_t_defined
+typedef __uid_t uid_t;
+# define __uid_t_defined
+#endif
+
+#ifndef __gid_t_defined
+typedef __gid_t gid_t;
+# define __gid_t_defined
+#endif
+
+#ifndef __mode_t_defined
+typedef __mode_t mode_t;
+# define __mode_t_defined
+#endif
+
+#ifndef __key_t_defined
+typedef __key_t key_t;
+# define __key_t_defined
+#endif
+
+__BEGIN_DECLS
+
+/* Generates key for System V style IPC.  */
+extern key_t ftok (const char *__pathname, int __proj_id) __THROW;
+
+__END_DECLS
+
+#endif /* sys/ipc.h */
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/sys/msg.h b/ap/libc/glibc/glibc-2.22/sysvipc/sys/msg.h
new file mode 100644
index 0000000..72836b8
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/sys/msg.h
@@ -0,0 +1,83 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_MSG_H
+#define _SYS_MSG_H
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Get common definition of System V style IPC.  */
+#include <sys/ipc.h>
+
+/* Get system dependent definition of `struct msqid_ds' and more.  */
+#include <bits/msq.h>
+
+/* Define types required by the standard.  */
+#define	__need_time_t
+#include <time.h>
+
+#ifndef __pid_t_defined
+typedef __pid_t pid_t;
+# define __pid_t_defined
+#endif
+
+#ifndef __ssize_t_defined
+typedef __ssize_t ssize_t;
+# define __ssize_t_defined
+#endif
+
+/* The following System V style IPC functions implement a message queue
+   system.  The definition is found in XPG2.  */
+
+#ifdef __USE_GNU
+/* Template for struct to be used as argument for `msgsnd' and `msgrcv'.  */
+struct msgbuf
+  {
+    __syscall_slong_t mtype;	/* type of received/sent message */
+    char mtext[1];		/* text of the message */
+  };
+#endif
+
+
+__BEGIN_DECLS
+
+/* Message queue control operation.  */
+extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
+
+/* Get messages queue.  */
+extern int msgget (key_t __key, int __msgflg) __THROW;
+
+/* Receive message from message queue.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern ssize_t msgrcv (int __msqid, void *__msgp, size_t __msgsz,
+		       long int __msgtyp, int __msgflg);
+
+/* Send message to message queue.
+
+   This function is a cancellation point and therefore not marked with
+   __THROW.  */
+extern int msgsnd (int __msqid, const void *__msgp, size_t __msgsz,
+		   int __msgflg);
+
+__END_DECLS
+
+#endif /* sys/msg.h */
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/sys/sem.h b/ap/libc/glibc/glibc-2.22/sysvipc/sys/sem.h
new file mode 100644
index 0000000..36879a1
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/sys/sem.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_SEM_H
+#define _SYS_SEM_H	1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Get common definition of System V style IPC.  */
+#include <sys/ipc.h>
+
+/* Get system dependent definition of `struct semid_ds' and more.  */
+#include <bits/sem.h>
+
+#ifdef __USE_GNU
+# define __need_timespec
+# include <time.h>
+#endif
+
+/* The following System V style IPC functions implement a semaphore
+   handling.  The definition is found in XPG2.  */
+
+/* Structure used for argument to `semop' to describe operations.  */
+struct sembuf
+{
+  unsigned short int sem_num;	/* semaphore number */
+  short int sem_op;		/* semaphore operation */
+  short int sem_flg;		/* operation flag */
+};
+
+
+__BEGIN_DECLS
+
+/* Semaphore control operation.  */
+extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW;
+
+/* Get semaphore.  */
+extern int semget (key_t __key, int __nsems, int __semflg) __THROW;
+
+/* Operate on semaphore.  */
+extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW;
+
+#ifdef __USE_GNU
+/* Operate on semaphore with timeout.  */
+extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
+		       const struct timespec *__timeout) __THROW;
+#endif
+
+__END_DECLS
+
+#endif /* sys/sem.h */
diff --git a/ap/libc/glibc/glibc-2.22/sysvipc/sys/shm.h b/ap/libc/glibc/glibc-2.22/sysvipc/sys/shm.h
new file mode 100644
index 0000000..50c4b6e9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/sysvipc/sys/shm.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_SHM_H
+#define _SYS_SHM_H	1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Get common definition of System V style IPC.  */
+#include <sys/ipc.h>
+
+/* Get system dependent definition of `struct shmid_ds' and more.  */
+#include <bits/shm.h>
+
+/* Define types required by the standard.  */
+#define __need_time_t
+#include <time.h>
+
+#ifdef __USE_XOPEN
+# ifndef __pid_t_defined
+typedef __pid_t pid_t;
+#  define __pid_t_defined
+# endif
+#endif	/* X/Open */
+
+
+__BEGIN_DECLS
+
+/* The following System V style IPC functions implement a shared memory
+   facility.  The definition is found in XPG4.2.  */
+
+/* Shared memory control operation.  */
+extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
+
+/* Get shared memory segment.  */
+extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
+
+/* Attach shared memory segment.  */
+extern void *shmat (int __shmid, const void *__shmaddr, int __shmflg)
+     __THROW;
+
+/* Detach shared memory segment.  */
+extern int shmdt (const void *__shmaddr) __THROW;
+
+__END_DECLS
+
+#endif /* sys/shm.h */