This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/15194] [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  <>

	* Add check for long long.
	* jartool.h: Check for long long before using it.
	* configure: Regenerate
	* Regenerate.

diff -prud /home/kcook34/gcc-orig/fastjar/ ./
--- /home/kcook34/gcc-orig/fastjar/	2004-04-12 16:29:49.000000000 -0400
+++ ./	2004-06-25 10:41:12.919581100 -0400
@@ -39,7 +39,7 @@ AC_COMPILE_CHECK_SIZEOF(char)
+AC_CHECK_TYPES([long long],[AC_COMPILE_CHECK_SIZEOF(long long)])
 dnl Check byte order
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;
 typedef u_int32_t ub4;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]