diff --git a/ChangeLog b/ChangeLog index 2d80a849b6..4a0ec36344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2003-09-08 Jakub Jelinek + + * sysdeps/generic/bits/types.h (__quad_t): Make long int if 64-bit. + (__u_quad_t): Make unsigned long int if 64-bit. + (__SQUAD_TYPE): Make long int if 64-bit. + (__UQUAD_TYPE): Make unsigned long int if 64-bit. + * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove. + +2003-09-08 Ulrich Drepper + + * Makefile (tests): Run check-c++-types.sh if possible. + * scripts/check-c++-types.h: New file. + * scripts/data/c++-ctypes-i386-linux-gnu.data: New file. + 2003-09-08 Andreas Jaeger * sysdeps/unix/sysv/linux/x86_64/register-dump.h (register_dump): @@ -12,8 +26,7 @@ 2003-09-08 Wolfram Gloger * malloc/malloc.c (sYSMALLOc): Move foreign sbrk accounting into - contiguous case. Bug report from Prem Gopalan - . + contiguous case. Bug report from Prem Gopalan . (mALLOPt): Avoid requirement of C99. 2003-09-08 Ulrich Drepper diff --git a/Makefile b/Makefile index 2f4930d02b..23e8b2fcb9 100644 --- a/Makefile +++ b/Makefile @@ -228,6 +228,16 @@ mostlyclean: parent-mostlyclean tests-clean: @$(MAKE) subdir_testclean no_deps=t +tests: $(objpfx)c++-types-check.out +ifneq (no,$(CXX)$(wildcard scripts/data/c++-types-$(base-machine)-$(config-os).data)) +$(objpfx)c++-types-check.out: scripts/data/c++-types-$(base-machine)-$(config-os).data + scripts/check-c++-types.sh $^ $(CXX) $(filter-out -std=gnu99,$(CFLAGS)) $(CPPFLAGS) > $@ +else +$(objpfx)c++-types-check.out: + @echo 'WARNING C++ tests not run; create a c++-types-XXX file' + @echo "not run" > $@ +endif + # The realclean target is just like distclean for the parent, but we want # the subdirs to know the difference in case they care. realclean distclean: parent-clean @@ -286,6 +296,7 @@ distribute := README README.libm INSTALL FAQ FAQ.in NOTES NEWS BUGS \ merge-abilist.awk extract-abilist.awk \ rpm2dynsym.sh \ ) \ + $(wildcard scripts/data/*.data) \ $(wildcard abilist/*.abilist) distribute := $(strip $(distribute)) diff --git a/bits/types.h b/bits/types.h index 59b85acf8c..8abea03f57 100644 --- a/bits/types.h +++ b/bits/types.h @@ -51,14 +51,13 @@ __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; #endif -/* quad_t is also 64 bits, but is traditionally defined as `long long' - even when `long' is also 64 bits. */ -#ifdef __GLIBC_HAVE_LONG_LONG -__extension__ typedef long long int __quad_t; -__extension__ typedef unsigned long long int __u_quad_t; -#elif __WORDSIZE == 64 +/* quad_t is also 64 bits. */ +#if __WORDSIZE == 64 typedef long int __quad_t; typedef unsigned long int __u_quad_t; +#elif defined __GLIBC_HAVE_LONG_LONG +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; #else typedef struct { @@ -106,9 +105,9 @@ typedef struct #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int -#define __SQUAD_TYPE long long int -#define __UQUAD_TYPE unsigned long long int #if __WORDSIZE == 32 +# define __SQUAD_TYPE long long int +# define __UQUAD_TYPE unsigned long long int # define __SWORD_TYPE int # define __UWORD_TYPE unsigned int # define __SLONG32_TYPE long int @@ -116,6 +115,8 @@ typedef struct # define __S64_TYPE __quad_t # define __U64_TYPE __u_quad_t #elif __WORDSIZE == 64 +# define __SQUAD_TYPE long int +# define __UQUAD_TYPE unsigned long int # define __SWORD_TYPE long int # define __UWORD_TYPE unsigned long int # define __SLONG32_TYPE int diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 6a1143a708..05dba57b7c 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,7 @@ +2003-09-08 Jakub Jelinek + + * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove. + 2003-09-02 Jakub Jelinek * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file. diff --git a/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h deleted file mode 100644 index 9a1953ea78..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h +++ /dev/null @@ -1,66 +0,0 @@ -/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version. - Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _BITS_TYPES_H -# error "Never include directly; use instead." -#endif - -#ifndef _BITS_TYPESIZES_H -#define _BITS_TYPESIZES_H 1 - -/* See for the meaning of these macros. This file exists so - that need not vary across different GNU platforms. */ - -#define __DEV_T_TYPE __UQUAD_TYPE -#define __UID_T_TYPE __U32_TYPE -#define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __ULONGWORD_TYPE -#define __INO64_T_TYPE __UQUAD_TYPE -#define __MODE_T_TYPE __U32_TYPE -#define __NLINK_T_TYPE __UWORD_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE -#define __OFF64_T_TYPE __SQUAD_TYPE -#define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE -#define __RLIM64_T_TYPE __UQUAD_TYPE -#define __BLKCNT_T_TYPE __SLONGWORD_TYPE -#define __BLKCNT64_T_TYPE __SQUAD_TYPE -#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE -#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE -#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE -#define __FSFILCNT64_T_TYPE __UQUAD_TYPE -#define __ID_T_TYPE __U32_TYPE -#define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE -#define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE -#define __DADDR_T_TYPE __S32_TYPE -#define __SWBLK_T_TYPE __SLONGWORD_TYPE -#define __KEY_T_TYPE __S32_TYPE -#define __CLOCKID_T_TYPE __S32_TYPE -#define __TIMER_T_TYPE __S32_TYPE -#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE -#define __FSID_T_TYPE struct { int __val[2]; } -#define __SSIZE_T_TYPE __SLONGWORD_TYPE - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -#endif /* bits/typesizes.h */ diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 54593f81e7..0b16c02fa9 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,15 @@ +2003-09-08 Ulrich Drepper + + * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type + of pthread_t to be compatible with LT. + * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise. + 2003-09-04 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define. diff --git a/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h index bd5ab9706c..2d8a00b93f 100644 --- a/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h @@ -33,7 +33,7 @@ /* Thread identifiers. The structure of the attribute type is deliberately not exposed. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h index a098106629..e31c27da22 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h @@ -33,7 +33,7 @@ /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union @@ -80,6 +80,7 @@ typedef union unsigned long long int __wakeup_seq; unsigned long long int __woken_seq; void *__mutex; + int __locker; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; long long int __align; diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h index c1eca62be7..6cd6c05705 100644 --- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h @@ -33,7 +33,7 @@ /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index f827b3098d..2d98a80e36 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -48,7 +48,7 @@ /* Thread identifiers. The structure of the attribute type is deliberately not exposed. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h index 2d37683ee2..022ba4982b 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h @@ -47,7 +47,7 @@ /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h index 8236fd724a..3cd84864f4 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h @@ -34,7 +34,7 @@ /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h index 0560689a86..b947439e34 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h @@ -48,7 +48,7 @@ /* Thread identifiers. The structure of the attribute type is deliberately not exposed. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h index ed3050e636..3f151d04ed 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h @@ -33,7 +33,7 @@ /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ -typedef struct __opaque_pthread *pthread_t; +typedef unsigned long int pthread_t; typedef union diff --git a/scripts/check-c++-types.sh b/scripts/check-c++-types.sh index 68af8091b2..1992705e0f 100755 --- a/scripts/check-c++-types.sh +++ b/scripts/check-c++-types.sh @@ -30,8 +30,9 @@ # egrep -v '^_' | # sort -u # -cxx=$1 -data=$2 +data=$1 +shift +cxx="$*" while read t; do echo -n "$t:" $cxx -S -xc++ -o - -D_GNU_SOURCE <(cat < directly; use instead." -#endif - -#ifndef _BITS_TYPESIZES_H -#define _BITS_TYPESIZES_H 1 - -/* See for the meaning of these macros. This file exists so - that need not vary across different GNU platforms. */ - -#define __DEV_T_TYPE __UQUAD_TYPE -#define __UID_T_TYPE __U32_TYPE -#define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __ULONGWORD_TYPE -#define __INO64_T_TYPE __UQUAD_TYPE -#define __MODE_T_TYPE __U32_TYPE -#define __NLINK_T_TYPE __UWORD_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE -#define __OFF64_T_TYPE __SQUAD_TYPE -#define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE -#define __RLIM64_T_TYPE __UQUAD_TYPE -#define __BLKCNT_T_TYPE __SLONGWORD_TYPE -#define __BLKCNT64_T_TYPE __SQUAD_TYPE -#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE -#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE -#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE -#define __FSFILCNT64_T_TYPE __UQUAD_TYPE -#define __ID_T_TYPE __U32_TYPE -#define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE -#define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE -#define __DADDR_T_TYPE __S32_TYPE -#define __SWBLK_T_TYPE __SLONGWORD_TYPE -#define __KEY_T_TYPE __S32_TYPE -#define __CLOCKID_T_TYPE __S32_TYPE -#define __TIMER_T_TYPE void * -#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE -#define __FSID_T_TYPE struct { int __val[2]; } -#define __SSIZE_T_TYPE __SLONGWORD_TYPE - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -#endif /* bits/typesizes.h */