@@ -18,7 +18,7 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getrusage osf_wait4
# Support old ipc control
-sysdep_routines += oldmsgctl oldsemctl oldshmctl
+sysdep_routines += oldsemctl oldshmctl
CFLAGS-ioperm.c = -Wa,-mev6
endif
deleted file mode 100644
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/arm/msgctl.c>
@@ -1,6 +1,5 @@
# File name Caller Syscall name # args Strong name Weak names
-oldmsgctl EXTRA msgctl i:iip __old_msgctl msgctl@GLIBC_2.0
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
deleted file mode 100644
@@ -1,33 +0,0 @@
-/* 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 <errno.h>
-#include <sys/msg.h>
-#include <ipc_priv.h>
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-
-int
-__new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
-{
- return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
-}
-
-#include <shlib-compat.h>
-versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2);
@@ -2,7 +2,6 @@
# SysV APIs
msgget - msgget i:ii __msgget msgget
-msgctl - msgctl i:iip __msgctl msgctl
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
semget - semget i:iii __semget semget
@@ -1,7 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
@@ -5,7 +5,6 @@ umount2 - umount 2 __umount2 umount2
getpriority - getpriority i:ii __getpriority getpriority
# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
deleted file mode 100644
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/arm/msgctl.c>
@@ -15,18 +15,11 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <sys/msg.h>
-#include <ipc_priv.h>
-#include <sysdep.h>
+#include <shlib-compat.h>
-int __msgctl (int msqid, int cmd, struct msqid_ds *buf);
+#undef SHLIB_COMPAT
+#define SHLIB_COMPAT(a, b, c) 0
-int
-__msgctl (int msqid, int cmd, struct msqid_ds *buf)
-{
- return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
-}
+#define DEFAULT_VERSION GLIBC_2_0
-#include <shlib-compat.h>
-versioned_symbol (libc, __msgctl, msgctl, GLIBC_2_0);
+#include <sysdeps/unix/sysv/linux/msgctl.c>
@@ -16,17 +16,30 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
#include <sys/msg.h>
#include <ipc_priv.h>
-
#include <sysdep.h>
-#include <string.h>
-#include <sys/syscall.h>
#include <shlib-compat.h>
+#include <errno.h>
+
+#ifndef DEFAULT_VERSION
+# define DEFAULT_VERSION GLIBC_2_2
+#endif
+
+int
+__new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
+{
+#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
+ return INLINE_SYSCALL_CALL (msgctl, msqid, cmd | __IPC_64, buf);
+#else
+ return INLINE_SYSCALL_CALL (ipc, IPCOP_msgctl, msqid, cmd | __IPC_64, 0,
+ buf);
+#endif
+}
+versioned_symbol (libc, __new_msgctl, msgctl, DEFAULT_VERSION);
-#include <kernel-features.h>
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
struct __old_msqid_ds
{
struct __old_ipc_perm msg_perm; /* structure describing operation permission */
@@ -44,27 +57,15 @@ struct __old_msqid_ds
__ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
};
-/* Allows to control internal state and destruction of message queue
- objects. */
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
-int __old_msgctl (int, int, struct __old_msqid_ds *);
-#endif
-int __new_msgctl (int, int, struct msqid_ds *);
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
int
attribute_compat_text_section
__old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
{
- return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf);
+#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
+ return INLINE_SYSCALL_CALL (msgctl, msqid, cmd | __IPC_64, buf);
+#else
+ return INLINE_SYSCALL_CALL (ipc, IPCOP_msgctl, msqid, cmd, 0, buf);
+#endif
}
compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);
#endif
-
-int
-__new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
-{
- return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd | __IPC_64, 0, buf);
-}
-
-versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2);
@@ -1,7 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
@@ -2,7 +2,6 @@
arch_prctl EXTRA arch_prctl i:ii __arch_prctl arch_prctl
modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt
-msgctl - msgctl i:iip __msgctl msgctl
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd