diff options
author | Roland McGrath <roland@gnu.org> | 2005-12-06 01:38:34 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-12-06 01:38:34 +0000 |
commit | 2ce7e666e9f64730bdac1be1c7b43c2375d82826 (patch) | |
tree | 44573949c5a491a52c743d125574e9e27d550fa6 | |
parent | a6ba1c33efd5895cb35b0e68027b74786f161cfe (diff) | |
download | glibc-2ce7e666e9f64730bdac1be1c7b43c2375d82826.zip glibc-2ce7e666e9f64730bdac1be1c7b43c2375d82826.tar.gz glibc-2ce7e666e9f64730bdac1be1c7b43c2375d82826.tar.bz2 |
* sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor
protection and allow pthread.h to include bits/setjmp.h as well as
setjmp.h.
* sysdeps/m68k/bits/setjmp.h: Likewise.
* sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h
are allow to include bits/setjmp.h.
* sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs
cast of address.
* sysdeps/sh/bits/setjmp.h: Likewise.
2005-11-12 Jim Meyering <jim@meyering.net>
* sysdeps/unix/opendir.c (__alloc_dir): Declare STATP parameter
to be pointer to const.
* include/dirent.h: Update decl.
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | include/dirent.h | 2 | ||||
-rw-r--r-- | sysdeps/hppa/bits/setjmp.h | 6 | ||||
-rw-r--r-- | sysdeps/m68k/bits/setjmp.h | 6 | ||||
-rw-r--r-- | sysdeps/mips/bits/setjmp.h | 2 | ||||
-rw-r--r-- | sysdeps/s390/bits/setjmp.h | 4 | ||||
-rw-r--r-- | sysdeps/sh/bits/setjmp.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/opendir.c | 2 |
8 files changed, 36 insertions, 6 deletions
@@ -1,3 +1,21 @@ +2005-11-15 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor + protection and allow pthread.h to include bits/setjmp.h as well as + setjmp.h. + * sysdeps/m68k/bits/setjmp.h: Likewise. + * sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h + are allow to include bits/setjmp.h. + * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs + cast of address. + * sysdeps/sh/bits/setjmp.h: Likewise. + +2005-11-12 Jim Meyering <jim@meyering.net> + + * sysdeps/unix/opendir.c (__alloc_dir): Declare STATP parameter + to be pointer to const. + * include/dirent.h: Update decl. + 2005-12-05 Roland McGrath <roland@redhat.com> * hurd/hurdmalloc.c: Remove $ tag $ magic. diff --git a/include/dirent.h b/include/dirent.h index 4e95ffd..681024f 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -25,6 +25,6 @@ extern int __alphasort64 (const void *a, const void *b) __attribute_pure__; extern int __versionsort64 (const void *a, const void *b) __attribute_pure__; -extern DIR *__alloc_dir (int fd, bool close_fd, struct stat64 *statp) +extern DIR *__alloc_dir (int fd, bool close_fd, const struct stat64 *statp) internal_function; #endif diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h index 7fb2af7..4395b8f 100644 --- a/sysdeps/hppa/bits/setjmp.h +++ b/sysdeps/hppa/bits/setjmp.h @@ -17,8 +17,10 @@ 02111-1307 USA. */ /* Define the machine-dependent type `jmp_buf'. HPPA version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 -#ifndef _SETJMP_H +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif @@ -39,3 +41,5 @@ typedef double __jmp_buf[21]; variable at ADDRESS. */ #define _JMPBUF_UNWINDS(_jmpbuf, _address) \ ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP])) + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h index 2c2b3ee..193eec3 100644 --- a/sysdeps/m68k/bits/setjmp.h +++ b/sysdeps/m68k/bits/setjmp.h @@ -17,8 +17,10 @@ 02111-1307 USA. */ /* Define the machine-dependent type `jmp_buf'. m68k version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 -#ifndef _SETJMP_H +#if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif @@ -44,3 +46,5 @@ typedef struct containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf)->__sp) + +#endif /* bits/setjmp.h */ diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h index 2b42b22..74caae8 100644 --- a/sysdeps/mips/bits/setjmp.h +++ b/sysdeps/mips/bits/setjmp.h @@ -81,6 +81,6 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (jmpbuf)[0].__sp) + ((void *) (address) < (void *) (jmpbuf)[0].__sp) #endif /* _MIPS_BITS_SETJMP_H */ diff --git a/sysdeps/s390/bits/setjmp.h b/sysdeps/s390/bits/setjmp.h index 35bc9a5..4009514 100644 --- a/sysdeps/s390/bits/setjmp.h +++ b/sysdeps/s390/bits/setjmp.h @@ -21,6 +21,10 @@ #ifndef __S390_SETJMP_H__ #define __S390_SETJMP_H__ +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." +#endif + #include <bits/wordsize.h> #define __JB_GPR6 0 diff --git a/sysdeps/sh/bits/setjmp.h b/sysdeps/sh/bits/setjmp.h index d92feea..242720c 100644 --- a/sysdeps/sh/bits/setjmp.h +++ b/sysdeps/sh/bits/setjmp.h @@ -51,6 +51,6 @@ typedef struct /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (jmpbuf)[0].__regs[7]) + ((void *) (address) < (void *) (jmpbuf)[0].__regs[7]) #endif /* bits/setjmp.h */ diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c index 98fb4ca..6aa738f 100644 --- a/sysdeps/unix/opendir.c +++ b/sysdeps/unix/opendir.c @@ -139,7 +139,7 @@ weak_alias (__opendir, opendir) DIR * internal_function -__alloc_dir (int fd, bool close_fd, struct stat64 *statp) +__alloc_dir (int fd, bool close_fd, const struct stat64 *statp) { if (__builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0) goto lose; |