This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: fix some minor problems in last checkin for BP case


For the BP compiles, I had a couple problems with the last checkin, so
I committed this fix:

2000-07-26  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.

Index: sysdeps/generic/bp-checks.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/bp-checks.h,v
retrieving revision 1.4
diff -u -p -r1.4 bp-checks.h
--- bp-checks.h	2000/07/26 18:21:14	1.4
+++ bp-checks.h	2000/07/27 07:18:08
@@ -92,7 +92,7 @@ extern void *__unbounded __ubp_memchr (c
 
 /* 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_; })
Index: sysdeps/generic/bp-semctl.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/bp-semctl.h,v
retrieving revision 1.1
diff -u -p -r1.1 bp-semctl.h
--- bp-semctl.h	2000/07/27 06:25:28	1.1
+++ bp-semctl.h	2000/07/27 07:18:08
@@ -43,12 +43,12 @@ check_semctl (union semun *arg, int semi
     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;
Index: sysdeps/unix/sysv/linux/shmat.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/shmat.c,v
retrieving revision 1.10
diff -u -p -r1.10 shmat.c
--- shmat.c	2000/07/27 06:13:08	1.10
+++ shmat.c	2000/07/27 07:18:08
@@ -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
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]