This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Fix build problem on Solaris 2.5.1


Hello,

Modulo http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01746.html, there is one 
remaining problem that prevents libgcj from building again on Solaris 2.5.1 
(it builds fine in all 3.x versions on sparc-sun-solaris2.5.1): zlib now uses 
vsnprintf, which is not available on Solaris 2.5.1 (it was introduced in 
Solaris 2.6).

So I need something like the following patch.  Is it good enough?
Tested on sparc-sun-solaris2.5.1 (and verified on Solaris 2.6, 7, 8 and 9).


2004-11-22  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* zconf.h: Define NO_vsnprintf on Solaris 2.5.1.


-- 
Eric Botcazou
Index: zconf.h
===================================================================
RCS file: /cvs/gcc/gcc/zlib/zconf.h,v
retrieving revision 1.5
diff -u -p -r1.5 zconf.h
--- zconf.h	11 Oct 2004 18:45:38 -0000	1.5
+++ zconf.h	22 Nov 2004 09:24:54 -0000
@@ -320,4 +320,12 @@ typedef uLong FAR uLongf;
 #   pragma map(inflate_copyright,"INCOPY")
 #endif
 
+/* Solaris 2.5.1 doesn't have vsnprintf */
+#if defined(__sun) && defined(__svr4__)
+#include <sys/feature_tests.h>
+#if _XOPEN_VERSION < 3
+#define NO_vsnprintf
+#endif
+#endif
+
 #endif /* ZCONF_H */

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