diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 15:46:16 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 15:46:16 +0200 |
commit | 97ed5872c6629a96fcc4b4ff4ccaca41950ae26c (patch) | |
tree | 3dba7c34a2887ecbc914d830d047ba0a816c8d6b /gcc/ada/env.c | |
parent | 9aff36e9f183e2f4590a9e03d79ee1e3d21724a2 (diff) | |
download | gcc-97ed5872c6629a96fcc4b4ff4ccaca41950ae26c.zip gcc-97ed5872c6629a96fcc4b4ff4ccaca41950ae26c.tar.gz gcc-97ed5872c6629a96fcc4b4ff4ccaca41950ae26c.tar.bz2 |
[multiple changes]
2011-08-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb: (Check_Private_Overriding): better error message,
suggested by AI95-0068.
2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
the two potential initialization calls. This accounts for any
access-before-elaboration checks which may precede the initialization
calls.
(Next_Suitable_Statement): New routine. Returns the next real statement
after the input node while skipping generated checks.
* sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
with comment on usage.
Do not generate Elaborate_All when the trigger is a finalization call
coming from a type init proc.
(Check_Elab_Call): Propagate the initialization procedure context to
subsequent calls to Check_A_Call.
(Check_Internal_Call_Continue): Propagate the initialization procedure
context to subsequent calls to Check_Elab_Call.
(Is_Finalization_Procedure): New routine. Returns True if the input
entity denotes a [Deep_]Finalize routine.
* sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
along with comment on usage.
2011-08-05 Vadim Godunko <godunko@adacore.com>
* s-atocou.ads: Add list of supported platforms.
2011-08-05 Yannick Moy <moy@adacore.com>
* sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
* opt.ads (Disable_ALI_File): new Boolean flag
* lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2011-08-05 Ed Falis <falis@adacore.com>
* env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
environ is properly defined.
2011-08-05 Vincent Celier <celier@adacore.com>
* make.adb (Compilation_Phase): Exit immediately when all objects have
been found up to date, to avoid multiple exit messages.
* prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
same project for languages with no compiler.
* gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
-eI.
From-SVN: r177434
Diffstat (limited to 'gcc/ada/env.c')
-rw-r--r-- | gcc/ada/env.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/gcc/ada/env.c b/gcc/ada/env.c index c58139a..9d7301f 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -56,10 +56,25 @@ extern "C" { #include <stdlib.h> #endif -#if defined (__vxworks) \ - && ! (defined (__RTP__) || defined (__COREOS__) || defined (__VXWORKSMILS__)) -#include "envLib.h" -extern char** ppGlobalEnviron; +#if defined (__vxworks) + #if defined (__RTP__) + /* On VxWorks 6 Real-Time process mode, environ is defined in unistd.h. */ + #include <unistd.h> + #elif defined (VTHREADS) + /* VTHREADS mode applies to both VxWorks 653 and VxWorks MILS. The + inclusion of vThreadsData.h is necessary to workaround a bug with + envLib.h on VxWorks MILS. */ + #include <vThreadsData.h> + #include <envLib.h> + #else + /* This should work for kernel mode on both VxWorks 5 and VxWorks 6. */ + #include <envLib.h> + + /* In that mode environ is a macro which reference the following symbol. + As the symbol is not defined in any VxWorks include files we declare + it as extern. */ + extern char** ppGlobalEnviron; + #endif #endif /* We don't have libiberty, so use malloc. */ @@ -200,8 +215,7 @@ __gnat_setenv (char *name, char *value) char ** __gnat_environ (void) { -#if defined (VMS) || defined (RTX) \ - || (defined (VTHREADS) && ! defined (__VXWORKSMILS__)) +#if defined (VMS) || defined (RTX) /* Not implemented */ return NULL; #elif defined (__APPLE__) @@ -212,14 +226,10 @@ __gnat_environ (void) #elif defined (sun) extern char **_environ; return _environ; -#else -#if ! (defined (__vxworks) \ - && ! (defined (__RTP__) || defined (__COREOS__) \ - || defined (__VXWORKSMILS__))) - /* in VxWorks kernel mode environ is macro and not a variable */ - /* same thing on 653 in the CoreOS and for VxWorks MILS vThreads */ +#elif ! (defined (__vxworks)) extern char **environ; -#endif + return environ; +#else return environ; #endif } |