[PATCH] Fix libdecnumber compilation on Tru64

Roger Sayle roger@eyesopen.com
Mon Dec 19 20:39:00 GMT 2005


Hi Ben,

The following patch allows libdecnumber to be built on Tru64, which
allows a GCC bootstrap on alphaev67-dec-osf5.1 to proceed further.
The problem is that Tru64 doesn't have a <stdint.h>, instead placing
the definitions of int32_t and friends in the file <inttypes.h>.
Fortunately, libdecnumber's configure script already tests for the
existence of this header.  I'm perhaps being overly cautious by only
including this file if !HAVE_STDINT_H, but this seems safer.

Tested by building libdecnumber on alphaev67-dec-osf5.1.
Ok for mainline?


2005-12-19  Roger Sayle  <roger@eyesopen.com>

	* decContext.h: If <stdint.h> isn't available, try including
	<inttypes.h> to declare int32_t and friends.


Index: decContext.h
===================================================================
--- decContext.h	(revision 108807)
+++ decContext.h	(working copy)
@@ -42,7 +42,12 @@

 #ifdef HAVE_STDINT_H
 #include <stdint.h>		/* C99 standard integers */
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
 #endif
+#endif
+
 #include <signal.h>		/* for traps */


Roger
--



More information about the Gcc-patches mailing list