[PATCH] PR ada/27366: Fix ada bootstrap on cygwin

Billinghurst, David (CALCRTS) david.billinghurst@comalco.riotinto.com.au
Tue May 2 04:03:00 GMT 2006


cygwin does not have the clearenv function, so ada compliation dies in ada/env.c. 
This patch uses the code path in __gnat_clearenv to emulate clearenv with unsetenv.
Tested on i686-pc-cygwin.  Acats results are not too bad, although cxg2014 had to
be killed manually.


                === acats Summary ===
# of expected passes            1924
# of unexpected failures        37
# of unsupported tests          356
*** FAILURES: c23003b c23003g c23003i c35507m c62003a c62003b c64103e c64103fc6
4104i c64104j c64104k c64104l c64104m c64104n c96005d cb4001a cc3017c cc3120acd
2a23e cdd2a02 cxg2002 cxg2003 cxg2004 cxg2006 cxg2007 cxg2010 cxg2011 cxg2012cx
g2013 cxg2014 cxg2015 cxg2016 cxg2017 cxg2018 cxg2019 cxg2020 cxg2021 

2006-01-05  David Billinghurst (David.Billinghurst@riotinto.com)

	PR ada/27366
	* ada/env.c (__gnat_clearenv): Use unsetenv() to clear environment 
	on Cygwin.

Index: env.c
===================================================================
--- env.c       (revision 113408)
+++ env.c       (working copy)
@@ -288,7 +288,7 @@
     index++;
   }
 #elif defined (__MINGW32__) || defined (__FreeBSD__) || defined (__APPLE__) \
-   || (defined (__vxworks) && defined (__RTP__))
+   || (defined (__vxworks) && defined (__RTP__)) || defined (__CYGWIN__)
   /* On Windows, FreeBSD and MacOS there is no function to clean all the
      environment but there is a "clean" way to unset a variable. So go
      through the environ table and call __gnat_unsetenv on all entries */


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.



More information about the Gcc-patches mailing list