diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-16 12:21:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-16 12:21:10 +0000 |
commit | 920e81b88b1b92be9746a2ab36dea4fce7157c1a (patch) | |
tree | 29fdbdfcbf397675f40f0b6f3e25fe8e9f03d2a2 /gcc/ada/s-oscons-tmplt.c | |
parent | 08429a60125ca7b8c59d2db6893bbb0785dd9608 (diff) | |
download | gcc-920e81b88b1b92be9746a2ab36dea4fce7157c1a.tar.gz |
2009-09-16 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c (Target_OS, Target_Name): New constants.
* g-expect.adb (Set_Up_Child_Communications): Use
System.OS_Constants.Target_OS to determine whether running on Windows.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-oscons-tmplt.c')
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index c4218c2ab78..a2ae16e35c3 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -175,6 +175,9 @@ int counter = 0; #endif +#define STR(x) STR1(x) +#define STR1(x) #x + #ifdef __MINGW32__ unsigned int _CRT_fmode = _O_BINARY; #endif @@ -218,6 +221,25 @@ package System.OS_Constants is /* + ----------------------------- + -- Platform identification -- + ----------------------------- + +*/ +TXT(" Target_Name : constant String := " STR(TARGET) ";") +/* + type Target_OS_Type is (Windows, VMS, Other_OS); +*/ +#if defined (__MINGW32__) +# define TARGET_OS Windows +#elif defined (__VMS) +# define TARGET_OS VMS +#else +# define TARGET_OS Other_OS +#endif +TXT(" Target_OS : constant Target_OS_Type := " STR(TARGET_OS) ";") +/* + ------------------- -- System limits -- ------------------- |