[Feature][T106]ZXW P56U09 code

Only Configure: Yes
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: No
Doc Update: No

Change-Id: I3cbd8b420271eb20c2b40ebe5c78f83059cd42f3
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/Makefile b/ap/libc/glibc/glibc-2.23/sysvipc/Makefile
new file mode 100644
index 0000000..5f3479e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/Makefile
@@ -0,0 +1,36 @@
+# Copyright (C) 1995-2016 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+#
+#	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.23/sysvipc/Versions b/ap/libc/glibc/glibc-2.23/sysvipc/Versions
new file mode 100644
index 0000000..4c797e2
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/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.23/sysvipc/ftok.c b/ap/libc/glibc/glibc-2.23/sysvipc/ftok.c
new file mode 100644
index 0000000..ee38804
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/ftok.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995-2016 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 (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.23/sysvipc/msgctl.c b/ap/libc/glibc/glibc-2.23/sysvipc/msgctl.c
new file mode 100644
index 0000000..99b0fcb
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/msgctl.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2016 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 (int msqid, int cmd, struct msqid_ds *buf)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msgctl)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/msgget.c b/ap/libc/glibc/glibc-2.23/sysvipc/msgget.c
new file mode 100644
index 0000000..7772e4a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/msgget.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2016 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_t key, int msgflg)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (msgget)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/msgrcv.c b/ap/libc/glibc/glibc-2.23/sysvipc/msgrcv.c
new file mode 100644
index 0000000..2055e3c
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/msgrcv.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995-2016 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 (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.23/sysvipc/msgsnd.c b/ap/libc/glibc/glibc-2.23/sysvipc/msgsnd.c
new file mode 100644
index 0000000..d52d3cb
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/msgsnd.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1995-2016 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 (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.23/sysvipc/semctl.c b/ap/libc/glibc/glibc-2.23/sysvipc/semctl.c
new file mode 100644
index 0000000..60409f5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/semctl.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2016 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.23/sysvipc/semget.c b/ap/libc/glibc/glibc-2.23/sysvipc/semget.c
new file mode 100644
index 0000000..f7a6e09
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/semget.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2016 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_t key, int nsems, int semflg)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (semget)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/semop.c b/ap/libc/glibc/glibc-2.23/sysvipc/semop.c
new file mode 100644
index 0000000..923a44f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/semop.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1995-2016 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 (int semid, struct sembuf *sops, size_t nsops)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (semop)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/semtimedop.c b/ap/libc/glibc/glibc-2.23/sysvipc/semtimedop.c
new file mode 100644
index 0000000..61e0112
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/semtimedop.c
@@ -0,0 +1,32 @@
+/* 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 <sys/sem.h>
+#include <errno.h>
+
+/* Perform user-defined atomical operation of array of semaphores.  */
+
+int
+semtimedop (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.23/sysvipc/shmat.c b/ap/libc/glibc/glibc-2.23/sysvipc/shmat.c
new file mode 100644
index 0000000..d9fc4db
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/shmat.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1995-2016 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 (int shmid, const void *shmaddr, int shmflg)
+{
+  __set_errno (ENOSYS);
+  return (void *) -1;
+}
+
+stub_warning (shmat)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/shmctl.c b/ap/libc/glibc/glibc-2.23/sysvipc/shmctl.c
new file mode 100644
index 0000000..79e9cbe
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/shmctl.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1995-2016 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 (int shmid, int cmd, struct shmid_ds *buf)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (shmctl)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/shmdt.c b/ap/libc/glibc/glibc-2.23/sysvipc/shmdt.c
new file mode 100644
index 0000000..c407be5
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/shmdt.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2016 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 (const void *shmaddr)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (shmdt)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/shmget.c b/ap/libc/glibc/glibc-2.23/sysvipc/shmget.c
new file mode 100644
index 0000000..27cdd29
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/shmget.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995-2016 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_t key, size_t size, int shmflg)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+
+stub_warning (shmget)
diff --git a/ap/libc/glibc/glibc-2.23/sysvipc/sys/ipc.h b/ap/libc/glibc/glibc-2.23/sysvipc/sys/ipc.h
new file mode 100644
index 0000000..70bd7a6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/sys/ipc.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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.23/sysvipc/sys/msg.h b/ap/libc/glibc/glibc-2.23/sysvipc/sys/msg.h
new file mode 100644
index 0000000..4dc559f
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/sys/msg.h
@@ -0,0 +1,83 @@
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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.23/sysvipc/sys/sem.h b/ap/libc/glibc/glibc-2.23/sysvipc/sys/sem.h
new file mode 100644
index 0000000..1b32092
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/sys/sem.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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.23/sysvipc/sys/shm.h b/ap/libc/glibc/glibc-2.23/sysvipc/sys/shm.h
new file mode 100644
index 0000000..df263dc
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.23/sysvipc/sys/shm.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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 */