diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-09-05 09:49:24 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-09-05 09:49:24 +0200 |
commit | b9260c3d60418dd0e549bbdb69c8f696a76d5106 (patch) | |
tree | a091e4233d93343ea43e47ffdbf8c63f0f990846 /gcc/ada/adaint.c | |
parent | 920c9376df4cbfabe61991fe2d8857cb6be0bc19 (diff) | |
download | gcc-b9260c3d60418dd0e549bbdb69c8f696a76d5106.zip gcc-b9260c3d60418dd0e549bbdb69c8f696a76d5106.tar.gz gcc-b9260c3d60418dd0e549bbdb69c8f696a76d5106.tar.bz2 |
s-taprop-vxworks.adb: Move with clauses outside Warnings Off now that dependent units are Preelaborate.
2005-09-01 Arnaud Charlet <charlet@adacore.com>
Jose Ruiz <ruiz@adacore.com>
* s-taprop-vxworks.adb:
Move with clauses outside Warnings Off now that dependent units are
Preelaborate.
(Initialize): Call Interrupt_Managemeent.Initialize to ensure proper
initialization of this unit.
(Specific): Add new procedures Initialize and Delete so that this
package can be used for VxWorks 5.x and 6.x
(ATCB_Key, ATCB_Key_Address): Moved to Specific package body to hide
differences between VxWorks 5.x and 6.x
Minor reformatting.
(Timed_Delay): Remove calls to Defer/Undefer_Abort, now performed by
caller.
Use only Preelaborate-compatible constructs.
* s-tpopsp-vxworks.adb (ATBC_Key, ATCB_Key_Addr): Moved from
Primitives.Operations.
(Delete, Initialize): New procedures.
* s-osinte-vxworks.adb: Body used to handle differences between
VxWorks 5.x and 6.x
(kill, Set_Time_Slice, VX_FP_TASK): New functions.
* s-osinte-vxworks.ads: Minor reformatting.
Add VxWworks 6.x specific functions (only called from VxWorks 6 files).
(VX_FP_TASK): Now a function, to handle differences between VxWorks 5
and 6.
(Set_Time_Slice): New function, replacing kerneltimeSlice to share code
between Vxworks 5 and 6.
(taskLock, taskUnlock): Removeed, no longer used.
* adaint.c: The wait.h header is not located in the sys directory on
VxWorks when using RTPs.
(__gnat_set_env_value): Use setenv instead of putenv on VxWorks when
using RTPs.
(__gnat_dup): dup is available on Vxworks when using RTPs.
(__gnat_dup2): dup2 is available on Vxworks when using RTPs.
* cal.c: Use the header time.h for Vxworks 6.0 when using RTPs.
* expect.c: The wait.h header is not located in the sys directory on
VxWorks when using RTPs.
From-SVN: r103852
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index d5543b9..65fa75b 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -89,6 +89,8 @@ #if OLD_MINGW #include <sys/wait.h> #endif +#elif defined (__vxworks) && defined (__RTP__) +#include <wait.h> #else #include <sys/wait.h> #endif @@ -1332,6 +1334,9 @@ __gnat_set_env_value (char *name, char *value) LIB$SIGNAL (status); } +#elif defined (__vxworks) && defined (__RTP__) + setenv (name, value, 1); + #else int size = strlen (name) + strlen (value) + 2; char *expression; @@ -1638,11 +1643,12 @@ __gnat_portable_spawn (char *args[]) int __gnat_dup (int oldfd) { -#if defined (__vxworks) - /* Not supported on VxWorks. */ - return -1; +#if defined (__vxworks) && !defined (__RTP__) + /* Not supported on VxWorks 5.x, but supported on VxWorks 6.0 when using + RTPs. */ + return -1; #else - return dup (oldfd); + return dup (oldfd); #endif } @@ -1652,8 +1658,9 @@ __gnat_dup (int oldfd) int __gnat_dup2 (int oldfd, int newfd) { -#if defined (__vxworks) - /* Not supported on VxWorks. */ +#if defined (__vxworks) && !defined (__RTP__) + /* Not supported on VxWorks 5.x, but supported on VxWorks 6.0 when using + RTPs. */ return -1; #else return dup2 (oldfd, newfd); |