This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/15194] [3.3/3.4/3.5 Regression] Fastjar configure needlessly fails without long long
- From: "kcook at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2004 15:31:06 -0000
- Subject: [Bug other/15194] [3.3/3.4/3.5 Regression] Fastjar configure needlessly fails without long long
- References: <20040428233835.15194.jones@ingate.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kcook at gcc dot gnu dot org 2004-06-25 15:31 -------
Subject: [fastjar] Check for "long long" before using it
This trivial patch should fix PR/15194, which was a regression from 3.2
present on 3.[345].
It was bootstrapped (with no object code changes) on i686-pc-cygwin.
Unfortunately, I do not have ready access to a compiler without long
long support, so I cannot absolutely verify does fix the reporter's bug;
though, clearly, it cannot make things worse.
OK to install?
As an aside, I've come to believe that it would be appropriate to
arrange for the toplevel Makefile so that, unless requested with a
--without-system-jar, when bootstrapping only compile fastjar for the
*build* system if there is not already a suitable "jar" present. I
think that it currently gets built and goes unused.
Clearly in a cross compile you would need to build fastjar for the host
system.
I'll think through the logic of that over the weekend, but any comments
from the build experts would be welcome.
Kelley Cook
2004-06-25 Kelley Cook <kcook@gcc.gnu.org>
* configure.ac: Add check for long long.
* jartool.h: Check for long long before using it.
* configure: Regenerate
* config.h.in: Regenerate.
diff -prud /home/kcook34/gcc-orig/fastjar/configure.ac ./configure.ac
--- /home/kcook34/gcc-orig/fastjar/configure.ac 2004-04-12 16:29:49.000000000 -0400
+++ ./configure.ac 2004-06-25 10:41:12.919581100 -0400
@@ -39,7 +39,7 @@ AC_COMPILE_CHECK_SIZEOF(char)
AC_COMPILE_CHECK_SIZEOF(short)
AC_COMPILE_CHECK_SIZEOF(int)
AC_COMPILE_CHECK_SIZEOF(long)
-AC_COMPILE_CHECK_SIZEOF(long long)
+AC_CHECK_TYPES([long long],[AC_COMPILE_CHECK_SIZEOF(long long)])
dnl Check byte order
AC_C_BIGENDIAN_CROSS
diff -prud /home/kcook34/gcc-orig/fastjar/jartool.h ./jartool.h
--- /home/kcook34/gcc-orig/fastjar/jartool.h 2000-12-08 22:08:23.000000000 -0500
+++ ./jartool.h 2004-06-25 10:49:06.742005100 -0400
@@ -90,7 +90,7 @@ typedef u_int16_t ub2;
typedef unsigned int ub4;
#elif SIZEOF_LONG == 4
typedef unsigned long ub4;
-#elif SIZEOF_LONG_LONG == 4
+#elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 4
typedef unsigned long long ub4;
#else
typedef u_int32_t ub4;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15194