mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 18:23:41 +08:00
* sysdeps/generic/bp-checks.h (BOUNDED_N): Make it work for void*.
* sysdeps/generic/bp-semctl.h (check_semctl): Fix syntax error in union init. Pass zero for ignored semnum arg to semctl. * sysdeps/unix/sysv/linux/shmat.c (shmat): Fix typo. 2000-07-27 Greg McGary <greg@mcgary.org> * sysdeps/generic/bp-checks.h (BOUNDED_N): Make it work for void*. * sysdeps/generic/bp-semctl.h (check_semctl): Fix syntax error in union init. Pass zero for ignored semnum arg to semctl. * sysdeps/unix/sysv/linux/shmat.c (shmat): Fix typo.
This commit is contained in:
parent
d25c879dc5
commit
da8f38c504
@ -1,3 +1,10 @@
|
||||
2000-07-27 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* sysdeps/generic/bp-checks.h (BOUNDED_N): Make it work for void*.
|
||||
* sysdeps/generic/bp-semctl.h (check_semctl): Fix syntax error
|
||||
in union init. Pass zero for ignored semnum arg to semctl.
|
||||
* sysdeps/unix/sysv/linux/shmat.c (shmat): Fix typo.
|
||||
|
||||
2000-07-26 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* sysdeps/gnu/bits/msq.h: Qualify kernel's
|
||||
|
@ -92,7 +92,7 @@ extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
|
||||
|
||||
/* Return a bounded pointer with value PTR that satisfies CHECK_N (PTR, N). */
|
||||
# define BOUNDED_N(PTR, N) \
|
||||
({ __typeof (*(PTR)) *__bounded _p_; \
|
||||
({ __typeof (PTR) __bounded _p_; \
|
||||
__ptrvalue _p_ = __ptrlow _p_ = __ptrvalue (PTR); \
|
||||
__ptrhigh _p_ = __ptrvalue _p_ + (N); \
|
||||
_p_; })
|
||||
|
@ -43,12 +43,12 @@ check_semctl (union semun *arg, int semid, int cmd)
|
||||
case SETALL:
|
||||
{
|
||||
struct semid_ds ds;
|
||||
union semun un = { buf: &ds; };
|
||||
union semun un = { buf: &ds };
|
||||
unsigned int length = ~0;
|
||||
|
||||
/* It's unfortunate that we need to make a recursive
|
||||
system call to get the size of the semaphore set... */
|
||||
if (semctl (semid, semnum, IPC_STAT | ipc64, un) == 0)
|
||||
if (semctl (semid, 0, IPC_STAT | ipc64, un) == 0)
|
||||
length = ds.sem_nsems;
|
||||
(void) CHECK_N (arg->array, length);
|
||||
break;
|
||||
|
@ -43,7 +43,7 @@ shmat (shmid, shmaddr, shmflg)
|
||||
struct shmid_ds shmds;
|
||||
/* It's unfortunate that we need to make another system call to get
|
||||
the shared memory segment length... */
|
||||
if (shmctl (shmid, ICP_STAT, &shmds) == 0)
|
||||
if (shmctl (shmid, IPC_STAT, &shmds) == 0)
|
||||
length = shmds.shm_segsz;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user