This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[PATCH] Fix build on Solaris 2.5.1
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 30 Nov 2005 00:43:42 +0100
- Subject: [PATCH] Fix build on Solaris 2.5.1
Hi,
The jumbo patch
2005-11-21 Jakub Jelinek <jakub@redhat.com>
PR fortran/24774
PR fortran/14943
PR fortran/21647
* Makefile.am (AM_CPPFLAGS): Add gcc directories as -I paths,
add -D_GNU_SOURCE.
[...]
has broken the build on SPARC/Solaris 2.5.1 because io/io.h now includes
gthr.h, which pulls <pthread.h>. The problem is that the latter header file
defines uint8_t, uint32_t and uint64_t (and only those, not the full C99 set)
so they conflict with the last chance definitions in libgfortran.h...
I appreciate that this somehow amounts to kludging kludges :-), but the
Fortran compiler is clean on this platform _when it builds_ so I think it's
worth the ugliness.
Tested on SPARC/Solaris 2.5.1, OK for mainline and 4.1 branch?
2005-11-29 Eric Botcazou <ebotcazou@libertysurf.fr>
* libgfortran.h (ILP32 typedefs): Define _UINT8_T, _UINT32_T and
_UINT64_T on Solaris.
--
Eric Botcazou
Index: libgfortran.h
===================================================================
--- libgfortran.h (revision 107650)
+++ libgfortran.h (working copy)
@@ -65,9 +65,18 @@ typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
+#if defined(__sun) && defined(__svr4__)
+#define _UINT8_T
+#endif
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
+#if defined(__sun) && defined(__svr4__)
+#define _UINT32_T
+#endif
typedef unsigned long long uint64_t;
+#if defined(__sun) && defined(__svr4__)
+#define _UINT64_T
+#endif
#endif
#if HAVE_SYS_TYPES_H