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

PATCH: Fix Ada bootstrap on Tru64 UNIX


When I tried to bootstrap current mainline on alpha-dec-osf5.1b, I failed
in two different places:

/vol/gcc/src/gcc-dist/gcc/ada/env.c: In function '__gnat_unsetenv':
/vol/gcc/src/gcc-dist/gcc/ada/env.c:269:3: error: implicit declaration of function 'unsetenv'

Tru64 UNIX lacks unsetenv, so we need the replacement.

/vol/gcc/src/gcc-dist/gcc/ada/init.c: In function '__gnat_error_handler':
/vol/gcc/src/gcc-dist/gcc/ada/init.c:377:3: error: cast discards qualifiers from pointer target type

The following trivial patch fixes both issues and allows the bootstrap to
continue into stage2.

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Mon Jul 27 16:02:47 2009  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* init.c [__alpha__ && __osf__] (__gnat_error_handler): Cast msg
	to const char *.

	* env.c (__gnat_unsetenv) [__alpha__ && __osf__]: Use replacement.

Index: gcc/ada/env.c
===================================================================
--- gcc/ada/env.c	(revision 150108)
+++ gcc/ada/env.c	(working copy)
@@ -218,6 +218,7 @@ void __gnat_unsetenv (char *name) {
 #elif defined (__hpux__) || defined (sun) \
      || (defined (__mips) && defined (__sgi)) \
      || (defined (__vxworks) && ! defined (__RTP__)) \
+     || (defined (__alpha__) && defined (__osf__)) \
      || defined (_AIX) || defined (__Lynx__)
 
   /* On Solaris, HP-UX and IRIX there is no function to clear an environment
Index: gcc/ada/init.c
===================================================================
--- gcc/ada/init.c	(revision 150108)
+++ gcc/ada/init.c	(working copy)
@@ -374,7 +374,7 @@ __gnat_error_handler
     }
 
   recurse = 0;
-  Raise_From_Signal_Handler (exception, (char *) msg);
+  Raise_From_Signal_Handler (exception, (const char *) msg);
 }
 
 void


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