|
|
25845f |
commit 2e8a5c8c46f0a897a2629131eb86d1cae8321234
|
|
|
25845f |
Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
25845f |
Date: Thu Jan 31 22:59:04 2013 +0000
|
|
|
25845f |
|
|
|
25845f |
Remove bp-semctl.h and CHECK_SEMCTL.
|
|
|
25845f |
|
|
|
25845f |
Conflicts:
|
|
|
25845f |
sysdeps/generic/bp-semctl.h
|
|
|
25845f |
|
|
|
25845f |
Copyright header change; file removed manually.
|
|
|
25845f |
|
|
|
25845f |
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/semctl.c b/ports/sysdeps/unix/sysv/linux/alpha/semctl.c
|
|
|
25845f |
index 0e59ee27af5d25cd..0d28667bf84b57bc 100644
|
|
|
25845f |
--- a/ports/sysdeps/unix/sysv/linux/alpha/semctl.c
|
|
|
25845f |
+++ b/ports/sysdeps/unix/sysv/linux/alpha/semctl.c
|
|
|
25845f |
@@ -33,10 +33,6 @@ union semun
|
|
|
25845f |
struct seminfo *__buf; /* buffer for IPC_INFO */
|
|
|
25845f |
};
|
|
|
25845f |
|
|
|
25845f |
-#include <bp-checks.h>
|
|
|
25845f |
-#include <bp-semctl.h>
|
|
|
25845f |
-
|
|
|
25845f |
-
|
|
|
25845f |
int
|
|
|
25845f |
__new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
{
|
|
|
25845f |
@@ -51,7 +47,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
va_end (ap);
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
|
|
|
25845f |
+ arg.array);
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
#include <shlib-compat.h>
|
|
|
25845f |
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
|
|
|
25845f |
index 3c1c9106420bd67b..7c7d7caafe5db9bf 100644
|
|
|
25845f |
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
|
|
|
25845f |
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
|
|
|
25845f |
@@ -30,9 +30,6 @@ union semun
|
|
|
25845f |
struct seminfo *__buf; /* buffer for IPC_INFO */
|
|
|
25845f |
};
|
|
|
25845f |
|
|
|
25845f |
-#include <bp-checks.h>
|
|
|
25845f |
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
|
|
|
25845f |
-
|
|
|
25845f |
int __semctl (int semid, int semnum, int cmd, ...);
|
|
|
25845f |
|
|
|
25845f |
int
|
|
|
25845f |
@@ -49,7 +46,7 @@ __semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
va_end (ap);
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
|
|
|
25845f |
+ arg.array);
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
#include <shlib-compat.h>
|
|
|
25845f |
diff --git a/sysdeps/generic/bp-semctl.h b/sysdeps/generic/bp-semctl.h
|
|
|
25845f |
deleted file mode 100644
|
|
|
25845f |
index af132837cc40bcc9..0000000000000000
|
|
|
25845f |
--- a/sysdeps/generic/bp-semctl.h
|
|
|
25845f |
+++ /dev/null
|
|
|
25845f |
@@ -1,66 +0,0 @@
|
|
|
25845f |
-/* Bounded-pointer checking macros for C.
|
|
|
25845f |
- Copyright (C) 2000 Free Software Foundation, Inc.
|
|
|
25845f |
- This file is part of the GNU C Library.
|
|
|
25845f |
- Contributed by Greg McGary <greg@mcgary.org>
|
|
|
25845f |
-
|
|
|
25845f |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
25845f |
- modify it under the terms of the GNU Lesser General Public
|
|
|
25845f |
- License as published by the Free Software Foundation; either
|
|
|
25845f |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
25845f |
-
|
|
|
25845f |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
25845f |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
25845f |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
25845f |
- Lesser General Public License for more details.
|
|
|
25845f |
-
|
|
|
25845f |
- You should have received a copy of the GNU Lesser General Public
|
|
|
25845f |
- License along with the GNU C Library; if not, see
|
|
|
25845f |
- <http://www.gnu.org/licenses/>. */
|
|
|
25845f |
-
|
|
|
25845f |
-#ifndef _bp_semctl_h_
|
|
|
25845f |
-#define _bp_semctl_h_ 1
|
|
|
25845f |
-
|
|
|
25845f |
-#if __BOUNDED_POINTERS__
|
|
|
25845f |
-
|
|
|
25845f |
-# define CHECK_SEMCTL(ARGP, SEMID, CMD) check_semctl (ARGP, SEMID, CMD)
|
|
|
25845f |
-
|
|
|
25845f |
-union semun *__unbounded
|
|
|
25845f |
-check_semctl (union semun *arg, int semid, int cmd)
|
|
|
25845f |
-{
|
|
|
25845f |
- int ipc64 = (cmd & __IPC_64);
|
|
|
25845f |
-
|
|
|
25845f |
- switch (cmd & ~__IPC_64)
|
|
|
25845f |
- {
|
|
|
25845f |
- case IPC_STAT:
|
|
|
25845f |
- case IPC_SET:
|
|
|
25845f |
- (void) CHECK_1 (arg->buf);
|
|
|
25845f |
- break;
|
|
|
25845f |
-
|
|
|
25845f |
- case GETALL:
|
|
|
25845f |
- case SETALL:
|
|
|
25845f |
- {
|
|
|
25845f |
- struct semid_ds ds;
|
|
|
25845f |
- union semun un = { .buf = &ds };
|
|
|
25845f |
- unsigned int length = ~0;
|
|
|
25845f |
-
|
|
|
25845f |
- /* It's unfortunate that we need to make a recursive
|
|
|
25845f |
- system call to get the size of the semaphore set... */
|
|
|
25845f |
- if (semctl (semid, 0, IPC_STAT | ipc64, un) == 0)
|
|
|
25845f |
- length = ds.sem_nsems;
|
|
|
25845f |
- (void) CHECK_N (arg->array, length);
|
|
|
25845f |
- break;
|
|
|
25845f |
- }
|
|
|
25845f |
-
|
|
|
25845f |
- case IPC_INFO:
|
|
|
25845f |
- (void) CHECK_1 (arg->__buf);
|
|
|
25845f |
- break;
|
|
|
25845f |
- }
|
|
|
25845f |
-
|
|
|
25845f |
- return __ptrvalue (arg);
|
|
|
25845f |
-}
|
|
|
25845f |
-
|
|
|
25845f |
-#else
|
|
|
25845f |
-# define CHECK_SEMCTL(ARGP, SEMID, CMD) (ARGP)
|
|
|
25845f |
-#endif
|
|
|
25845f |
-
|
|
|
25845f |
-#endif /* _bp_semctl_h_ */
|
|
|
25845f |
diff --git a/sysdeps/unix/sysv/linux/i386/semctl.c b/sysdeps/unix/sysv/linux/i386/semctl.c
|
|
|
25845f |
index 5e2d9480598e56c4..c340e57f0e6899c0 100644
|
|
|
25845f |
--- a/sysdeps/unix/sysv/linux/i386/semctl.c
|
|
|
25845f |
+++ b/sysdeps/unix/sysv/linux/i386/semctl.c
|
|
|
25845f |
@@ -49,9 +49,6 @@ union semun
|
|
|
25845f |
struct __old_semid_ds *__old_buf;
|
|
|
25845f |
};
|
|
|
25845f |
|
|
|
25845f |
-#include <bp-checks.h>
|
|
|
25845f |
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
|
|
|
25845f |
-
|
|
|
25845f |
/* Return identifier for array of NSEMS semaphores associated with
|
|
|
25845f |
KEY. */
|
|
|
25845f |
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
|
|
|
25845f |
@@ -75,7 +72,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
va_end (ap);
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
}
|
|
|
25845f |
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
|
|
|
25845f |
#endif
|
|
|
25845f |
@@ -94,7 +91,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
va_end (ap);
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2);
|
|
|
25845f |
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
|
|
|
25845f |
index 2d28cf661e9b3ad0..bae5a8d28306e653 100644
|
|
|
25845f |
--- a/sysdeps/unix/sysv/linux/semctl.c
|
|
|
25845f |
+++ b/sysdeps/unix/sysv/linux/semctl.c
|
|
|
25845f |
@@ -51,9 +51,6 @@ union semun
|
|
|
25845f |
struct __old_semid_ds *__old_buf;
|
|
|
25845f |
};
|
|
|
25845f |
|
|
|
25845f |
-#include <bp-checks.h>
|
|
|
25845f |
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
|
|
|
25845f |
-
|
|
|
25845f |
/* Return identifier for array of NSEMS semaphores associated with
|
|
|
25845f |
KEY. */
|
|
|
25845f |
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
|
|
|
25845f |
@@ -92,7 +89,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
va_end (ap);
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
}
|
|
|
25845f |
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
|
|
|
25845f |
#endif
|
|
|
25845f |
@@ -127,7 +124,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
|
|
|
25845f |
#if __ASSUME_IPC64 > 0
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
#else
|
|
|
25845f |
switch (cmd)
|
|
|
25845f |
{
|
|
|
25845f |
@@ -137,7 +134,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
break;
|
|
|
25845f |
default:
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
{
|
|
|
25845f |
@@ -148,7 +145,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
/* Unfortunately there is no way how to find out for sure whether
|
|
|
25845f |
we should use old or new semctl. */
|
|
|
25845f |
result = INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
if (result != -1 || errno != EINVAL)
|
|
|
25845f |
return result;
|
|
|
25845f |
|
|
|
25845f |
@@ -168,7 +165,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
}
|
|
|
25845f |
}
|
|
|
25845f |
result = INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
if (result != -1 && cmd != IPC_SET)
|
|
|
25845f |
{
|
|
|
25845f |
memset(buf, 0, sizeof(*buf));
|
|
|
25845f |
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c b/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
|
|
|
25845f |
index 464f0b502d65c52a..9dac28c4f1cb4657 100644
|
|
|
25845f |
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
|
|
|
25845f |
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c
|
|
|
25845f |
@@ -50,9 +50,6 @@ union semun
|
|
|
25845f |
struct __old_semid_ds *__old_buf;
|
|
|
25845f |
};
|
|
|
25845f |
|
|
|
25845f |
-#include <bp-checks.h>
|
|
|
25845f |
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
|
|
|
25845f |
-
|
|
|
25845f |
/* Return identifier for array of NSEMS semaphores associated with
|
|
|
25845f |
KEY. */
|
|
|
25845f |
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
|
|
|
25845f |
@@ -87,7 +84,7 @@ __old_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
}
|
|
|
25845f |
compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
|
|
|
25845f |
#endif
|
|
|
25845f |
@@ -117,7 +114,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
|
|
|
25845f |
+ &arg;;
|
|
|
25845f |
}
|
|
|
25845f |
|
|
|
25845f |
versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2);
|
|
|
25845f |
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
|
|
|
25845f |
index 3ac389e5b178a01d..658db0e8d91afa88 100644
|
|
|
25845f |
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
|
|
|
25845f |
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
|
|
|
25845f |
@@ -33,9 +33,6 @@ union semun
|
|
|
25845f |
struct seminfo *__buf; /* buffer for IPC_INFO */
|
|
|
25845f |
};
|
|
|
25845f |
|
|
|
25845f |
-#include <bp-checks.h>
|
|
|
25845f |
-#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
|
|
|
25845f |
-
|
|
|
25845f |
/* Return identifier for array of NSEMS semaphores associated with
|
|
|
25845f |
KEY. */
|
|
|
25845f |
|
|
|
25845f |
@@ -53,5 +50,5 @@ semctl (int semid, int semnum, int cmd, ...)
|
|
|
25845f |
va_end (ap);
|
|
|
25845f |
|
|
|
25845f |
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
|
|
|
25845f |
- CHECK_SEMCTL (&arg, semid, cmd)->array);
|
|
|
25845f |
+ arg.array);
|
|
|
25845f |
}
|