-- --
------------------------------------------------------------------------------
-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;
-- Prepare low-level argument list from the normalized arguments
for K in Arg_List'Range loop
- if Arg_List (K) /= null then
- C_Arg_List (K) := Arg_List (K).all'Address;
- else
- C_Arg_List (K) := System.Null_Address;
- end if;
+ C_Arg_List (K) :=
+ (if Arg_List (K) /= null
+ then Arg_List (K).all'Address
+ else System.Null_Address);
end loop;
-- This does not return on Unix systems
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: