aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-07-28 22:29:47 +0000
committerRoland McGrath <roland@gnu.org>2003-07-28 22:29:47 +0000
commitbba446f7e9eb56a9117af5423b872f5de42e4740 (patch)
tree9ba5107b97f11e4480bda9e88a3ff9d5914e753e
parent23195635ae74449727f8c07469b347bf884a37fa (diff)
downloadglibc-bba446f7e9eb56a9117af5423b872f5de42e4740.zip
glibc-bba446f7e9eb56a9117af5423b872f5de42e4740.tar.gz
glibc-bba446f7e9eb56a9117af5423b872f5de42e4740.tar.bz2
* sysdeps/generic/bits/types.h (__STD_TYPE): New macro.
Use that instead of `typedef' when using __*_TYPE macros in rhs.
-rw-r--r--ChangeLog3
-rw-r--r--bits/types.h76
-rw-r--r--sysdeps/generic/bits/types.h76
3 files changed, 85 insertions, 70 deletions
diff --git a/ChangeLog b/ChangeLog
index 6230ebe..e9910fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2003-07-28 Roland McGrath <roland@redhat.com>
+ * sysdeps/generic/bits/types.h (__STD_TYPE): New macro.
+ Use that instead of `typedef' when using __*_TYPE macros in rhs.
+
* elf/tst-tls14.c [USE_TLS && HAVE___THREAD]: Conditionalize on this.
* elf/tst-tlsmod14a.c: Likewise.
diff --git a/bits/types.h b/bits/types.h
index cb2802e..3d3bd77 100644
--- a/bits/types.h
+++ b/bits/types.h
@@ -127,66 +127,72 @@ typedef struct
#endif
#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
-
-typedef __DEV_T_TYPE __dev_t; /* Type of device numbers. */
-typedef __UID_T_TYPE __uid_t; /* Type of user identifications. */
-typedef __GID_T_TYPE __gid_t; /* Type of group identifications. */
-typedef __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
-typedef __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS). */
-typedef __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
-typedef __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
-typedef __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
-typedef __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
-typedef __PID_T_TYPE __pid_t; /* Type of process identifications. */
-typedef __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
-typedef __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
-typedef __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
-typedef __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
-typedef __ID_T_TYPE __id_t; /* General type for IDs. */
-typedef __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
-typedef __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
-typedef __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
-
-typedef __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
-typedef __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
-typedef __KEY_T_TYPE __key_t; /* Type of an IPC key */
+/* We want __extension__ before typedef's that use nonstandard base types
+ such as `long long' in C89 mode. */
+#define __STD_TYPE __extension__ typedef
+
+
+__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
+__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
+__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
+__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
+__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
+__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
+__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
+__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
+__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
+__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
+__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
+__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
+__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
+__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
+__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
+__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
+__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
+__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
+
+__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
+__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
+__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
/* Clock ID used in clock and timer functions. */
-typedef __CLOCKID_T_TYPE __clockid_t;
+__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
/* Timer ID returned by `timer_create'. */
-typedef __TIMER_T_TYPE __timer_t;
+__STD_TYPE __TIMER_T_TYPE __timer_t;
/* Type to represent block size. */
-typedef __BLKSIZE_T_TYPE __blksize_t;
+__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
/* Types from the Large File Support interface. */
/* Type to count number of disk blocks. */
-typedef __BLKCNT_T_TYPE __blkcnt_t;
-typedef __BLKCNT64_T_TYPE __blkcnt64_t;
+__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
+__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
/* Type to count file system blocks. */
-typedef __FSBLKCNT_T_TYPE __fsblkcnt_t;
-typedef __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
+__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
+__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
/* Type to count file system nodes. */
-typedef __FSFILCNT_T_TYPE __fsfilcnt_t;
-typedef __FSFILCNT64_T_TYPE __fsfilcnt64_t;
+__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
+__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
/* These few don't really vary by system, they always correspond
to one of the other defined types. */
-typedef __SWORD_TYPE __ssize_t; /* Type of a byte count, or error. */
+__STD_TYPE __SWORD_TYPE __ssize_t; /* Type of a byte count, or error. */
typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
-typedef __SWORD_TYPE __intptr_t;
+__STD_TYPE __SWORD_TYPE __intptr_t;
/* Duplicate info from sys/socket.h. */
-typedef __U32_TYPE __socklen_t;
+__STD_TYPE __U32_TYPE __socklen_t;
+
+#undef __STD_TYPE
#endif /* bits/types.h */
diff --git a/sysdeps/generic/bits/types.h b/sysdeps/generic/bits/types.h
index cb2802e..3d3bd77 100644
--- a/sysdeps/generic/bits/types.h
+++ b/sysdeps/generic/bits/types.h
@@ -127,66 +127,72 @@ typedef struct
#endif
#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
-
-typedef __DEV_T_TYPE __dev_t; /* Type of device numbers. */
-typedef __UID_T_TYPE __uid_t; /* Type of user identifications. */
-typedef __GID_T_TYPE __gid_t; /* Type of group identifications. */
-typedef __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
-typedef __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS). */
-typedef __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
-typedef __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
-typedef __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
-typedef __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
-typedef __PID_T_TYPE __pid_t; /* Type of process identifications. */
-typedef __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
-typedef __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
-typedef __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
-typedef __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
-typedef __ID_T_TYPE __id_t; /* General type for IDs. */
-typedef __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
-typedef __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
-typedef __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
-
-typedef __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
-typedef __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
-typedef __KEY_T_TYPE __key_t; /* Type of an IPC key */
+/* We want __extension__ before typedef's that use nonstandard base types
+ such as `long long' in C89 mode. */
+#define __STD_TYPE __extension__ typedef
+
+
+__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
+__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
+__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
+__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
+__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
+__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
+__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
+__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
+__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
+__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
+__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
+__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
+__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
+__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
+__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
+__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
+__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
+__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
+
+__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
+__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
+__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
/* Clock ID used in clock and timer functions. */
-typedef __CLOCKID_T_TYPE __clockid_t;
+__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
/* Timer ID returned by `timer_create'. */
-typedef __TIMER_T_TYPE __timer_t;
+__STD_TYPE __TIMER_T_TYPE __timer_t;
/* Type to represent block size. */
-typedef __BLKSIZE_T_TYPE __blksize_t;
+__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
/* Types from the Large File Support interface. */
/* Type to count number of disk blocks. */
-typedef __BLKCNT_T_TYPE __blkcnt_t;
-typedef __BLKCNT64_T_TYPE __blkcnt64_t;
+__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
+__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
/* Type to count file system blocks. */
-typedef __FSBLKCNT_T_TYPE __fsblkcnt_t;
-typedef __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
+__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
+__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
/* Type to count file system nodes. */
-typedef __FSFILCNT_T_TYPE __fsfilcnt_t;
-typedef __FSFILCNT64_T_TYPE __fsfilcnt64_t;
+__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
+__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
/* These few don't really vary by system, they always correspond
to one of the other defined types. */
-typedef __SWORD_TYPE __ssize_t; /* Type of a byte count, or error. */
+__STD_TYPE __SWORD_TYPE __ssize_t; /* Type of a byte count, or error. */
typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
-typedef __SWORD_TYPE __intptr_t;
+__STD_TYPE __SWORD_TYPE __intptr_t;
/* Duplicate info from sys/socket.h. */
-typedef __U32_TYPE __socklen_t;
+__STD_TYPE __U32_TYPE __socklen_t;
+
+#undef __STD_TYPE
#endif /* bits/types.h */