summaryrefslogtreecommitdiff
path: root/lang/gnat/files
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>1998-01-18 09:08:45 +0000
committerSteve Price <steve@FreeBSD.org>1998-01-18 09:08:45 +0000
commit0b588ecd16bfcd75ab84c95a740487aafa59f604 (patch)
tree09aed2d08a47062df40e68eb1bed8402f5551c5c /lang/gnat/files
parentAdded more information to the manpage. (diff)
Upgrade to version 3.10p and do a little portlint cleaning.
PR: 5138 Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
Notes
Notes: svn path=/head/; revision=9365
Diffstat (limited to 'lang/gnat/files')
-rw-r--r--lang/gnat/files/5fintman.adb5
-rw-r--r--lang/gnat/files/5fosinte.adb44
-rw-r--r--lang/gnat/files/5fosinte.ads41
-rw-r--r--lang/gnat/files/5ftaprop.adb193
-rw-r--r--lang/gnat/files/patch-ac50
-rw-r--r--lang/gnat/files/patch-ad78
-rw-r--r--lang/gnat/files/patch-ae53
-rw-r--r--lang/gnat/files/patch-af50
8 files changed, 327 insertions, 187 deletions
diff --git a/lang/gnat/files/5fintman.adb b/lang/gnat/files/5fintman.adb
index 10e3db9af325..9d6eb5e45220 100644
--- a/lang/gnat/files/5fintman.adb
+++ b/lang/gnat/files/5fintman.adb
@@ -7,7 +7,7 @@
-- B o d y --
-- (Version for new GNARL) --
-- --
--- $Revision: 1.3 $ --
+-- $Revision: 1.1 $ --
-- --
-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University --
-- --
@@ -185,7 +185,8 @@ package body System.Interrupt_Management is
Keep_Unmasked (Exception_Interrupts (I)) := True;
Result :=
sigaction
- (Signal (Exception_Interrupts (I)), act'Access, old_act'Access);
+ (Signal (Exception_Interrupts (I)), act'Access,
+ old_act'Unchecked_Access);
pragma Assert (Result = 0
or else Shutdown ("GNULLI failure---sigaction"));
end loop;
diff --git a/lang/gnat/files/5fosinte.adb b/lang/gnat/files/5fosinte.adb
index 33d4bcfd2b89..12febc4d3ddc 100644
--- a/lang/gnat/files/5fosinte.adb
+++ b/lang/gnat/files/5fosinte.adb
@@ -7,7 +7,7 @@
-- B o d y --
-- (Version for new GNARL) --
-- --
--- $Revision: 1.2 $ --
+-- $Revision: 1.1 $ --
-- --
-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University --
-- --
@@ -77,6 +77,48 @@
with Interfaces.C; use Interfaces.C;
package body System.OS_Interface is
+ function Errno return int is
+ type int_ptr is access all int;
+
+ function internal_errno return int_ptr;
+ pragma Import (C, internal_errno, "__error");
+ begin
+ return (internal_errno.all);
+ end Errno;
+
+
+ type sigset_t_ptr is access all sigset_t;
+
+ function pthread_sigmask_set
+ (how : int;
+ set : access sigset_t)
+ return int
+ is
+ function sigmask_set
+ (how : int;
+ set : access sigset_t;
+ oset : sigset_t_ptr)
+ return int;
+ pragma Import (C, sigmask_set, "pthread_sigmask");
+ begin
+ return sigmask_set (how, set, null);
+ end pthread_sigmask_set;
+
+ function pthread_sigmask_oset
+ (how : int;
+ oset : access sigset_t)
+ return int
+ is
+ function sigmask_oset
+ (how : int;
+ set : sigset_t_ptr;
+ oset : access sigset_t)
+ return int;
+ pragma Import (C, sigmask_oset, "pthread_sigmask");
+ begin
+ return sigmask_oset (how, null, oset);
+ end pthread_sigmask_oset;
+
-----------------
-- To_Duration --
-----------------
diff --git a/lang/gnat/files/5fosinte.ads b/lang/gnat/files/5fosinte.ads
index 14450cce307a..b8ecbec463d3 100644
--- a/lang/gnat/files/5fosinte.ads
+++ b/lang/gnat/files/5fosinte.ads
@@ -7,7 +7,7 @@
-- S p e c --
-- (Version for new GNARL) --
-- --
--- $Revision: 1.5 $ --
+-- $Revision: 1.1 $ --
-- --
-- Copyright (C) 1991,92,93,94,95,1996 Free Software Foundation, Inc. --
-- --
@@ -103,8 +103,8 @@ package System.OS_Interface is
-- Errno --
-----------
- function errno return int;
- pragma Import (C, errno, "__get_errno");
+ function Errno return int;
+ pragma Inline (Errno);
-- NAMEs not used are commented-out
-- NAMEs not supported on this system have __NAME for value
@@ -231,6 +231,7 @@ package System.OS_Interface is
sa_flags : int;
end record;
pragma Convention (C, struct_sigaction);
+ type struct_sigaction_ptr is access all struct_sigaction;
SIG_BLOCK : constant := 1;
@@ -250,7 +251,7 @@ package System.OS_Interface is
function sigaction
(sig : Signal;
act : access struct_sigaction;
- oact : access struct_sigaction)
+ oact : struct_sigaction_ptr)
return int;
pragma Import (C, sigaction, "sigaction");
@@ -263,6 +264,16 @@ package System.OS_Interface is
function nanosleep (rqtp, rmtp : access timespec) return int;
pragma Import (C, nanosleep, "nanosleep");
+ type clockid_t is private;
+
+ CLOCK_REALTIME : constant clockid_t;
+
+ function clock_gettime
+ (clock_id : clockid_t;
+ tp : access timespec)
+ return int;
+ pragma Import (C, clock_gettime, "clock_gettime");
+
function To_Duration (TS : timespec) return Duration;
pragma Inline (To_Duration);
@@ -363,6 +374,25 @@ package System.OS_Interface is
return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask");
+ -- We declare two wrappers for pthread_sigmask, since null may need
+ -- to be passed for either set or oset and this is not allowed
+ -- in Ada for access mode parameters (the error was not catched by
+ -- GNAT until recently, and a flag, -gnatdj, was added to allow it
+ -- to compile).
+
+ function pthread_sigmask_set
+ (how : int;
+ set : access sigset_t)
+ return int;
+ -- Identical to pthread_sigmask (how, set, null).
+
+ function pthread_sigmask_oset
+ (how : int;
+ oset : access sigset_t)
+ return int;
+ -- Identical to pthread_sigmask (how, null, oset).
+
+
----------------------------
-- POSIX.1c Section 11 --
----------------------------
@@ -671,6 +701,9 @@ private
end record;
pragma Convention (C, timespec);
+ type clockid_t is new int;
+ CLOCK_REALTIME : constant clockid_t := 0;
+
type struct_timeval is record
tv_sec : long;
tv_usec : long;
diff --git a/lang/gnat/files/5ftaprop.adb b/lang/gnat/files/5ftaprop.adb
index 33d96dd5d81d..813c40530c4a 100644
--- a/lang/gnat/files/5ftaprop.adb
+++ b/lang/gnat/files/5ftaprop.adb
@@ -7,7 +7,7 @@
-- B o d y --
-- (Version for new GNARL) --
-- --
--- $Revision: 1.4 $ --
+-- $Revision: 1.1 $ --
-- --
-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University --
-- --
@@ -50,24 +50,21 @@ with System.Interrupt_Management;
-- Abort_Task_Interrupt
-- Interrupt_ID
+with System.Interrupt_Management.Operations;
+-- used for Set_Interrupt_Mask
+-- All_Tasks_Mask
+pragma Elaborate_All (System.Interrupt_Management.Operations);
+
with System.OS_Interface;
-- used for various type, constant, and operations
with System.Parameters;
-- used for Size_Type
-with System.Storage_Elements;
--- used for To_Address
--- Integer_Address
-
with System.Tasking;
-- used for Ada_Task_Control_Block
-- Task_ID
-with System.Time_Operations;
--- used for Clock
--- Clock_Delay_Correction
-
with Unchecked_Conversion;
with Unchecked_Deallocation;
@@ -78,7 +75,6 @@ package body System.Task_Primitives.Operations is
use System.Error_Reporting;
use System.OS_Interface;
use System.Parameters;
- use System.Time_Operations;
pragma Linker_Options ("-lc_r");
@@ -92,9 +88,6 @@ package body System.Task_Primitives.Operations is
ATCB_Key : aliased pthread_key_t;
-- Key used to find the Ada Task_ID associated with a thread
- All_Signal_Mask,
- -- The set of all signals
-
Unblocked_Signal_Mask : aliased sigset_t;
-- The set of signals that should unblocked in all tasks
@@ -159,6 +152,8 @@ package body System.Task_Primitives.Operations is
context : access struct_sigcontext) is
T : Task_ID := Self;
+ Result : Interfaces.C.int;
+ Old_Set : aliased sigset_t;
begin
-- Assuming it is safe to longjmp out of a signal handler, the
@@ -166,6 +161,13 @@ package body System.Task_Primitives.Operations is
if T.Deferral_Level = 0
and then T.Pending_ATC_Level < T.ATC_Nesting_Level then
+
+ -- Make sure signals used for RTS internal purpose are unmasked
+
+ Result := pthread_sigmask
+ (SIG_UNBLOCK, Unblocked_Signal_Mask'Access, Old_Set'Access);
+ pragma Assert (Result = 0
+ or else Shutdown ("GNULLI failure---Enter_Task (pthread_sigmask)"));
raise Standard'Abort_Signal;
end if;
@@ -286,7 +288,11 @@ package body System.Task_Primitives.Operations is
begin
Result := pthread_mutex_lock (L);
- Ceiling_Violation := Result = EINVAL;
+ if Result = 0 then
+ Ceiling_Violation := False;
+ else
+ Ceiling_Violation := Result = EINVAL;
+ end if;
-- assumes the cause of EINVAL is a priority ceiling violation
pragma Assert (Result = 0 or else Result = EINVAL
or else Shutdown ("GNULLI failure---pthread_mutex_lock"));
@@ -370,41 +376,114 @@ package body System.Task_Primitives.Operations is
-- Sleep_For --
---------------
- procedure Sleep_For (Self_ID : Task_ID; Rel_Time : Duration) is
- Result : Interfaces.C.Int;
- Request : aliased timespec;
-
+ procedure Sleep_For
+ (Self_ID : Task_ID;
+ Rel_Time : Duration;
+ Timedout : out Boolean)
+ is
begin
- pragma Assert (Self_ID = Self
- or else Shutdown ("GNULLI failure---Self in Sleep_For"));
- Request := To_Timespec (Rel_Time + Clock + Clock_Delay_Correction);
- Result := pthread_cond_timedwait
- (Self_ID.LL.CV'Access, Self_ID.LL.L'Access, Request'Access);
- pragma Assert
- (Result = 0
- or else (Clock >= To_Duration (Request) - Clock_Delay_Correction)
- or else Shutdown ("GNULLI failure---Sleep_For"));
+ Sleep_Until (Self_ID, Rel_Time + Clock, Timedout);
end Sleep_For;
-----------------
-- Sleep_Until --
-----------------
- procedure Sleep_Until (Self_ID : Task_ID; Abs_Time : Duration) is
- Result : Interfaces.C.Int;
+ procedure Sleep_Until
+ (Self_ID : Task_ID;
+ Abs_Time : Duration;
+ Timedout : out Boolean)
+ is
Request : aliased timespec;
+ Result : Interfaces.C.int;
begin
pragma Assert (Self_ID = Self
or else Shutdown ("GNULLI failure---Self in Sleep_Until"));
- Request := To_Timespec (Abs_Time + Clock_Delay_Correction);
- Result := pthread_cond_timedwait
- (Self_ID.LL.CV'Access, Self_ID.LL.L'Access, Request'Access);
- pragma Assert
- (Result = 0 or else Clock >= Abs_Time
- or else Shutdown ("GNULLI failure---Sleep_Until (early)"));
+
+ if Abs_Time <= Clock then
+ Timedout := True;
+ Result := sched_yield;
+ return;
+ end if;
+
+ Request := To_Timespec (Abs_Time);
+
+ -- We loop until the requested delay is serviced. For early wakeups,
+ -- we check the Clock again and re-request delays until we sleep
+ -- at least for the specified amount.
+
+ loop
+ -- Perform delays until one of the following conditions is true:
+ -- 1) cond_timedwait wakes up due to time expiration.
+ -- 2) We were interrupted by an abort signal (abortion is pending).
+ -- 3) We received a wakeup, via cond_signal to our CV.
+ -- 4) An error has occurred in the OS-provided delay primitive.
+ -- Conditions (1), (2), and (3) are normal.
+ -- Condition (4) should never happen unless the OS is broken,
+ -- or there is an error in our own runtime system code.
+
+ loop
+ Result := pthread_cond_timedwait
+ (Self_ID.LL.CV'Access, Self_ID.LL.L'Access, Request'Access);
+
+ if Result = 0 or else
+ (Self_ID.Pending_Action and then
+ Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level)
+ then
+ Timedout := False;
+ return;
+ else
+ -- As of 11/25/97, FreeBSD-3.0 returns the correct
+ -- (POSIX specified) code (ETIMEDOUT) for a timed-out
+ -- operation. Previous versions of FreeBSD would
+ -- return -1, and set the thread-safe errno to EAGAIN.
+ if Result < 0 and then Errno = EAGAIN then
+ Result := ETIMEDOUT;
+ end if;
+ end if;
+
+ if Result = ETIMEDOUT then
+ exit;
+ end if;
+
+ pragma Assert (Result /= EINVAL or else
+ Shutdown ("GNULLI failure---Sleep_Until (cond_timedwait)"));
+ end loop;
+
+ -- Make sure we delayed long enough. If we did, give up the
+ -- CPU. Otherwise, request a delay again with unserviced amount
+ -- of time.
+
+ if (Abs_Time <= Clock) then
+ Timedout := True;
+ Result := sched_yield;
+ exit;
+ else
+ Request := To_Timespec (Abs_Time);
+ end if;
+ end loop;
end Sleep_Until;
+ -----------
+ -- Clock --
+ -----------
+
+ function Clock return Duration is
+ TS : aliased timespec;
+ Result : Interfaces.C.int;
+
+ begin
+ Result := clock_gettime (CLOCK_REALTIME, TS'Unchecked_Access);
+ pragma Assert (Result = 0
+ or else Shutdown ("GNULLI failure---clock_gettime"));
+ return To_Duration (TS);
+ exception
+ when others =>
+ pragma Assert (Shutdown ("exception in Clock"));
+ return 0.0;
+ end Clock;
+
------------
-- Wakeup --
------------
@@ -474,31 +553,14 @@ package body System.Task_Primitives.Operations is
procedure Enter_Task (Self_ID : Task_ID) is
Result : Interfaces.C.int;
- Old_Set : aliased sigset_t;
begin
Self_ID.LL.Thread := pthread_self;
- -- It is not safe for the new task accept signals until it
- -- has bound its TCB pointer to the thread with pthread_setspecific (),
- -- since the handler wrappers use the TCB pointer
- -- to restore the stack limit.
-
Result := pthread_setspecific (ATCB_Key, To_Address (Self_ID));
pragma Assert (Result = 0 or else
Shutdown ("GNULLI failure---Enter_Task (pthread_setspecific)"));
-
- -- Must wait until the above operation is done to unmask signals,
- -- since signal handler for abort will try to access the ATCB to
- -- check whether abort is deferred, and exception propagation will
- -- try to use task-specific data as mentioned above.
-
- Result := pthread_sigmask
- (SIG_UNBLOCK, Unblocked_Signal_Mask'Access, Old_Set'Access);
- pragma Assert (Result = 0
- or else Shutdown ("GNULLI failure---Enter_Task (pthread_sigmask)"));
-
end Enter_Task;
----------------------
@@ -571,7 +633,6 @@ package body System.Task_Primitives.Operations is
Attributes : aliased pthread_attr_t;
Adjusted_Stack_Size : Interfaces.C.size_t;
Result : Interfaces.C.int;
- Old_Set : aliased sigset_t;
function Thread_Body_Access is new
Unchecked_Conversion (System.Address, Thread_Body);
@@ -634,10 +695,10 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0
or else Shutdown ("GNULLI failure---pthread_attr_setstacksize"));
- Result := pthread_sigmask
- (SIG_SETMASK, All_Signal_Mask'Access, Old_Set'Access);
- pragma Assert (Result = 0 or else
- Shutdown ("GNULLI failure---Create_Task (pthread_sigmask)"));
+ -- Since the initial signal mask of a thread is inherited from the
+ -- creator, and the Environment task has all its signals masked, we
+ -- do not need to manipulate caller's signal mask at this point.
+ -- All tasks in RTS will have All_Tasks_Mask initially.
Result := pthread_create
(T.LL.Thread'Access,
@@ -649,11 +710,6 @@ package body System.Task_Primitives.Operations is
Succeeded := Result = 0;
- Result := pthread_sigmask
- (SIG_SETMASK, Old_Set'Unchecked_Access, null);
- pragma Assert (Result = 0 or else
- Shutdown ("GNULLI failure---Create_Task (pthread_sigmask)"));
-
Set_Priority (T, Priority);
end Create_Task;
@@ -735,7 +791,7 @@ package body System.Task_Primitives.Operations is
sigaction (
Signal (System.Interrupt_Management.Abort_Task_Interrupt),
act'Access,
- old_act'Access);
+ old_act'Unchecked_Access);
pragma Assert (Result = 0
or else Shutdown ("GNULLI failure---Initialize (sigaction)"));
@@ -755,9 +811,14 @@ begin
-- It doesn't appear necessary to call it because pthread_init is
-- called before any Ada elaboration occurs.
- Result := sigfillset (All_Signal_Mask'Access);
- pragma Assert (Result = 0
- or else Shutdown ("GNULLI failure---Initialize (sigfillset)"));
+ -- Mask Environment task for all signals. The original mask of the
+ -- Environment task will be recovered by Interrupt_Server task
+ -- during the elaboration of s-interr.adb.
+
+ System.Interrupt_Management.Operations.Set_Interrupt_Mask
+ (System.Interrupt_Management.Operations.All_Tasks_Mask'Access);
+
+ -- Prepare the set of signals that should unblocked in all tasks
Result := sigemptyset (Unblocked_Signal_Mask'Access);
pragma Assert (Result = 0
diff --git a/lang/gnat/files/patch-ac b/lang/gnat/files/patch-ac
index e2e24ca4b439..e831059d7171 100644
--- a/lang/gnat/files/patch-ac
+++ b/lang/gnat/files/patch-ac
@@ -1,20 +1,32 @@
-diff -c orig/ada/Makefile.in gcc/ada/Makefile.in
-*** orig/ada/Makefile.in Thu Apr 3 12:40:23 1997
---- gcc-2.7.2.1/ada/Makefile.in Thu Apr 3 12:41:49 1997
+*** gcc-2.7.2.1/ada/Makefile.in.orig Sun Nov 16 09:10:32 1997
+--- gcc-2.7.2.1/ada/Makefile.in Sun Nov 16 09:14:37 1997
***************
-*** 956,962 ****
- $(srcdir)/../move-if-change tmp-ttypef.ads ttypef.ads
- touch stamp-ttypef
-
-! ADA_INCLUDE_DIR = $(prefix)/adainclude
- ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
-
- # Note: the strings below do not make sense for Ada strings in the OS/2
---- 956,962 ----
- $(srcdir)/../move-if-change tmp-ttypef.ads ttypef.ads
- touch stamp-ttypef
-
-! ADA_INCLUDE_DIR = $(prefix)/include/adainclude
- ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
-
- # Note: the strings below do not make sense for Ada strings in the OS/2
+*** 815,820 ****
+--- 815,821 ----
+ fsu* | FSU*) letter=l;;\
+ native | *) letter=i;;\
+ esac;;\
++ *86*-freebsd*) letter=f ;;\
+ mips-sgi-irix*) letter=g ;;\
+ hppa*-hp-hpux*) letter=h ;;\
+ *-ibm-aix4*) letter=c ;;\
+***************
+*** 865,870 ****
+--- 866,872 ----
+ *-*-rtems* | *-rtems* |\
+ *-go32-msdos | *-go32 |\
+ *86*-linux* |\
++ *86*-freebsd* |\
+ mips-sni-* |\
+ *) \
+ \
+***************
+*** 920,925 ****
+--- 922,928 ----
+ *-*-rtems* | *-rtems* |\
+ *-go32-msdos | *-go32 |\
+ *86*-linux* |\
++ *86*-freebsd* |\
+ mips-sni-* |\
+ *-*-cygwin32* |\
+ *-*-mingw32* |\
diff --git a/lang/gnat/files/patch-ad b/lang/gnat/files/patch-ad
index b1a4ed1dd153..15066bfc11f2 100644
--- a/lang/gnat/files/patch-ad
+++ b/lang/gnat/files/patch-ad
@@ -1,46 +1,36 @@
-diff -c orig/ada/Makefile.in gcc/ada/Makefile.in
-*** orig/ada/Makefile.in Tue Jan 21 00:01:54 1997
---- gcc-2.7.2.1/ada/Makefile.in Sat May 10 22:42:27 1997
+*** gcc-2.7.2.1/ada/make.adb.orig Thu Aug 14 00:02:45 1997
+--- gcc-2.7.2.1/ada/make.adb Sun Nov 16 09:18:18 1997
***************
-*** 189,193 ****
- $(CC) -c $(ALL_ADAFLAGS) $<
- .ads.o:
-! $(CC) -c $(ALL_ADAFLAGS) $<
-
- # This tells GNU make version 3 not to export all the variables
---- 189,199 ----
- $(CC) -c $(ALL_ADAFLAGS) $<
- .ads.o:
-! @if [ -f $*.adb ]; then \
-! echo "$(CC) -c $(ALL_ADAFLAGS) $*.adb"; \
-! $(CC) -c $(ALL_ADAFLAGS) $*.adb; \
-! else \
-! echo "$(CC) -c $(ALL_ADAFLAGS) $*.ads"; \
-! $(CC) -c $(ALL_ADAFLAGS) $*.ads; \
-! fi
-
- # This tells GNU make version 3 not to export all the variables
-***************
-*** 738,741 ****
---- 744,748 ----
- sparc-sun-sunos5*) letter=s ;;\
- *86*-linux*) letter=l ;;\
-+ *86*-freebsd*) letter=f ;;\
- mips-sgi-irix*) letter=g ;;\
- hppa*-hp-hpux*) letter=h ;;\
-***************
-*** 779,782 ****
---- 786,790 ----
- *-go32-msdos | *-go32 |\
- *86*-linux* |\
-+ *86*-freebsd* |\
- *) \
- \
+*** 201,207 ****
+ -- Compiler, Binder & Linker Data and Subprograms --
+ ----------------------------------------------------
+
+! Gcc : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gcc");
+ Gnatbind : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatbind");
+ Gnatlink : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatlink");
+
+--- 201,207 ----
+ -- Compiler, Binder & Linker Data and Subprograms --
+ ----------------------------------------------------
+
+! Gcc : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("adagcc");
+ Gnatbind : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatbind");
+ Gnatlink : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatlink");
+
***************
-*** 845,848 ****
---- 853,857 ----
- *-go32-msdos | *-go32 |\
- *86*-linux* |\
-+ *86*-freebsd* |\
- *) \
- \
+*** 941,947 ****
+ Comp_Last := Comp_Last + 1;
+ Comp_Args (Comp_Last) := new String'(Name_Buffer (1 .. Name_Len));
+
+! Display ("gcc", Comp_Args (Args'First .. Comp_Last));
+
+ return
+ GNAT.OS_Lib.Non_Blocking_Spawn
+--- 941,947 ----
+ Comp_Last := Comp_Last + 1;
+ Comp_Args (Comp_Last) := new String'(Name_Buffer (1 .. Name_Len));
+
+! Display ("adagcc", Comp_Args (Args'First .. Comp_Last));
+
+ return
+ GNAT.OS_Lib.Non_Blocking_Spawn
diff --git a/lang/gnat/files/patch-ae b/lang/gnat/files/patch-ae
index 85b50c157c15..5ebf05b30a00 100644
--- a/lang/gnat/files/patch-ae
+++ b/lang/gnat/files/patch-ae
@@ -1,36 +1,19 @@
-*** gcc/ada/make.adb.orig Thu Jun 5 08:37:34 1997
---- gcc-2.7.2.1/ada/make.adb Thu Jun 5 11:30:57 1997
+*** gcc-2.7.2.1/ada/gnatcmd.adb.orig Thu Aug 14 00:02:49 1997
+--- gcc-2.7.2.1/ada/gnatcmd.adb Sun Nov 16 09:23:23 1997
***************
-*** 191,197 ****
- -- Compiler, Binder & Linker Data and Subprograms --
- ----------------------------------------------------
-
-! Gcc : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gcc");
- Gnatbind : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatbind");
- Gnatlink : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatlink");
-
---- 191,197 ----
- -- Compiler, Binder & Linker Data and Subprograms --
- ----------------------------------------------------
-
-! Gcc : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("adagcc");
- Gnatbind : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatbind");
- Gnatlink : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatlink");
-
-***************
-*** 778,784 ****
- Comp_Last := Comp_Last + 1;
- Comp_Args (Comp_Last) := new String'(Name_Buffer (1 .. Name_Len));
-
-! Display ("gcc", Comp_Args (Args'First .. Comp_Last));
-
- return
- GNAT.OS_Lib.Non_Blocking_Spawn
---- 778,784 ----
- Comp_Last := Comp_Last + 1;
- Comp_Args (Comp_Last) := new String'(Name_Buffer (1 .. Name_Len));
-
-! Display ("adagcc", Comp_Args (Args'First .. Comp_Last));
-
- return
- GNAT.OS_Lib.Non_Blocking_Spawn
+*** 987,993 ****
+
+ (Cname => new S'("COMPILE"),
+ Usage => new S'("GNAT COMPILE file file .. file /qualifiers"),
+! Unixcmd => new S'("gcc -c"),
+ Switches => GCC_Switches'Access,
+ Minfile => 1,
+ Maxfile => 0,
+--- 987,993 ----
+
+ (Cname => new S'("COMPILE"),
+ Usage => new S'("GNAT COMPILE file file .. file /qualifiers"),
+! Unixcmd => new S'("adagcc -c"),
+ Switches => GCC_Switches'Access,
+ Minfile => 1,
+ Maxfile => 0,
diff --git a/lang/gnat/files/patch-af b/lang/gnat/files/patch-af
index ed40cbcf144f..d7f39259084c 100644
--- a/lang/gnat/files/patch-af
+++ b/lang/gnat/files/patch-af
@@ -1,19 +1,37 @@
-*** gcc/ada/gnatcmd.adb.orig Wed Jun 4 17:47:51 1997
---- gcc-2.7.2.1/ada/gnatcmd.adb Wed Jun 4 17:48:17 1997
+*** gcc-2.7.2.1/ada/gnatlink.adb.orig Sun Nov 16 09:24:27 1997
+--- gcc-2.7.2.1/ada/gnatlink.adb Sun Nov 16 09:25:18 1997
***************
-*** 899,905 ****
+*** 63,69 ****
+ Table_Increment => 100,
+ Table_Name => "Gnatlink.Binder_Options");
- (Cname => new S'("COMPILE"),
- Usage => new S'("GNAT COMPILE file file .. file /qualifiers"),
-! Unixcmd => new S'("gcc -c"),
- Switches => GCC_Switches'Access,
- Minfile => 1,
- Maxfile => 0,
---- 899,905 ----
+! Gcc : constant String := "gcc";
- (Cname => new S'("COMPILE"),
- Usage => new S'("GNAT COMPILE file file .. file /qualifiers"),
-! Unixcmd => new S'("adagcc -c"),
- Switches => GCC_Switches'Access,
- Minfile => 1,
- Maxfile => 0,
+ Read_Mode : constant String := "r" & Ascii.Nul;
+ Write_Mode : constant String := "w" & Ascii.Nul;
+--- 63,69 ----
+ Table_Increment => 100,
+ Table_Name => "Gnatlink.Binder_Options");
+
+! Gcc : constant String := "adagcc";
+
+ Read_Mode : constant String := "r" & Ascii.Nul;
+ Write_Mode : constant String := "w" & Ascii.Nul;
+***************
+*** 424,430 ****
+ Write_Eol;
+ Write_Str (" [-v] -- verbose mode");
+ Write_Eol;
+! Write_Str (" [-gnatlink name] -- full name for the linker (gcc)");
+ Write_Eol;
+ Write_Str (" [list of objects] -- non Ada binaries");
+ Write_Eol;
+--- 424,431 ----
+ Write_Eol;
+ Write_Str (" [-v] -- verbose mode");
+ Write_Eol;
+! Write_Str (" [-gnatlink name] -- full name for the linker " &
+! "(adagcc)");
+ Write_Eol;
+ Write_Str (" [list of objects] -- non Ada binaries");
+ Write_Eol;