This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
Re: struct stat
OK. How about this patch? The alpha, sparc, and mips, and solaris2
ports need to follow.
I haven't tested it yet, since it doesn't actually change anything on
my system (I only have gcc).
Compilers that don't support __extension__ should #define it to empty
(or, better yet, just ignore it as a token, then they do support it).
Compilers that don't support 'long long' should #define
__NO_LONG_LONG.
--
Geoffrey Keating <geoffk@ozemail.com.au>
===File ~/patches/glibc-48.diff=============================
1999-03-16 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/unix/sysv/linux/bits/types.h: Add a new type,
__arith64_t, which is a 64-bit arithmetic type (that is, it's 8
bytes long). Change the guard on 'long long' uses to be
!__NO_LONG_LONG rather than __GNUC__.
--- sysdeps/unix/sysv/linux/bits/types.h~ Fri Feb 12 06:57:23 1999
+++ sysdeps/unix/sysv/linux/bits/types.h Tue Mar 16 14:25:03 1999
@@ -33,7 +33,7 @@
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
-#ifdef __GNUC__
+#ifndef __NO_LONG_LONG
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
#else
@@ -52,13 +52,18 @@
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
-#ifdef __GNUC__
+#ifndef __NO_LONG_LONG
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
+/* __arith64_t is an 8-byte-long type that needs at least as much
+ alignment as 'unsigned long long' does. */
+__extension__ typedef unsigned long long int __arith64_t;
+#else
+typedef double __arith64_t;
#endif
-typedef __quad_t *__qaddr_t;
+typedef __arith64_t *__qaddr_t;
-typedef __u_quad_t __dev_t; /* Type of device numbers. */
+typedef __arith64_t __dev_t; /* Type of device numbers. */
typedef __u_int __uid_t; /* Type of user identifications. */
typedef __u_int __gid_t; /* Type of group identifications. */
typedef __u_long __ino_t; /* Type of file serial numbers. */
============================================================