summaryrefslogtreecommitdiff
path: root/gcc/ada/g-expect.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-16 12:21:10 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-16 12:21:10 +0000
commit920e81b88b1b92be9746a2ab36dea4fce7157c1a (patch)
tree29fdbdfcbf397675f40f0b6f3e25fe8e9f03d2a2 /gcc/ada/g-expect.adb
parent08429a60125ca7b8c59d2db6893bbb0785dd9608 (diff)
downloadgcc-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/g-expect.adb')
-rw-r--r--gcc/ada/g-expect.adb12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/g-expect.adb b/gcc/ada/g-expect.adb
index 02bc6cf8a79..a67696a649d 100644
--- a/gcc/ada/g-expect.adb
+++ b/gcc/ada/g-expect.adb
@@ -31,8 +31,9 @@
-- --
------------------------------------------------------------------------------
-with System; use System;
-with Ada.Calendar; use Ada.Calendar;
+with System; use System;
+with System.OS_Constants; use System.OS_Constants;
+with Ada.Calendar; use Ada.Calendar;
with GNAT.IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
@@ -1195,15 +1196,14 @@ package body GNAT.Expect is
pragma Warnings (Off, Pipe2);
pragma Warnings (Off, Pipe3);
- On_Windows : constant Boolean := Directory_Separator = '\';
- -- This is ugly, we need a better way of doing this test ???
-
Input : File_Descriptor;
Output : File_Descriptor;
Error : File_Descriptor;
+ No_Fork_On_Target : constant Boolean := Target_OS = Windows;
+
begin
- if On_Windows then
+ if No_Fork_On_Target then
-- Since Windows does not have a separate fork/exec, we need to
-- perform the following actions: