This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Patch for 'long long' in preprocessor.
- To: egcs-patches@cygnus.com
- Subject: Patch for 'long long' in preprocessor.
- From: Geoff Keating <geoffk@ozemail.com.au>
- Date: Wed, 10 Feb 1999 13:01:37 +1100
- CC: libc-hacker@cygnus.com
I have not tested this patch, because on my system it is not
needed---although it does at least compile.
A similar thing should be done for cppexp.c, but (at least for the
version in egcs 1.1.1) it also needs to have parse_number changed to
be the same as in cexp.c.
This causes glibc 2.1 to build improperly if it is built under an egcs
compiled under glibc 2.0.
--
Geoffrey Keating <geoffk@ozemail.com.au>
===File ~/patches/egcs-12.diff==============================
Wed Feb 10 12:54:46 1999 Geoff Keating <geoffk@ozemail.com.au>
* cexp.c [!HAVE_INTTYPES_H]: Use 'long long' for HOST_WIDE_INT
if gcc is building itself.
--- gcc/cexp.y~ Thu May 7 21:44:02 1998
+++ gcc/cexp.y Wed Feb 10 12:56:56 1999
@@ -65,14 +65,18 @@
# define HOST_WIDE_INT intmax_t
# define unsigned_HOST_WIDE_INT uintmax_t
# else
-# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
-# define HOST_WIDE_INT int
-# else
-# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG || ! (defined LONG_LONG_MAX || defined LLONG_MAX))
-# define HOST_WIDE_INT long
-# else
+# if defined(__GNUC__)
# define HOST_WIDE_INT long long
-# endif
+# else
+# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT)
+# define HOST_WIDE_INT int
+# else
+# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG || ! (defined LONG_LONG_MAX || defined LLONG_MAX))
+# define HOST_WIDE_INT long
+# else
+# define HOST_WIDE_INT long long
+# endif
+# endif
# endif
# endif
#endif
============================================================