diff --git a/lang/gnat/Makefile b/lang/gnat/Makefile index 28cd3c2cb754..90807ee5948f 100644 --- a/lang/gnat/Makefile +++ b/lang/gnat/Makefile @@ -1,61 +1,99 @@ -# -*- Mode: Makefile -*- -# Port of: GNU Ada gnat -# Version required: 2.03 -# Space required: >= 23MB +# New ports collection makefile for: GNU Ada gnat +# Version required: 3.09 # Date created: Sat Mar 18 02:16:45 1995 -# Porter: nils@guru.ims.uni-stuttgart.de +# Porter (original): nils@guru.ims.uni-stuttgart.de +# Porter (version 3): maurice@serc.rmit.edu.au # -# $Id: Makefile,v 1.10 1996/12/07 13:28:30 asami Exp $ +# $Id: Makefile,v 1.11 1997/08/11 18:02:08 fenner Exp $ -DISTNAME= gnat-2.03-src -PKGNAME= gnat-2.03 +# Note: +# - FreeBSD tasking libraries created by Dan Eischen have been incorportated +# into this edition +# - The default names of a number of binaries have been altered to avoid +# conflict with other gcc based products. Standard names can be provided using +# symbolic links. + +DISTNAME= gnat-3.09-src +PKGNAME= gnat-3.09 CATEGORIES= lang -MASTER_SITES= ftp://cs.nyu.edu/pub/gnat/ +MASTER_SITES= ftp://cs.nyu.edu/pub/gnat/ \ + ${MASTER_SITE_GNU} +DISTFILES= gnat-3.09-src.tar.gz gcc-2.7.2.1.tar.gz -MAINTAINER= ports@FreeBSD.ORG +MAINTAINER= maurice@serc.rmit.edu.au -BROKEN= "Not updated for gcc-2.7.x" -# following three lines commented out because BROKEN is already defined -#.if !exists(/usr/local/bin/gnatf) -#BROKEN= "requires existing gnat compiler" -#.endif -# You need a compiler who calls an existing gnat compiler: +.if !exists(/usr/local/bin/gnatf) +BROKEN= "requires existing gnat compiler" +.endif +.if !exists(/usr/local/bin/adagcc) +BROKEN= "requires patched gcc compiler" +.endif +# You need a compiler who calls an existing gnat compiler (3.08 or greater): # if you have one, if you have one put it here, otherwise, -# you will need to install from a package first, the Makefile -# in ${SRCDIR}/ada is configured to call gcc with -B/usr/local/libexec/ -# so that the normal gcc will find gnat1 there. Alternatively -# you can install it in /usr and avoid the hassles. -CC = gcc +# you will need to install from a package first -# You have to tell me where your gcc 2.6.3 source is located -COMPILERSOURCE = /usr/src/gnu/usr.bin/cc +# Make sure we use the patched gcc compiler +CC = /usr/local/bin/adagcc -# Which version of gcc do we have? Must be either 2.6.2 or 2.6.3. -CCVERSION= 2.6.3 +# Which version of gcc do we have? Must be 2.7.2.1 +CCVERSION= 2.7.2.1 -USE_GMAKE= true +# which language set +LANG = c ada -pre-build: - @echo "===> Building patched gcc library for ${DISTNAME}" - cd ${WRKSRC}/gcc && \ - ${MAKE} CC="${CC} -I. -I${COMPILERSOURCE}/include" \ - COMPILERSOURCE="${COMPILERSOURCE}" PREFIX=${PREFIX} +pre-patch: + @echo "===> Applying FreeBSD patches to gcc for ${DISTNAME}" + -( cd ${WRKDIR}/gcc-2.7.2.1; \ + patch -s -f < ${PATCHDIR}/patch-freebsdgcc; ) + @echo "===> Fixing ${DISTNAME} patches to gcc" + -( cd ${WRKSRC}/src; \ + patch -s -f < ${PATCHDIR}/patch-gnat; ) + @echo "===> Patching gcc for ${DISTNAME}" + -( cd ${WRKDIR}/gcc-2.7.2.1; \ + patch -s -f < ${WRKSRC}/src/gcc-272.dif; ) + (cd ${WRKDIR}/gcc-2.7.2.1; \ + cp -R ${WRKSRC}/src/ada ada; ) + +pre-configure: + (cd ${WRKDIR}/gcc-2.7.2.1/ada; \ + touch treeprs.ads a-[es]info.h nmake.ad[bs] ) do-build: - cd ${WRKSRC}/ada; \ - ${GMAKE} CC="${CC}" PREFIX=${PREFIX} COMPILERSOURCE="${COMPILERSOURCE}" + (cd ${WRKDIR}/gcc-2.7.2.1; ${GMAKE} CC="${CC}" CFLAGS="-O2" LANGUAGES="${LANG}" ) + (cd ${WRKDIR}/gcc-2.7.2.1; ${GMAKE} CC="${CC}" CFLAGS="-O2" LANGUAGES="${LANG}" bootstrap ) + (cd ${WRKDIR}/gcc-2.7.2.1; ${GMAKE} CC="${CC}" CFLAGS="-O2" gnatlib_and_tools ) + +# patch the src that we are going to use and copy any additional files +# required into the correct locations +# use version specific patches where necessary +do-patch: + (cd ${WRKDIR}; \ + FILES="${PATCHDIR}/patch-[a-z][a-z]" ; \ + SORTEDFILES=`echo $$FILES | tr " " "\n" | sort` ; \ + for i in $$SORTEDFILES ; do \ + echo Applying ---- $$i ;\ + patch -s < $$i ;\ + done ) + (cd ${FILESDIR}; \ + for i in *.adb *.ads ; do \ + cp $$i ${WRKDIR}/gcc-2.7.2.1/ada; \ + done ) do-configure: - @env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ - WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ - FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ - DEPENDS="${DEPENDS}" \ - COMPILERSOURCE="${COMPILERSOURCE}" CCVERSION="${CCVERSION}" \ - ${SHELL} ${SCRIPTDIR}/configure; + (cd ${WRKDIR}/gcc-2.7.2.1; \ + ./configure --prefix=${PREFIX} --program-prefix=ada ) do-install: - (cd ${WRKSRC}/ada; \ - ${MAKE} PREFIX=${PREFIX} ${MAKE_FLAGS} ${MAKEFILE} \ - ${INSTALL_TARGET}) + (cd ${WRKDIR}/gcc-2.7.2.1; \ + ${GMAKE} CC="${CC}" LANGUAGES="${LANG}" install ) + +post-install: + @(echo "-----------------------------------------------------------" ) + @(echo "" ) + @(echo "For information about using the tasking library please read" ) + @(echo "the README.Tasking file" ) + @(echo "" ) + @(echo "-----------------------------------------------------------" ) + @(echo "" ) .include diff --git a/lang/gnat/distinfo b/lang/gnat/distinfo index 2c8d6986deed..e75ebe9161a3 100644 --- a/lang/gnat/distinfo +++ b/lang/gnat/distinfo @@ -1 +1,2 @@ -MD5 (gnat-2.03-src.tar.gz) = 65c2f6458b3fb9de2cda0c4ab8bcf4fc +MD5 (gnat-3.09-src.tar.gz) = bd8a3526ee8b55dd10db11d4485e1e21 +MD5 (gcc-2.7.2.1.tar.gz) = 655b43dbb48f611fc667ec21584a4460 diff --git a/lang/gnat/files/4fintnam.ads b/lang/gnat/files/4fintnam.ads new file mode 100644 index 000000000000..29f53e62ae96 --- /dev/null +++ b/lang/gnat/files/4fintnam.ads @@ -0,0 +1,154 @@ +------------------------------------------------------------------------------ +-- -- +-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- A D A . I N T E R R U P T S . N A M E S -- +-- -- +-- S p e c -- +-- (Version for new GNARL) -- +-- -- +-- $Revision: 1.1 $ -- +-- -- +-- Copyright (C) 1991,92,93,94,95,1996 Free Software Foundation, Inc. -- +-- -- +-- GNARL is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNARL; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. It is -- +-- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- +-- State University (http://www.gnat.com). -- +-- -- +------------------------------------------------------------------------------ + +-- This is the FreeBSD THREADS version of this package + +-- This is only a first approximation. +-- It should be autogenerated by the m4 macro processor. +-- Contributed by Daniel Eischen (deischen@iworks.InterWorks.org) + +with System.OS_Interface; +-- used for names of interrupts + +package Ada.Interrupts.Names is + + + SIGHUP : constant Interrupt_ID := + System.OS_Interface.SIGHUP; -- hangup + + SIGINT : constant Interrupt_ID := + System.OS_Interface.SIGINT; -- interrupt (rubout) + + SIGQUIT : constant Interrupt_ID := + System.OS_Interface.SIGQUIT; -- quit (ASCD FS) + + SIGILL : constant Interrupt_ID := + System.OS_Interface.SIGILL; -- illegal instruction (not reset) + + SIGTRAP : constant Interrupt_ID := + System.OS_Interface.SIGTRAP; -- trace trap (not reset) + + SIGIOT : constant Interrupt_ID := + System.OS_Interface.SIGIOT; -- IOT instruction + + SIGABRT : constant Interrupt_ID := -- used by abort, + System.OS_Interface.SIGABRT; -- replace SIGIOT in the future + + SIGEMT : constant Interrupt_ID := + System.OS_Interface.SIGEMT; -- EMT instruction + + SIGFPE : constant Interrupt_ID := + System.OS_Interface.SIGFPE; -- floating point exception + + SIGKILL : constant Interrupt_ID := + System.OS_Interface.SIGKILL; -- kill (cannot be caught or ignored) + + SIGBUS : constant Interrupt_ID := + System.OS_Interface.SIGBUS; -- bus error + + SIGSEGV : constant Interrupt_ID := + System.OS_Interface.SIGSEGV; -- segmentation violation + + SIGSYS : constant Interrupt_ID := + System.OS_Interface.SIGSYS; -- bad argument to system call + + SIGPIPE : constant Interrupt_ID := -- write on a pipe with + System.OS_Interface.SIGPIPE; -- no one to read it + + SIGALRM : constant Interrupt_ID := + System.OS_Interface.SIGALRM; -- alarm clock + + SIGTERM : constant Interrupt_ID := + System.OS_Interface.SIGTERM; -- software termination signal from kill + + SIGURG : constant Interrupt_ID := + System.OS_Interface.SIGURG; -- urgent condition on IO channel + + SIGSTOP : constant Interrupt_ID := + System.OS_Interface.SIGSTOP; -- stop (cannot be caught or ignored) + + SIGTSTP : constant Interrupt_ID := + System.OS_Interface.SIGTSTP; -- user stop requested from tty + + SIGCONT : constant Interrupt_ID := + System.OS_Interface.SIGCONT; -- stopped process has been continued + + SIGCHLD : constant Interrupt_ID := + System.OS_Interface.SIGCHLD; -- 4.3BSD's/POSIX name for SIGCLD + + SIGCLD : constant Interrupt_ID := + System.OS_Interface.SIGCLD; -- child status change + + SIGTTIN : constant Interrupt_ID := + System.OS_Interface.SIGTTIN; -- background tty read attempted + + SIGTTOU : constant Interrupt_ID := + System.OS_Interface.SIGTTOU; -- background tty write attempted + + SIGIO : constant Interrupt_ID := -- input/output possible, + System.OS_Interface.SIGIO; -- SIGPOLL alias (Solaris) + + SIGXCPU : constant Interrupt_ID := + System.OS_Interface.SIGXCPU; -- CPU time limit exceeded + + SIGXFSZ : constant Interrupt_ID := + System.OS_Interface.SIGXFSZ; -- filesize limit exceeded + + SIGVTALRM : constant Interrupt_ID := + System.OS_Interface.SIGVTALRM; -- virtual timer expired + + SIGPROF : constant Interrupt_ID := + System.OS_Interface.SIGPROF; -- profiling timer expired + + SIGWINCH : constant Interrupt_ID := + System.OS_Interface.SIGWINCH; -- window size change + + SIGINFO : constant Interrupt_ID := -- information request + System.OS_Interface.SIGINFO; -- (NetBSD/FreeBSD) + + SIGUSR1 : constant Interrupt_ID := + System.OS_Interface.SIGUSR1; -- user defined signal 1 + + SIGUSR2 : constant Interrupt_ID := + System.OS_Interface.SIGUSR2; -- user defined signal 2 + + -- Beware that the mapping of names to signals may be + -- many-to-one. There may be aliases. Also, for all + -- signal names that are not supported on the current system + -- the value of the corresponding constant will be zero. + +end Ada.Interrupts.Names; diff --git a/lang/gnat/files/5fintman.adb b/lang/gnat/files/5fintman.adb new file mode 100644 index 000000000000..10e3db9af325 --- /dev/null +++ b/lang/gnat/files/5fintman.adb @@ -0,0 +1,234 @@ +------------------------------------------------------------------------------ +-- -- +-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T -- +-- -- +-- B o d y -- +-- (Version for new GNARL) -- +-- -- +-- $Revision: 1.3 $ -- +-- -- +-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University -- +-- -- +-- GNARL is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNARL; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. It is -- +-- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- +-- State University (http://www.gnat.com). -- +-- -- +------------------------------------------------------------------------------ + +-- This is the FreeBSD PTHREADS version of this package + +-- This is only a first approximation. +-- It should be autogenerated by the m4 macro processor. +-- Contributed by Peter Burwood (gnat@arcangel.dircon.co.uk). + +-- This file performs the system-dependent translation between machine +-- exceptions and the Ada exceptions, if any, that should be raised when +-- they occur. This version works for FreeBSD. Contributed by +-- Daniel M. Eischen (deischen@iworks.InterWorks.org). + +-- PLEASE DO NOT add any dependences on other packages. +-- This package is designed to work with or without tasking support. + +-- See the other warnings in the package specification before making +-- any modifications to this file. + +-- Make a careful study of all signals available under the OS, +-- to see which need to be reserved, kept always unmasked, +-- or kept always unmasked. +-- Be on the lookout for special signals that +-- may be used by the thread library. + +with Interfaces.C; +-- used for int and other types + +with System.Error_Reporting; +-- used for Shutdown + +with System.OS_Interface; +-- used for various Constants, Signal and types + +package body System.Interrupt_Management is + + use Interfaces.C; + use System.Error_Reporting; + use System.OS_Interface; + + type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID; + Exception_Interrupts : constant Interrupt_List := + (SIGFPE, SIGILL, SIGSEGV, SIGBUS); + + + ---------------------- + -- Notify_Exception -- + ---------------------- + + -- This function identifies the Ada exception to be raised using + -- the information when the system received a synchronous signal. + -- Since this function is machine and OS dependent, different code + -- has to be provided for different target. + + -- Language specs say signal handlers take exactly one arg, even + -- though FreeBSD actually supplies three. Ugh! + + procedure Notify_Exception + (signo : Signal; + code : Interfaces.C.int; + context : access struct_sigcontext); + + procedure Notify_Exception + (signo : Signal; + code : Interfaces.C.int; + context : access struct_sigcontext) is + begin + + -- As long as we are using a longjmp to return control to the + -- exception handler on the runtime stack, we are safe. The original + -- signal mask (the one we had before coming into this signal catching + -- function) will be restored by the longjmp. Therefore, raising + -- an exception in this handler should be a safe operation. + + -- Check that treatment of exception propagation here + -- is consistent with treatment of the abort signal in + -- System.Task_Primitives.Operations. + + -- ????? + -- The code below is first approximation. + -- It would be nice to figure out more + -- precisely what exception has occurred. + -- One also should arrange to use an alternate stack for + -- recovery from stack overflow. + -- I don't understand the Linux kernel code well + -- enough to figure out how to do this yet. + -- I hope someone will look at this. --Ted Baker + + -- How can SIGSEGV be split into constraint and storage errors ? + -- What should SIGILL really raise ? Some implemenations have + -- codes for different types of SIGILL and some raise Storage_Error. + -- What causes SIGBUS and should it be caught ? + -- Peter Burwood + + case signo is + when SIGFPE => + raise Constraint_Error; + when SIGILL => + raise Constraint_Error; + when SIGSEGV => + raise Storage_Error; + when SIGBUS => + raise Storage_Error; + when others => + pragma Assert (Shutdown ("Unexpected signal")); + null; + end case; + end Notify_Exception; + + ---------------- + -- Initialize -- + ---------------- + + procedure Initialize is + act : aliased struct_sigaction; + old_act : aliased struct_sigaction; + mask : aliased sigset_t; + Result : Interfaces.C.int; + + begin + + Abort_Task_Interrupt := SIGABRT; + -- Change this if you want to use another signal for task abort. + -- SIGTERM might be a good one. + + act.sa_handler := Notify_Exception'Address; + + act.sa_flags := 16#010#; + -- Set sa_flags to SA_NODEFER so that during the handler execution + -- we do not change the Signal_Mask to be masked for the Signal. + -- This is a temporary fix to the problem that the Signal_Mask is + -- not restored after the exception (longjmp) from the handler. + -- The right fix should be made in sigsetjmp so that we save + -- the Signal_Set and restore it after a longjmp. + -- In that case, this field should be changed back to 0. ??? (Dong-Ik) + + Result := sigemptyset (mask'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---sigemptyset")); + + for I in Exception_Interrupts'Range loop + Result := sigaddset (mask'Access, Signal (Exception_Interrupts (I))); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---sigaddset")); + end loop; + + act.sa_mask := mask; + + for I in Exception_Interrupts'Range loop + Keep_Unmasked (Exception_Interrupts (I)) := True; + Result := + sigaction + (Signal (Exception_Interrupts (I)), act'Access, old_act'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---sigaction")); + end loop; + + Keep_Unmasked (Abort_Task_Interrupt) := true; +-- Keep_Unmasked (SIGBUS) := true; + + Keep_Unmasked (SIGSTOP) := true; + Keep_Unmasked (SIGKILL) := true; + Keep_Unmasked (SIGINT) := true; + + -- Keep_Unmasked (SIGEMT) := true; + -- Keep_Unmasked (SIGCHLD) := true; + -- Keep_Unmasked (SIGALRM) := true; + -- ???? The above signals have been found to need to be + -- kept unmasked on some systems, per Dong-Ik Oh. + -- I don't know whether the MIT/Provenzano threads + -- need these or any other signals unmasked at the thread level. + -- I hope somebody will take + -- the time to look it up. -- Ted Baker + + -- FreeBSD uses SIGINFO to dump thread status to stdout. If + -- the user really wants to attach his own handler, let him. + + -- FreeBSD pthreads uses setitimer/getitimer for thread scheduling. + -- It's not clear, but it looks as if it only needs SIGVTALRM + -- in order to handle the setitimer/getitimer operations. We + -- could probably allow SIGALARM, but we'll leave it as unmasked + -- for now. FreeBSD pthreads also needs SIGCHLD. + Keep_Unmasked (SIGCHLD) := true; + Keep_Unmasked (SIGALRM) := true; + Keep_Unmasked (SIGVTALRM) := true; + + Reserve := Reserve or Keep_Unmasked or Keep_Masked; + + Reserve (0) := true; + -- We do not have Signal 0 in reality. We just use this value + -- to identify non-existent signals (see s-intnam.ads). Therefore, + -- Signal 0 should not be used in all signal related operations hence + -- mark it as reserved. + + end Initialize; + +begin + Initialize; +end System.Interrupt_Management; diff --git a/lang/gnat/files/5fosinte.adb b/lang/gnat/files/5fosinte.adb new file mode 100644 index 000000000000..33d4bcfd2b89 --- /dev/null +++ b/lang/gnat/files/5fosinte.adb @@ -0,0 +1,139 @@ +------------------------------------------------------------------------------ +-- -- +-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- B o d y -- +-- (Version for new GNARL) -- +-- -- +-- $Revision: 1.2 $ -- +-- -- +-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University -- +-- -- +-- GNARL is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNARL; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. It is -- +-- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- +-- State University (http://www.gnat.com). -- +-- -- +------------------------------------------------------------------------------ + +-- This is the FreeBSD THREADS version of this package + +-- This is only a first approximation. +-- It should be autogenerated by the m4 macro processor. +-- Contributed by Daniel M. Eischen (deischen@iworks.InterWorks.org) + +-- DO NOT EDIT this file. +-- It was automatically generated from another file by the m4 macro processor. +-- The name of the file you should edit is the same as this one, but with +-- ".ads" replaced by ".sm4", or +-- ".adb" replaced by ".bm4", or +-- ".c" replaced by ".cm4", or +-- ".dat" replaced by ".tm4" + +-- Local options selected: +-- __TARGET = i386-unknown-freebsd +-- __ARCH = I386 +-- __OS = FREEBSD +-- __HAS_SIGCONTEXT = 1 +-- __HAS_UCONTEXT = 0 +-- __THREADS = POSIX_THREADS +-- __THREAD_VARIANT = ?? +-- __HAS_TIMESPEC = 1 +-- __HAS_NANOSLEEP = 1 +-- __HAS_CLOCK_GETTIME = 0 +-- __HAS_GETTIMEOFDAY = 1 +-- __POSIX_THREAD_PRIO_PROTECT = 0 +-- __POSIX_THREAD_PRIO_INHERIT = 0 +-- __POSIX_THREAD_ATTR_STACKADDR = 1 +-- __POSIX_THREAD_ATTR_STACKSIZE = 1 +-- __POSIX_THREAD_PRIORITY_SCHEDULING = 0 + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- This version is for POSIX-like operating systems +-- The original file "s-osinte.ads_m4" contains conditional +-- macro calls that allow selection of various options. + +with Interfaces.C; use Interfaces.C; +package body System.OS_Interface is + + ----------------- + -- To_Duration -- + ----------------- + + function To_Duration (TS : timespec) return Duration is + begin + return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9; + end To_Duration; + + ----------------- + -- To_Timespec -- + ----------------- + + function To_Timespec (D : Duration) return timespec is + S : time_t; + F : Duration; + begin + S := time_t (Long_Long_Integer (D)); + F := D - Duration (S); + + -- If F has negative value due to a round-up, adjust for positive F + -- value. + if F < 0.0 then S := S - 1; F := F + 1.0; end if; + return timespec' (ts_sec => S, + ts_nsec => long (Long_Long_Integer (F * 10#1#E9))); + end To_Timespec; + + + function To_Duration (TV : struct_timeval) return Duration is + begin + return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6; + end To_Duration; + + function To_Timeval (D : Duration) return struct_timeval is + S : long; + F : Duration; + begin + S := long (Long_Long_Integer (D)); + F := D - Duration (S); + + -- If F has negative value due to a round-up, adjust for positive F + -- value. + if F < 0.0 then S := S - 1; F := F + 1.0; end if; + return struct_timeval' (tv_sec => S, + tv_usec => long (Long_Long_Integer (F * 10#1#E6))); + end To_Timeval; + + -- FreeBSD Pthreads has pthread_yield and it is imported as + -- sched_yield in 5fosinte.ads. The FreeBSD pthread_yield does + -- not have any parameters, so the import may be used directly + -- without the need for a wrapper as shown below. +-- function sched_yield return int is +-- procedure sched_yield_base (arg : System.Address); +-- pragma Import (C, sched_yield_base, "pthread_yield"); +-- begin +-- sched_yield_base (System.Null_Address); +-- return 0; +-- end sched_yield; + +end System.OS_Interface; diff --git a/lang/gnat/files/5fosinte.ads b/lang/gnat/files/5fosinte.ads new file mode 100644 index 000000000000..14450cce307a --- /dev/null +++ b/lang/gnat/files/5fosinte.ads @@ -0,0 +1,742 @@ +------------------------------------------------------------------------------ +-- -- +-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- (Version for new GNARL) -- +-- -- +-- $Revision: 1.5 $ -- +-- -- +-- Copyright (C) 1991,92,93,94,95,1996 Free Software Foundation, Inc. -- +-- -- +-- GNARL is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNARL; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. It is -- +-- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- +-- State University (http://www.gnat.com). -- +-- -- +------------------------------------------------------------------------------ + +-- This is the FreeBSD PTHREADS version of this package + +-- This is only a first approximation. +-- It should be autogenerated by the m4 macro processor. +-- Contributed by Daniel Eischen (deischen@iworks.InterWorks.org) + +-- DO NOT EDIT this file. +-- It was automatically generated from another file by the m4 macro processor. +-- The name of the file you should edit is the same as this one, but with +-- ".ads" replaced by ".sm4", or +-- ".adb" replaced by ".bm4", or +-- ".c" replaced by ".cm4", or +-- ".dat" replaced by ".tm4" + +-- Local options selected: +-- __TARGET = i386-unknown-freebsd +-- __ARCH = I386 +-- __OS = FREEBSD +-- __HAS_SIGCONTEXT = 1 +-- __HAS_UCONTEXT = 0 +-- __THREADS = POSIX_THREADS +-- __THREAD_VARIANT = ?? +-- __HAS_TIMESPEC = 1 +-- __HAS_NANOSLEEP = 1 +-- __HAS_CLOCK_GETTIME = 0 +-- __HAS_GETTIMEOFDAY = 1 +-- __POSIX_THREAD_PRIO_PROTECT = 0 +-- __POSIX_THREAD_PRIO_INHERIT = 0 +-- __POSIX_THREAD_ATTR_STACKADDR = 1 +-- __POSIX_THREAD_ATTR_STACKSIZE = 1 +-- __POSIX_THREAD_PRIORITY_SCHEDULING = 0 + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- PLEASE DO NOT add any with-clauses to this package +-- or remove the pragma Elaborate_Body. +-- It is designed to be a bottom-level (leaf) package. + +-- This version is for POSIX-like operating systems +-- The original file "s-osinte.sm4" contains conditional +-- macro calls that allow selection of various options. +-- The options selected for this expansion were: + +-- When adding new signals to s-osinte.sm4, don't forget to update +-- cconst.dat (m4 macro definition data-file) and the files +-- s-intnam.ads (package Ada.Interrupt_Names) for the various ports. + +with Interfaces.C; +package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options ("-lc_r"); + + subtype int is Interfaces.C.int; + subtype short is Interfaces.C.short; + subtype long is Interfaces.C.long; + subtype unsigned is Interfaces.C.unsigned; + subtype unsigned_short is Interfaces.C.unsigned_short; + subtype unsigned_long is Interfaces.C.unsigned_long; + subtype unsigned_char is Interfaces.C.unsigned_char; + subtype plain_char is Interfaces.C.plain_char; + subtype size_t is Interfaces.C.size_t; + + ----------- + -- Errno -- + ----------- + + function errno return int; + pragma Import (C, errno, "__get_errno"); + + -- NAMEs not used are commented-out + -- NAMEs not supported on this system have __NAME for value + + -- E2BIG : constant := 7; + -- EACCES : constant := 13; + EAGAIN : constant := 35; + -- EBADF : constant := 9; + -- EBUSY : constant := 16; + -- ECHILD : constant := 10; + -- EDEADLK : constant := 11; + -- EDOM : constant := 33; + -- EEXIST : constant := 17; + -- EFAULT : constant := 14; + -- EFBIG : constant := 27; + EINTR : constant := 4; + EINVAL : constant := 22; + -- EIO : constant := 5; + -- EISDIR : constant := 21; + -- EMFILE : constant := 24; + -- EMLINK : constant := 31; + -- ENAMETOOLONG : constant := 63; + -- ENFILE : constant := 23; + -- ENODEV : constant := 19; + -- ENOENT : constant := 2; + -- ENOEXEC : constant := 8; + -- ENOLCK : constant := 37; + ENOMEM : constant := 12; + -- ENOSPC : constant := 28; + -- ENOSYS : constant := 78; + -- ENOTDIR : constant := 20; + -- ENOTEMPTY : constant := 66; + -- ENOTTY : constant := 25; + -- ENXIO : constant := 6; + -- EPERM : constant := 1; + -- EPIPE : constant := 32; + -- ERANGE : constant := 34; + -- EROFS : constant := 30; + -- ESPIPE : constant := 29; + -- ESRCH : constant := 3; + ETIMEDOUT : constant := 60; + -- EXDEV : constant := 18; + + ------------- + -- Signals -- + ------------- + + NSIG : constant := 32; + type Signal is new int range 0 .. Interfaces.C."-" (NSIG, 1); + + -- NAMEs not used are commented-out + -- NAMEs not supported on this system have __NAME for value + + SIGHUP : constant := 1; -- hangup + SIGINT : constant := 2; -- interrupt (rubout) + SIGQUIT : constant := 3; -- quit (ASCD FS) + SIGILL : constant := 4; -- illegal instruction (not reset) + SIGTRAP : constant := 5; -- trace trap (not reset) + SIGIOT : constant := 6; -- IOT instruction + SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future + SIGEMT : constant := 7; -- EMT instruction + SIGFPE : constant := 8; -- floating point exception + SIGKILL : constant := 9; -- kill (cannot be caught or ignored) + SIGBUS : constant := 10; -- bus error + SIGSEGV : constant := 11; -- segmentation violation + SIGSYS : constant := 12; -- bad argument to system call + SIGPIPE : constant := 13; -- write on a pipe with no one to read it + SIGALRM : constant := 14; -- alarm clock + SIGTERM : constant := 15; -- software termination signal from kill + SIGURG : constant := 16; -- urgent condition on IO channel + SIGSTOP : constant := 17; -- stop (cannot be caught or ignored) + SIGTSTP : constant := 18; -- user stop requested from tty + SIGCONT : constant := 19; -- stopped process has been continued + SIGCLD : constant := 20; -- alias for SIGCHLD + SIGCHLD : constant := 20; -- child status change + SIGTTIN : constant := 21; -- background tty read attempted + SIGTTOU : constant := 22; -- background tty write attempted + SIGIO : constant := 23; -- I/O possible (Solaris SIGPOLL alias) + SIGXCPU : constant := 24; -- CPU time limit exceeded + SIGXFSZ : constant := 25; -- filesize limit exceeded + SIGVTALRM : constant := 26; -- virtual timer expired + SIGPROF : constant := 27; -- profiling timer expired + SIGWINCH : constant := 28; -- window size change + SIGINFO : constant := 29; -- information request (NetBSD/FreeBSD) + SIGUSR1 : constant := 30; -- user defined signal 1 + SIGUSR2 : constant := 31; -- user defined signal 2 + + type sigset_t is private; + + function sigaddset + (set : access sigset_t; + sig : Signal) + return int; + pragma Import (C, sigaddset, "sigaddset"); + + function sigdelset + (set : access sigset_t; + sig : Signal) + return int; + pragma Import (C, sigdelset, "sigdelset"); + + function sigfillset + (set : access sigset_t) + return int; + pragma Import (C, sigfillset, "sigfillset"); + + function sigismember + (set : access sigset_t; + sig : Signal) + return int; + pragma Import (C, sigismember, "sigismember"); + + function sigemptyset + (set : access sigset_t) + return int; + pragma Import (C, sigemptyset, "sigemptyset"); + + -- sigcontext is architecture dependent, so define it private + type struct_sigcontext is private; + + type struct_sigaction is record + sa_handler : System.Address; + sa_mask : sigset_t; + sa_flags : int; + end record; + pragma Convention (C, struct_sigaction); + + + SIG_BLOCK : constant := 1; + SIG_UNBLOCK : constant := 2; + SIG_SETMASK : constant := 3; + + -- SA_NOCLDSTOP : constant := 8; + -- not used + -- SA_SIGINFO : constant := __SA_SIGINFO; + -- not used + + SIG_DFL : constant := 0; + SIG_IGN : constant := 1; + -- SIG_ERR : constatn := -1; + -- not used + + function sigaction + (sig : Signal; + act : access struct_sigaction; + oact : access struct_sigaction) + return int; + pragma Import (C, sigaction, "sigaction"); + + ---------- + -- Time -- + ---------- + + type timespec is private; + + function nanosleep (rqtp, rmtp : access timespec) return int; + pragma Import (C, nanosleep, "nanosleep"); + + function To_Duration (TS : timespec) return Duration; + pragma Inline (To_Duration); + + function To_Timespec (D : Duration) return timespec; + pragma Inline (To_Timespec); + + type struct_timezone is record + tz_minuteswest : int; + tz_dsttime : int; + end record; + pragma Convention (C, struct_timezone); + type struct_timeval is private; + -- This is needed on systems that do not have clock_gettime() + -- but do have gettimeofday(). + + function To_Duration (TV : struct_timeval) return Duration; + pragma Inline (To_Duration); + + function To_Timeval (D : Duration) return struct_timeval; + pragma Inline (To_Timeval); + + function gettimeofday + (tv : access struct_timeval; + tz : access struct_timezone) return int; + pragma Import (C, gettimeofday, "gettimeofday"); + + procedure usleep (useconds : unsigned_long); + pragma Import (C, usleep, "usleep"); + + -- add a hook to locate the Epoch, for use with Calendar???? + + ------------------------- + -- Priority Scheduling -- + ------------------------- + + MIN_PRIO : constant := 0; + MAX_PRIO : constant := 126; + + SCHED_RR : constant := 0; + SCHED_IO : constant := 1; + SCHED_FIFO : constant := 2; + SCHED_OTHER : constant := 3; + + ------------- + -- Process -- + ------------- + + type pid_t is private; + + function kill + (pid : pid_t; + sig : Signal) + return int; + pragma Import (C, kill, "kill"); + + function getpid return pid_t; + pragma Import (C, getpid, "getpid"); + + ------------- + -- Threads -- + ------------- + + type Thread_Body is access + function (arg : System.Address) return System.Address; + + + type pthread_t is private; + type pthread_mutex_t is limited private; + type pthread_cond_t is limited private; + type pthread_attr_t is limited private; + type pthread_mutexattr_t is limited private; + type pthread_condattr_t is limited private; + type pthread_key_t is private; + + PTHREAD_CREATE_DETACHED : constant := 1; + PTHREAD_CREATE_JOINABLE : constant := 0; + + --------------------------- + -- POSIX.1c Section 3 -- + --------------------------- + + function sigwait + (set : access sigset_t; + sig : access Signal) + return int; + pragma Import (C, sigwait, "sigwait"); + + function pthread_kill + (thread : pthread_t; + sig : Signal) + return int; + pragma Import (C, pthread_kill, "pthread_kill"); + + function pthread_sigmask + (how : int; + set : access sigset_t; + oset : access sigset_t) + return int; + pragma Import (C, pthread_sigmask, "pthread_sigmask"); + + ---------------------------- + -- POSIX.1c Section 11 -- + ---------------------------- + + function pthread_mutexattr_init + (attr : access pthread_mutexattr_t) + return int; + pragma Import (C, pthread_mutexattr_init, "pthread_mutexattr_init"); + + function pthread_mutexattr_destroy + (attr : access pthread_mutexattr_t) + return int; + pragma Import (C, pthread_mutexattr_destroy, "pthread_mutexattr_destroy"); + + function pthread_mutex_init + (mutex : access pthread_mutex_t; + attr : access pthread_mutexattr_t) + return int; + pragma Import (C, pthread_mutex_init, "pthread_mutex_init"); + + function pthread_mutex_destroy + (mutex : access pthread_mutex_t) + return int; + pragma Import (C, pthread_mutex_destroy, "pthread_mutex_destroy"); + + function pthread_mutex_lock + (mutex : access pthread_mutex_t) + return int; + pragma Import (C, pthread_mutex_lock, "pthread_mutex_lock"); + + function pthread_mutex_unlock + (mutex : access pthread_mutex_t) + return int; + pragma Import (C, pthread_mutex_unlock, "pthread_mutex_unlock"); + + function pthread_condattr_init + (attr : access pthread_condattr_t) + return int; + pragma Import (C, pthread_condattr_init, "pthread_condattr_init"); + + function pthread_condattr_destroy + (attr : access pthread_condattr_t) + return int; + pragma Import (C, pthread_condattr_destroy, "pthread_condattr_destroy"); + + function pthread_cond_init + (cond : access pthread_cond_t; + attr : access pthread_condattr_t) + return int; + pragma Import (C, pthread_cond_init, "pthread_cond_init"); + + function pthread_cond_destroy + (cond : access pthread_cond_t) + return int; + pragma Import (C, pthread_cond_destroy, "pthread_cond_destroy"); + + function pthread_cond_signal + (cond : access pthread_cond_t) + return int; + pragma Import (C, pthread_cond_signal, "pthread_cond_signal"); + + function pthread_cond_wait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t) + return int; + pragma Import (C, pthread_cond_wait, "pthread_cond_wait"); + + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; + abstime : access timespec) + return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + ---------------------------- + -- POSIX.1c Section 13 -- + ---------------------------- + + -- FreeBSD pthreads does not support these yet. +-- PTHREAD_PRIO_NONE : constant := 0; +-- PTHREAD_PRIO_PROTECT : constant := 2; +-- PTHREAD_PRIO_INHERIT : constant := 1; + + -- FreeBSD doesn't have pthread_getschedparam or pthread_setschedparam + -- yet. It has pthread_getprio and pthread_setprio, so we use these + -- instead. + +-- type struct_sched_param is record +-- prio : int; +-- no_data : System.Address; +-- end record; +-- pragma Convention (C, struct_sched_param); +-- +-- function pthread_getschedparam +-- (thread : pthread_t; +-- policy : access int; +-- param : access struct_sched_param) +-- return int; +-- pragma Import (C, pthread_getschedparam, "pthread_getschedparam"); +-- +-- function pthread_setschedparam +-- (thread : pthread_t; +-- policy : int; +-- param : access struct_sched_param) +-- return int; +-- pragma Import (C, pthread_setschedparam, "pthread_setschedparam"); + + function pthread_getschedparam + (thread : pthread_t) + return int; + pragma Import (C, pthread_getschedparam, "pthread_getprio"); + + function pthread_setschedparam + (thread : pthread_t; + priority : int) + return int; + pragma Import (C, pthread_setschedparam, "pthread_setprio"); + + function pthread_attr_setscope + (attr : access pthread_attr_t; + contentionscope : int) + return int; + pragma Import (C, pthread_attr_setscope, "pthread_attr_setscope"); + + function pthread_attr_getscope + (attr : access pthread_attr_t; + contentionscope : access int) + return int; + pragma Import (C, pthread_attr_getscope, "pthread_attr_getscope"); + + function pthread_attr_setinheritsched + (attr : access pthread_attr_t; + inheritsched : int) + return int; + pragma Import + (C, pthread_attr_setinheritsched, "pthread_attr_setinheritsched"); + + function pthread_attr_getinheritsched + (attr : access pthread_attr_t; + inheritsched : access int) + return int; + pragma Import + (C, pthread_attr_getinheritsched, "pthread_attr_getinheritsched"); + + function pthread_attr_setschedpolicy + (attr : access pthread_attr_t; + policy : int) + return int; + pragma Import + (C, pthread_attr_setschedpolicy, + "pthread_attr_setschedpolicy"); + + function pthread_attr_getschedpolicy + (attr : access pthread_attr_t; + policy : access int) + return int; + pragma Import (C, pthread_attr_getschedpolicy, + "pthread_attr_getschedpolicy"); + + -- FreeBSD doesn't have pthread_attr_setschedparm and + -- pthread_attr_getschedparm yet. It has pthread_attr_setprio and + -- pthread_attr_getprio instead. It seems we don't need either one + -- of these, though. + +-- function pthread_attr_setschedparam +-- (attr : access pthread_attr_t; +-- sched_param : access struct_sched_param) +-- return int; +-- pragma Import (C, pthread_attr_setschedparam, +-- "pthread_attr_setschedparam"); +-- +-- function pthread_attr_getschedparam +-- (attr : access pthread_attr_t; +-- sched_param : access struct_sched_param) +-- return int; +-- pragma Import (C, pthread_attr_getschedparam, +-- "pthread_attr_getschedparam"); + function pthread_attr_setschedparam + (attr : access pthread_attr_t; + priority : int) + return int; + pragma Import (C, pthread_attr_setschedparam, "pthread_attr_setprio"); + + function pthread_attr_getschedparam + (attr : access pthread_attr_t) + return int; + pragma Import (C, pthread_attr_getschedparam, "pthread_attr_getprio"); + + function sched_yield return int; + pragma Import (C, sched_yield, "pthread_yield"); + + ----------------------------- + -- P1003.1c - Section 16 -- + ----------------------------- + + function pthread_attr_init + (attributes : access pthread_attr_t) + return int; + pragma Import (C, pthread_attr_init, "pthread_attr_init"); + + function pthread_attr_destroy + (attributes : access pthread_attr_t) + return int; + pragma Import (C, pthread_attr_destroy, "pthread_attr_destroy"); + + + + function pthread_attr_setdetachstate + (attr : access pthread_attr_t; + detachstate : int) + return int; + pragma Import + (C, pthread_attr_setdetachstate, "pthread_attr_setdetachstate"); + + function pthread_attr_getdetachstate + (attr : access pthread_attr_t; + detachstate : access int) + return int; + pragma Import + (C, pthread_attr_getdetachstate, "pthread_attr_getdetachstate"); + + function pthread_attr_getstacksize + (attr : access pthread_attr_t; + stacksize : access size_t) + return int; + pragma Import + (C, pthread_attr_getstacksize, "pthread_attr_getstacksize"); + + function pthread_attr_setstacksize + (attr : access pthread_attr_t; + stacksize : size_t) + return int; + pragma Import + (C, pthread_attr_setstacksize, "pthread_attr_setstacksize"); + + function pthread_create + (thread : access pthread_t; + attributes : access pthread_attr_t; + start_routine : Thread_Body; + arg : System.Address) + return int; + pragma Import (C, pthread_create, "pthread_create"); + + function pthread_detach (thread : pthread_t) return int; + pragma Import (C, pthread_detach, "pthread_detach"); + + procedure pthread_exit (status : System.Address); + pragma Import (C, pthread_exit, "pthread_exit"); + + function pthread_self return pthread_t; + pragma Import (C, pthread_self, "pthread_self"); + + function pthread_equal (t1 : pthread_t; t2 : pthread_t) + return int; + -- be careful not to use "=" on thread_t! + pragma Import (C, pthread_equal, "pthread_equal"); + + ---------------------------- + -- POSIX.1c Section 17 -- + ---------------------------- + + function pthread_setspecific + (key : pthread_key_t; + value : System.Address) + return int; + pragma Import (C, pthread_setspecific, "pthread_setspecific"); + + function pthread_getspecific (key : pthread_key_t) return System.Address; + pragma Import (C, pthread_getspecific, "pthread_getspecific"); + + + type destructor_pointer is access + procedure (arg : System.Address); + + function pthread_key_create + (key : access pthread_key_t; + destructor : destructor_pointer) + return int; + pragma Import (C, pthread_key_create, "pthread_key_create"); + + +private + + type sigset_t is new unsigned_long; + + -- Should we add a signal_context type here ? + -- How could it be done independent of the CPU architecture ? + -- sigcontext type is opaque, so it is architecturally neutral. + -- It is always passed as an access type, so define it as an empty record + -- since the contents are not used anywhere. + type struct_sigcontext is null record; + pragma Convention (C, struct_sigcontext); + + -- In Solaris 2.4 the component sa_handler turns out to + -- be one a union type, and the selector is a macro: + -- #define sa_handler __funcptr._handler + -- #define sa_sigaction __funcptr._sigaction + + type pid_t is new int; + + type time_t is new long; + + type timespec is record + ts_sec : time_t; + ts_nsec : long; + end record; + pragma Convention (C, timespec); + + type struct_timeval is record + tv_sec : long; + tv_usec : long; + end record; + pragma Convention (C, struct_timeval); + + + type enumeral_type_3 is new int; + type pthread_attr_t is record + schedparam_policy : enumeral_type_3; + prio : int; + suspend : int; + flags : int; + arg_attr : System.Address; + cleanup_attr : System.Address; + stackaddr_attr : System.Address; + stacksize_attr : size_t; + end record; + pragma Convention (C, pthread_attr_t); + + type enumeral_type_2 is new int; + type pthread_condattr_t is record + c_type : enumeral_type_2; + c_flags : long; + end record; + pragma Convention (C, pthread_condattr_t); + + type enumeral_type_1 is new int; + type pthread_mutexattr_t is record + m_type : enumeral_type_1; + m_flags : long; + end record; + pragma Convention (C, pthread_mutexattr_t); + + type record_type_3 is null record; + pragma Convention (C, record_type_3); + type pthread_t is access record_type_3; + + type enumeral_type_4 is new int; + type pthread_queue_t is record + q_next : System.Address; + q_last : System.Address; + q_data : System.Address; + end record; + pragma Convention (C, pthread_queue_t); + type union_type_1 is new int; + type pthread_mutex_t is record + m_type : enumeral_type_4; + m_queue : pthread_queue_t; + m_owner : System.Address; +-- m_lock : long; + m_data : union_type_1; + m_flags : long; + end record; + pragma Convention (C, pthread_mutex_t); + + type enumeral_type_5 is new int; + type pthread_cond_t is record + c_type : enumeral_type_5; + c_queue : pthread_queue_t; +-- c_lock : long; + c_data : System.Address; + c_flags : long; + end record; + pragma Convention (C, pthread_cond_t); + + type pthread_key_t is new int; + +end System.OS_Interface; diff --git a/lang/gnat/files/5ftaprop.adb b/lang/gnat/files/5ftaprop.adb new file mode 100644 index 000000000000..33d96dd5d81d --- /dev/null +++ b/lang/gnat/files/5ftaprop.adb @@ -0,0 +1,779 @@ +------------------------------------------------------------------------------ +-- -- +-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S -- +-- -- +-- B o d y -- +-- (Version for new GNARL) -- +-- -- +-- $Revision: 1.4 $ -- +-- -- +-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University -- +-- -- +-- GNARL is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNARL; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. It is -- +-- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- +-- State University (http://www.gnat.com). -- +-- -- +------------------------------------------------------------------------------ + +-- This is the FreeBSD PTHREADS version of this package. Contributed +-- by Daniel M. Eischen (deischen@iworks.InterWorks.org). + +with Interfaces.C; +-- used for int +-- size_t + +with System.Error_Reporting; +-- used for Shutdown + +with System.Interrupt_Management; +-- used for Keep_Unmasked +-- Abort_Task_Interrupt +-- Interrupt_ID + +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; + +package body System.Task_Primitives.Operations is + + use System.Tasking; + use Interfaces.C; + use System.Error_Reporting; + use System.OS_Interface; + use System.Parameters; + use System.Time_Operations; + + pragma Linker_Options ("-lc_r"); + + ------------------ + -- Local Data -- + ------------------ + + -- The followings are logically constants, but need to be initialized + -- at run time. + + 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 + + ----------------------- + -- Local Subprograms -- + ----------------------- + + procedure Abort_Handler + (signo : Signal; + code : Interfaces.C.int; + context : access struct_sigcontext); + + function To_Task_ID is new Unchecked_Conversion (System.Address, Task_ID); + + function To_Address is new Unchecked_Conversion (Task_ID, System.Address); + + ------------------- + -- Abort_Handler -- + ------------------- + + -- Target-dependent binding of inter-thread Abort signal to + -- the raising of the Abort_Signal exception. + + -- The technical issues and alternatives here are essentially + -- the same as for raising exceptions in response to other + -- signals (e.g. Storage_Error). See code and comments in + -- the package body System.Interrupt_Management. + + -- Some implementations may not allow an exception to be propagated + -- out of a handler, and others might leave the signal or + -- interrupt that invoked this handler masked after the exceptional + -- return to the application code. + + -- GNAT exceptions are originally implemented using setjmp()/longjmp(). + -- On most UNIX systems, this will allow transfer out of a signal handler, + -- which is usually the only mechanism available for implementing + -- asynchronous handlers of this kind. However, some + -- systems do not restore the signal mask on longjmp(), leaving the + -- abort signal masked. + + -- Alternative solutions include: + + -- 1. Change the PC saved in the system-dependent Context + -- parameter to point to code that raises the exception. + -- Normal return from this handler will then raise + -- the exception after the mask and other system state has + -- been restored (see example below). + -- 2. Use siglongjmp()/sigsetjmp() to implement exceptions. + -- 3. Unmask the signal in the Abortion_Signal exception handler + -- (in the RTS). + + -- The following procedure would be needed if we can't lonjmp out of + -- a signal handler. (See below.) + -- procedure Raise_Abort_Signal is + -- begin + -- raise Standard'Abort_Signal; + -- end if; + + procedure Abort_Handler + (signo : Signal; + code : Interfaces.C.int; + context : access struct_sigcontext) is + + T : Task_ID := Self; + + begin + -- Assuming it is safe to longjmp out of a signal handler, the + -- following code can be used: + + if T.Deferral_Level = 0 + and then T.Pending_ATC_Level < T.ATC_Nesting_Level then + raise Standard'Abort_Signal; + end if; + + -- Otherwise, something like this is required: + -- if not Abort_Is_Deferred.all then + -- -- Overwrite the return PC address with the address of the + -- -- special raise routine, and "return" to that routine's + -- -- starting address. + -- Context.PC := Raise_Abort_Signal'Address; + -- return; + -- end if; + + end Abort_Handler; + + ---------- + -- Self -- + ---------- + + function Self return Task_ID is + Result : System.Address; + + begin + Result := pthread_getspecific (ATCB_Key); + pragma Assert (Result /= System.Null_Address + or else Shutdown ("GNULLI failure---pthread_getspecific")); + return To_Task_ID (Result); + end Self; + + --------------------- + -- Initialize_Lock -- + --------------------- + + -- Note: mutexes and cond_variables needed per-task basis are + -- initialized in Intialize_TCB and the Storage_Error is + -- handled. Other mutexes (such as All_Tasks_Lock, Memory_Lock...) + -- used in RTS is initialized before any status change of RTS. + -- Therefore rasing Storage_Error in the following routines + -- should be able to be handled safely. + + procedure Initialize_Lock + (Prio : System.Any_Priority; + L : access Lock) + is + Attributes : aliased pthread_mutexattr_t; + Result : Interfaces.C.int; + begin + Result := pthread_mutexattr_init (Attributes'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_mutexattr_init")); + + if Result = ENOMEM then + raise STORAGE_ERROR; + end if; + + Result := pthread_mutex_init (L, Attributes'Access); + + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_mutex_init")); + + if Result = ENOMEM then + raise STORAGE_ERROR; + end if; + + end Initialize_Lock; + + procedure Initialize_Lock (L : access RTS_Lock) is + Attributes : aliased pthread_mutexattr_t; + Result : Interfaces.C.int; + + begin + Result := pthread_mutexattr_init (Attributes'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_mutexattr_init")); + + if Result = ENOMEM then + raise STORAGE_ERROR; + end if; + + Result := pthread_mutex_init (L, Attributes'Access); + + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_mutex_init")); + + if Result = ENOMEM then + raise STORAGE_ERROR; + end if; + + end Initialize_Lock; + + ------------------- + -- Finalize_Lock -- + ------------------- + + procedure Finalize_Lock (L : access Lock) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_destroy (L); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_destroy")); + end Finalize_Lock; + + procedure Finalize_Lock (L : access RTS_Lock) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_destroy (L); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_destroy")); + end Finalize_Lock; + + ---------------- + -- Write_Lock -- + ---------------- + + procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_lock (L); + Ceiling_Violation := Result = EINVAL; + -- 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")); + end Write_Lock; + + procedure Write_Lock (L : access RTS_Lock) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_lock (L); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_lock")); + end Write_Lock; + + procedure Write_Lock (T : Task_ID) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_lock (T.LL.L'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_lock")); + end Write_Lock; + + --------------- + -- Read_Lock -- + --------------- + + procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is + begin + Write_Lock (L, Ceiling_Violation); + end Read_Lock; + + ------------ + -- Unlock -- + ------------ + + procedure Unlock (L : access Lock) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_unlock (L); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_unlock")); + end Unlock; + + procedure Unlock (L : access RTS_Lock) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_unlock (L); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_unlock")); + end Unlock; + + procedure Unlock (T : Task_ID) is + Result : Interfaces.C.int; + + begin + Result := pthread_mutex_unlock (T.LL.L'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_unlock")); + end Unlock; + + ------------- + -- Sleep -- + ------------- + + procedure Sleep (Self_ID : Task_ID) is + Result : Interfaces.C.int; + + begin + pragma Assert (Self_ID = Self + or else Shutdown ("GNULLI failure---Self in Sleep")); + Result := pthread_cond_wait (Self_ID.LL.CV'Access, Self_ID.LL.L'Access); + -- EINTR is not considered a failure. + pragma Assert (Result = 0 or else Result = EINTR + or else Shutdown ("GNULLI failure---Sleep")); + end Sleep; + + --------------- + -- Sleep_For -- + --------------- + + procedure Sleep_For (Self_ID : Task_ID; Rel_Time : Duration) is + Result : Interfaces.C.Int; + Request : aliased timespec; + + 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")); + end Sleep_For; + + ----------------- + -- Sleep_Until -- + ----------------- + + procedure Sleep_Until (Self_ID : Task_ID; Abs_Time : Duration) is + Result : Interfaces.C.Int; + Request : aliased timespec; + + 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)")); + end Sleep_Until; + + ------------ + -- Wakeup -- + ------------ + + procedure Wakeup (T : Task_ID) is + Result : Interfaces.C.int; + + begin + Result := pthread_cond_signal (T.LL.CV'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Wakeup")); + end Wakeup; + + ----------- + -- Yield -- + ----------- + + procedure Yield is + Result : Interfaces.C.int; + begin + Result := sched_yield; + end Yield; + + ------------------ + -- Set_Priority -- + ------------------ + + -- FreeBSD doesn't have the correct pthread_setschedparam routine + -- yet. Instead, pthread_setschedparam is imported from pthread_setprio + -- which only takes a pthread_t and integer as arguments. +-- procedure Set_Priority (T : Task_ID; Prio : System.Any_Priority) is +-- Result : Interfaces.C.int; +-- Param : aliased struct_sched_param; +-- begin +-- T.LL.Current_Priority := Interfaces.C.int (Prio); +-- Param.prio := Interfaces.C.int (Prio); +-- +-- Result := pthread_setschedparam (T.LL.Thread, SCHED_FIFO, +-- Param'Access); +-- pragma Assert (Result = 0 +-- or else Shutdown ("GNULLI failure---Set_Priority")); +-- +-- end Set_Priority; + procedure Set_Priority (T : Task_ID; Prio : System.Any_Priority) is + Result : Interfaces.C.int; + begin + T.LL.Current_Priority := Interfaces.C.int (Prio); + + Result := pthread_setschedparam (T.LL.Thread, Interfaces.C.int (Prio)); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Set_Priority")); + + end Set_Priority; + + ------------------ + -- Get_Priority -- + ------------------ + + function Get_Priority (T : Task_ID) return System.Any_Priority is + begin + return System.Any_Priority (T.LL.Current_Priority); + end Get_Priority; + + ---------------- + -- Enter_Task -- + ---------------- + + 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; + + ---------------------- + -- Initialize_TCB -- + ---------------------- + + procedure Initialize_TCB (Self_ID : Task_ID; Succeeded : out Boolean) is + Mutex_Attr : aliased pthread_mutexattr_t; + Result : Interfaces.C.int; + Cond_Attr : aliased pthread_condattr_t; + + begin + Result := pthread_mutexattr_init (Mutex_Attr'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_mutexattr_init")); + + if Result /= 0 then + Succeeded := False; + return; + end if; + + Result := pthread_mutex_init (Self_ID.LL.L'Access, Mutex_Attr'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_mutex_init")); + + if Result /= 0 then + Succeeded := False; + return; + end if; + + Result := pthread_condattr_init (Cond_Attr'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_condattr_init")); + + if Result /= 0 then + Result := pthread_mutex_destroy (Self_ID.LL.L'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_destory")); + Succeeded := False; + return; + end if; + + Result := pthread_cond_init (Self_ID.LL.CV'Access, Cond_Attr'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_cond_init")); + + if Result /= 0 then + Result := pthread_mutex_destroy (Self_ID.LL.L'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_mutex_destory")); + Succeeded := False; + return; + end if; + + Succeeded := True; + + end Initialize_TCB; + + ----------------- + -- Create_Task -- + ----------------- + + procedure Create_Task + (T : Task_ID; + Wrapper : System.Address; + Stack_Size : System.Parameters.Size_Type; + Priority : System.Any_Priority; + Succeeded : out Boolean) + 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); + + begin + if Stack_Size = System.Parameters.Unspecified_Size then + Adjusted_Stack_Size := Interfaces.C.size_t (2 * Default_Stack_Size); + -- Let's change the s-parame.adb to give a larger Stack_Size ????? + else + if Stack_Size < Size_Type (Minimum_Stack_Size) then + Adjusted_Stack_Size := + Interfaces.C.size_t (Stack_Size + Minimum_Stack_Size); + + -- sum, instead of max: may be overkill, but should be safe + -- thr_min_stack is a function call. + + -- Actually, we want to get the Default_Stack_Size and + -- Minimum_Stack_Size from the file System.Parameters. + -- Right now the package is not made target specific. + -- We use our own local definitions for now ??? + + else + Adjusted_Stack_Size := Interfaces.C.size_t (Stack_Size); + end if; + + -- Ask for 4 extra bytes of stack space so that the ATCB + -- pointer can be stored below the stack limit, plus extra + -- space for the frame of Task_Wrapper. This is so the user + -- gets the amount of stack requested exclusive of the needs + -- of the runtime. + + end if; + + Adjusted_Stack_Size := Adjusted_Stack_Size + 4; + + -- Since the initial signal mask of a thread is inherited from the + -- creator, we need to set our local signal mask mask all signals + -- during the creation operation, to make sure the new thread is + -- not disturbed by signals before it has set its own Task_ID. + + Result := pthread_attr_init (Attributes'Access); + pragma Assert (Result = 0 or else Result = ENOMEM + or else Shutdown ("GNULLI failure---pthread_attr_init")); + + if Result /= 0 then + Succeeded := False; + return; + end if; + + -- Create threads detached following email to report@gnat.com + -- confirming this is correct (should be fixed for GNAT after 3.09). + -- (Peter Burwood) + Result := pthread_attr_setdetachstate + (Attributes'Access, PTHREAD_CREATE_DETACHED); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---pthread_setdetachstate")); + + Result := pthread_attr_setstacksize + (Attributes'Access, Interfaces.C.size_t (Adjusted_Stack_Size)); + 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)")); + + Result := pthread_create + (T.LL.Thread'Access, + Attributes'Access, + Thread_Body_Access (Wrapper), + To_Address (T)); + pragma Assert (Result = 0 or else Result = EAGAIN + or else Shutdown ("GNULLI failure---Create_Task (pthread_create)")); + + 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; + + ------------------ + -- Finalize_TCB -- + ------------------ + + procedure Finalize_TCB (T : Task_ID) is + Result : Interfaces.C.int; + Tmp : Task_ID := T; + + procedure Free is new Unchecked_Deallocation + (Ada_Task_Control_Block, Task_ID); + + begin + Result := pthread_mutex_destroy (T.LL.L'Access); + pragma Assert (Result = 0 or else + Shutdown ("GNULLI failure---Finalize_TCB (pthread_mutex_destroy)")); + Result := pthread_cond_destroy (T.LL.CV'Access); + pragma Assert (Result = 0 or else + Shutdown ("GNULLI failure---Finalize_TCB (pthread_cond_destroy)")); + + -- Following report to report@gnat.com regarding ATCB memory leak + -- this Free is now called. The answer back from ACT didn't give + -- the source for a fix, but I calling this Free is sufficient. + -- (Peter Burwood) + Free (Tmp); + end Finalize_TCB; + + --------------- + -- Exit_Task -- + --------------- + + procedure Exit_Task is + begin + pthread_exit (System.Null_Address); + end Exit_Task; + + ---------------- + -- Abort_Task -- + ---------------- + + procedure Abort_Task (T : Task_ID) is + Result : Interfaces.C.int; + + begin + Result := pthread_kill (T.LL.Thread, + Signal (System.Interrupt_Management.Abort_Task_Interrupt)); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Abort_Task")); + end Abort_Task; + + ---------------- + -- Initialize -- + ---------------- + + procedure Initialize (Environment_Task : Task_ID) is + act : aliased struct_sigaction; + old_act : aliased struct_sigaction; + Tmp_Set : aliased sigset_t; + Result : Interfaces.C.int; + + begin + + Enter_Task (Environment_Task); + + -- Install the abort-signal handler + + act.sa_flags := 0; + act.sa_handler := Abort_Handler'Address; + + Result := sigemptyset (Tmp_Set'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Initialize (sigemptyset)")); + act.sa_mask := Tmp_Set; + + Result := + sigaction ( + Signal (System.Interrupt_Management.Abort_Task_Interrupt), + act'Access, + old_act'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Initialize (sigaction)")); + + end Initialize; + +begin + declare + Result : Interfaces.C.int; + begin + + -- pthread_init; + -- This call is needed for MIT thread library. We wish + -- we could move this to s-osinte.adb and be executed during + -- the package elaboration. However, in doing so we get an + -- elaboration problem. + + -- 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)")); + + Result := sigemptyset (Unblocked_Signal_Mask'Access); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Initialize (sigemptyset)")); + + for J in Interrupt_Management.Interrupt_ID loop + if System.Interrupt_Management.Keep_Unmasked (J) then + Result := sigaddset (Unblocked_Signal_Mask'Access, Signal (J)); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Initialize (sigaddset)")); + end if; + end loop; + + Result := pthread_key_create (ATCB_Key'Access, null); + pragma Assert (Result = 0 + or else Shutdown ("GNULLI failure---Initialize (pthread_keycreate)")); + end; + +end System.Task_Primitives.Operations; diff --git a/lang/gnat/files/5ftaspri.ads b/lang/gnat/files/5ftaspri.ads new file mode 100644 index 000000000000..9cd6b64d989b --- /dev/null +++ b/lang/gnat/files/5ftaspri.ads @@ -0,0 +1,138 @@ +------------------------------------------------------------------------------ +-- -- +-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . T A S K _ P R I M I T I V E S -- +-- -- +-- S p e c -- +-- (Version for new GNARL) -- +-- -- +-- $Revision: 1.1 $ -- +-- -- +-- Copyright (C) 1991,92,93,94,95,1996 Free Software Foundation, Inc. -- +-- -- +-- GNARL is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNARL; see file COPYING. If not, write -- +-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- +-- MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNARL was developed by the GNARL team at Florida State University. It is -- +-- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- +-- State University (http://www.gnat.com). -- +-- -- +------------------------------------------------------------------------------ + +-- This is the FreeBSD PTHREADS version of this package. Contributed +-- by Daniel M. Eischen (deischen@iworks.InterWorks.org). + +-- DO NOT EDIT this file. +-- It was automatically generated from another file by the m4 macro processor. +-- The name of the file you should edit is the same as this one, but with +-- ".ads" replaced by ".sm4", or +-- ".adb" replaced by ".bm4", or +-- ".c" replaced by ".cm4", or +-- ".dat" replaced by ".tm4" + +-- Local options selected: +-- __TARGET = i386-unknown-freebsd +-- __ARCH = I386 +-- __OS = FREEBSD +-- __HAS_SIGCONTEXT = 1 +-- __HAS_UCONTEXT = 0 +-- __THREADS = POSIX_THREADS +-- __THREAD_VARIANT = ?? +-- __HAS_TIMESPEC = 1 +-- __HAS_NANOSLEEP = 1 +-- __HAS_CLOCK_GETTIME = 0 +-- __HAS_GETTIMEOFDAY = 1 +-- __POSIX_THREAD_PRIO_PROTECT = 0 +-- __POSIX_THREAD_PRIO_INHERIT = 0 +-- __POSIX_THREAD_ATTR_STACKADDR = 1 +-- __POSIX_THREAD_ATTR_STACKSIZE = 1 +-- __POSIX_THREAD_PRIORITY_SCHEDULING = 0 + +-- This package provides low-level support for most tasking features. + +with Interfaces.C; +-- used for int +-- size_t + +with System.OS_Interface; +-- used for pthread_mutex_t +-- pthread_cond_t +-- pthread_t + +package System.Task_Primitives is + + type Lock is limited private; + -- Should be used for implementation of protected objects. + + type RTS_Lock is limited private; + -- Should be used inside the runtime system. + -- The difference between Lock and the RTS_Lock is that the later + -- one serves only as a semaphore so that do not check for + -- ceiling violations. + + type Task_Body_Access is access procedure; + -- Pointer to the task body's entry point (or possibly a wrapper + -- declared local to the GNARL). + + type Private_Data is limited private; + -- Any information that the GNULLI needs maintained on a per-task + -- basis. A component of this type is guaranteed to be included + -- in the Ada_Task_Control_Block. + +private + + type Lock is new System.OS_Interface.pthread_mutex_t; + type RTS_Lock is new System.OS_Interface.pthread_mutex_t; + type Private_Data is record + Thread : aliased System.OS_Interface.pthread_t; + pragma Atomic (Thread); + -- Thread field may be updated by two different threads of control. + -- (See, Enter_Task and Create_Task in s-taprop.adb). + -- They put the same value (thr_self value). We do not want to + -- use lock on those operations and the only thing we have to + -- make sure is that they are updated in atomic fashion. + CV : aliased System.OS_Interface.pthread_cond_t; + L : aliased RTS_Lock; + -- protection for all components is lock L + Current_Priority : Interfaces.C.int := 0; + -- Active priority, except that the effects of protected object + -- priority ceilings are not reflected. This only reflects explicit + -- priority changes and priority inherited through task activation + -- and rendezvous. + -- Ada 95 notes: In Ada 95, this field will be transferred to the + -- Priority field of an Entry_Calls component when an entry call + -- is initiated. The Priority of the Entry_Calls component will not + -- change for the duration of the call. The accepting task can + -- use it to boost its own priority without fear of its changing in + -- the meantime. + -- This can safely be used in the priority ordering + -- of entry queues. Once a call is queued, its priority does not + -- change. + -- Since an entry call cannot be made while executing + -- a protected action, the priority of a task will never reflect a + -- priority ceiling change at the point of an entry call. + -- Protection: Only written by Self, and only accessed when Acceptor + -- accepts an entry or when Created activates, at which points Self is + -- suspended. + Stack_Size : Interfaces.c.size_t; + -- Requested stack size. + -- Protection: Only used by Self. + end record; + +end System.Task_Primitives; diff --git a/lang/gnat/files/patch-aa b/lang/gnat/files/patch-aa new file mode 100644 index 000000000000..eb8cd4588e4a --- /dev/null +++ b/lang/gnat/files/patch-aa @@ -0,0 +1,141 @@ +diff -c orig/Makefile.in gcc/Makefile.in +*** orig/Makefile.in Thu Mar 27 17:32:15 1997 +--- gcc-2.7.2.1/Makefile.in Fri Apr 4 19:55:09 1997 +*************** +*** 189,200 **** + local_prefix = /usr/local + # Directory in which to put host dependent programs and libraries + exec_prefix = $(prefix) + # Directory in which to put the executable for the command `gcc' + bindir = $(exec_prefix)/bin + # Directory in which to put the directories used by the compiler. + libdir = $(exec_prefix)/lib + # Directory in which the compiler finds executables, libraries, etc. +! libsubdir = $(libdir)/gcc-lib/$(target)/$(version) + # Directory in which the compiler finds g++ includes. + gxx_include_dir= $(libdir)/g++-include + # Directory to search for site-specific includes. +--- 189,202 ---- + local_prefix = /usr/local + # Directory in which to put host dependent programs and libraries + exec_prefix = $(prefix) ++ # directory to hold compilers ++ compdir = $(prefix)/libexec/ada + # Directory in which to put the executable for the command `gcc' + bindir = $(exec_prefix)/bin + # Directory in which to put the directories used by the compiler. + libdir = $(exec_prefix)/lib + # Directory in which the compiler finds executables, libraries, etc. +! libsubdir = $(libdir) + # Directory in which the compiler finds g++ includes. + gxx_include_dir= $(libdir)/g++-include + # Directory to search for site-specific includes. +*************** +*** 213,219 **** + mandir = $(prefix)/man/man1 + # Directory in which to find other cross-compilation tools and headers. + # Used in install-cross. +! tooldir = $(exec_prefix)/$(target) + # Dir for temp files. + tmpdir = /tmp + +--- 215,221 ---- + mandir = $(prefix)/man/man1 + # Directory in which to find other cross-compilation tools and headers. + # Used in install-cross. +! tooldir = $(exec_prefix) + # Dir for temp files. + tmpdir = /tmp + +*************** +*** 1141,1148 **** + + gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files) + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ +! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \ + -DDEFAULT_TARGET_VERSION=\"$(version)\" \ + -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ + -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \ +--- 1143,1152 ---- + + gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files) + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ++ -DFREEBSD_NATIVE \ ++ -DFREEBSD_PREFIX=\"$(prefix)\" \ + -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ +! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/\" \ + -DDEFAULT_TARGET_VERSION=\"$(version)\" \ + -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ + -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \ +*************** +*** 2055,2069 **** + # Create the installation directory. + install-dir: + -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi +- -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi + # This dir isn't currently searched by cpp. + # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi +! -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi +! -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi +! -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi + -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi + -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi + -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi + -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi + -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi + # We don't use mkdir -p to create the parents of mandir, +--- 2059,2073 ---- + # Create the installation directory. + install-dir: + -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi + # This dir isn't currently searched by cpp. + # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi +! # -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi +! # -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi +! # -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi + -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi + -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi + -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi ++ -if [ -d $(compdir) ] ; then true ; else mkdir $(compdir) ; chmod a+rx $(compdir) ; fi + -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi + -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi + # We don't use mkdir -p to create the parents of mandir, +*************** +*** 2077,2084 **** + install-common: native install-dir $(EXTRA_PARTS) lang.install-common + for file in $(COMPILERS); do \ + if [ -f $$file ] ; then \ +! rm -f $(libsubdir)/$$file; \ +! $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ + else true; \ + fi; \ + done +--- 2081,2088 ---- + install-common: native install-dir $(EXTRA_PARTS) lang.install-common + for file in $(COMPILERS); do \ + if [ -f $$file ] ; then \ +! rm -f $(compdir)/$$file; \ +! $(INSTALL_PROGRAM) $$file $(compdir)/$$file; \ + else true; \ + fi; \ + done +*************** +*** 2110,2117 **** + $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ + chmod a-x $(libsubdir)/SYSCALLS.c.X; \ + fi +! -rm -f $(libsubdir)/cpp$(exeext) +! $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext) + + # Install the driver program as $(target)-gcc + # and also as either gcc (if native) or $(tooldir)/bin/gcc. +--- 2114,2121 ---- + $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ + chmod a-x $(libsubdir)/SYSCALLS.c.X; \ + fi +! -rm -f $(compdir)/cpp$(exeext) +! $(INSTALL_PROGRAM) cpp$(exeext) $(compdir)/cpp$(exeext) + + # Install the driver program as $(target)-gcc + # and also as either gcc (if native) or $(tooldir)/bin/gcc. diff --git a/lang/gnat/files/patch-ab b/lang/gnat/files/patch-ab new file mode 100644 index 000000000000..baf5ebdeec18 --- /dev/null +++ b/lang/gnat/files/patch-ab @@ -0,0 +1,36 @@ +diff -c orig/gcc.c gcc/gcc.c +*** orig/gcc.c Thu Apr 3 08:37:06 1997 +--- gcc-2.7.2.1/gcc.c Fri Apr 4 23:21:00 1997 +*************** +*** 1354,1362 **** + #undef MD_STARTFILE_PREFIX_1 + #endif + +! #ifndef STANDARD_EXEC_PREFIX +! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/" +! #endif /* !defined STANDARD_EXEC_PREFIX */ + + static char *standard_exec_prefix = STANDARD_EXEC_PREFIX; + static char *standard_exec_prefix_1 = "/usr/lib/gcc/"; +--- 1354,1360 ---- + #undef MD_STARTFILE_PREFIX_1 + #endif + +! #define STANDARD_EXEC_PREFIX FREEBSD_PREFIX "/libexec/" + + static char *standard_exec_prefix = STANDARD_EXEC_PREFIX; + static char *standard_exec_prefix_1 = "/usr/lib/gcc/"; +*************** +*** 2708,2715 **** +--- 2706,2716 ---- + /* Use 2 as fourth arg meaning try just the machine as a suffix, + as well as trying the machine and the version. */ + #ifdef FREEBSD_NATIVE ++ add_prefix (&exec_prefixes, FREEBSD_PREFIX "/libexec/ada/", 0, 0, NULL_PTR); ++ add_prefix (&exec_prefixes, FREEBSD_PREFIX "/libexec/", 0, 0, NULL_PTR); + add_prefix (&exec_prefixes, "/usr/libexec/", 0, 0, NULL_PTR); + add_prefix (&exec_prefixes, "/usr/bin/", 0, 0, NULL_PTR); ++ add_prefix (&startfile_prefixes, FREEBSD_PREFIX "/lib/", 0, 0, NULL_PTR); + add_prefix (&startfile_prefixes, "/usr/libdata/gcc/", 0, 0, NULL_PTR); + #else /* not FREEBSD_NATIVE */ + #ifndef OS2 diff --git a/lang/gnat/files/patch-ac b/lang/gnat/files/patch-ac new file mode 100644 index 000000000000..e2e24ca4b439 --- /dev/null +++ b/lang/gnat/files/patch-ac @@ -0,0 +1,20 @@ +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 +*************** +*** 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 diff --git a/lang/gnat/files/patch-ad b/lang/gnat/files/patch-ad new file mode 100644 index 000000000000..b1a4ed1dd153 --- /dev/null +++ b/lang/gnat/files/patch-ad @@ -0,0 +1,46 @@ +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 +*************** +*** 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* |\ + *) \ + \ +*************** +*** 845,848 **** +--- 853,857 ---- + *-go32-msdos | *-go32 |\ + *86*-linux* |\ ++ *86*-freebsd* |\ + *) \ + \ diff --git a/lang/gnat/files/patch-ae b/lang/gnat/files/patch-ae new file mode 100644 index 000000000000..85b50c157c15 --- /dev/null +++ b/lang/gnat/files/patch-ae @@ -0,0 +1,36 @@ +*** 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 +*************** +*** 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 diff --git a/lang/gnat/files/patch-af b/lang/gnat/files/patch-af new file mode 100644 index 000000000000..ed40cbcf144f --- /dev/null +++ b/lang/gnat/files/patch-af @@ -0,0 +1,19 @@ +*** 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 +*************** +*** 899,905 **** + + (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 ---- + + (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/pkg-descr b/lang/gnat/pkg-descr index c5c10dd7e77d..a38a4e8b6b50 100644 --- a/lang/gnat/pkg-descr +++ b/lang/gnat/pkg-descr @@ -1,181 +1,7 @@ -GNAT IMPLEMENTED FEATURES LIST -Current as of 01/26/95 +The GNU ada compiler Gnat 3.09 built on GCC 2.7.2.1. -Here is the list of implemented and not implemented features. A more precise -description of the GNAT system is provided in the file 'gnatinfo.txt', which -is part of the GNAT distribution. - -Latest features in GNAT version 2.02 -==================================== - - Extension aggregates are implemented (not much tested so far) - The Storage_Pool mechanism is in place - Functions returning unconstrained values shouldn't leak anymore - Enumeration representation clauses are fully implemented - Record representation clauses are implemented (currently there is - a restriction that all fields must be given a position and tagged - records cannot yet be given representation clauses) - The constrained attribute is implemented - Conformance checking is fully implemented - Shared variables (pragmas Shared, Atomic, Atomic_Components, - Volatile, and Volatile_Components) are implemented - User-defined Initialize/Adjust/Finalize is now almost complete for - controlled types as well as for types containing controlled components. - (aggregates involving controlled types and functions returning objects - with controlled components may still cause trouble). - Alignment attribute and attribute definition clause are implemented - Pred and Succ for fixed-point types are implemented - Discard_Names pragma is implemented - Arrays are passed properly to convention C routines - Pragma Inspection_Point is implemented - Pragma Locking_Policy is implemented - Pragma Task_Dispatching_Policy is implemented - Pragma Memory_Size is implemented (it is ignored anyway) - Derived types from private types are impelmented - Floating-point attribute functions are implemented: - Adjacent, Ceiling, Compose, Copy_Sign, Exponent, Floor, Fraction, - Leading_Part, Machine, Model, Pred, Remainder, Rounding, Scaling, Succ, - Truncation, Unbiased_Rounding - Pragma Optimize is implemented (checks that GCC optimization level is - consistent) - Pragma Reviewable is implemented (checks that GCC debug option "-g" is set) - Pragma Controlled is implemented (but ignored so far) - The attributes Version and Body_Version are implemented - Pragma Linker_Options is implemented - Attribute Max_Size_In_Storage_Elements is implemented - The attribute Valid is implemented - Requeue without abort is implemented - Delay statement on OS/2 is now working correctly. - The attribute Bit_Order is implemented - Range checking for modular types - Length checks are now implemented - Pragma Import Fortran and COBOL are implemented - Pragma Convention is now fully implemented (for C, Fortran, COBOL), - Pragma Convention for Fortran correctly maps multi-dimensional arrays - -======================================================================= - -Status of Features - -============================================================================ -= All of Ada 83 is implemented EXCEPT the following unimplemented features = -============================================================================ - - The following language-defined checks are not implemented: - - Discriminant Checks - Elaboration Checks - Range Checks on the elaboration of a subtype_indication - Stack overflow checking - - Language-Defined Pragmas - Pack for arrays - - Input-Output for Integer for type Long_Long_Integer. - (only Put currently supported for Long_Long_Integer not Get) - - Delay is not yet fixed-point as required (the current temporary - implementation uses floating-point to represent Delay). - - Tasking is currently implemented only on the following platforms - SGI IRIX 5.2, Sun Sparc (SunOS 4.1), i386 running IBM OS/2 - -========================================================================= -= All of Ada 95 implemented EXCEPT the following unimplemented features = -========================================================================= - - CORE - - Protected entry families - Protected subprogram pointers - Condition protected entry calls - Requeue Statement involving task entries - Delay until - - Input-Output for Modular Types - (Only Put is supported currently, Get not yet supported) - - Input-Output for Decimal Types - Input-Output for Wide Text - - Objects of type with unknown discriminants - - Unimplemented subprograms in package Ada.Text_IO - Flush - Look_Ahead - Get_Immediate - - Accessibility checks - - Stream-Oriented Attributes of Specific Types - Stream-Oriented Attributes of Class-Wide Types - - ANNEX A. PREDEFINED LANGUAGE ENVIRONMENT - - Ada.Exceptions - Ada.Interrupts - Ada.Streams.Stream_IO - Ada.Wide_Text_IO - Ada.Wide_Text_IO.Complex_IO - - ANNEX B. INTERFACING TO OTHER LANGUAGES - - The body of Interfaces.COBOL is not yet implemented - - ANNEX C. SYSTEMS PROGRAMMING - - Machine intrinsic subprograms - Interrupt support - The body of package Interrupts is not implemented - Preelaboration requirements are not fully met - - ANNEX D. REAL-TIME SYSTEMS - - Tasking restrictions - Synchronous task control - - ANNEX E. DISTRIBUTED SYSTEMS - - The distribution annex is under active development. Stub generation - is not yet implemented, and there is no configuration control program. - All pragmas are fully implemented. - - ANNEX F. INFORMATION SYSTEMS - - Ada.Text_IO.Editing - Ada.Wide_Text_IO.Editing - - ANNEX G. NUMERICS - - Accuracy requirements for floating-point and complex not fully met - - ANNEX H. SAFETY AND SECURITY - - pragma Normalize_Scalars - Safety and security restrictions - - ANNEX I. OBSOLESCENT FEATURES - - Interrupt entries - - ANNEX J. LANGUAGE-DEFINED ATTRIBUTES - - Caller - Definite - External_Tag - Identity - Input - Output - Read - Storage_Pool - Write - - ANNEX K. LANGUAGE DEFINED PRAGMAS - - Attach_Handler - Export - Interrupt_Handler - Normalize_Scalars - Queuing_Policy - Restrictions +The libraries supplied with this version of GNAT support tasking if +minor modifications are made to FreeBSD's libc_r. +Maurice Castro +maurice@serc.rmit.edu.au diff --git a/lang/gnat/pkg-plist b/lang/gnat/pkg-plist index 47339c633732..d7517fedf61b 100644 --- a/lang/gnat/pkg-plist +++ b/lang/gnat/pkg-plist @@ -1,12 +1,17 @@ -libexec/gnat1 +bin/adagcc bin/gnatbind -bin/gnatf -bin/gnatk8 -bin/gnatchp -bin/gnatchop bin/gnatbl -include/adainclude/a-calcon.adb -include/adainclude/a-calcon.ads +bin/gnatchop +bin/gnatchp +bin/gnatcmd +bin/gnatf +bin/gnatkr +bin/gnatlink +bin/gnatmake +bin/gnatprep +bin/i386-unknown-freebsd2.2-gcc +include/adainclude/a-astaco.adb +include/adainclude/a-astaco.ads include/adainclude/a-caldel.adb include/adainclude/a-caldel.ads include/adainclude/a-calend.adb @@ -15,21 +20,29 @@ include/adainclude/a-chahan.adb include/adainclude/a-chahan.ads include/adainclude/a-charac.ads include/adainclude/a-chlat1.ads +include/adainclude/a-colien.adb +include/adainclude/a-colien.ads include/adainclude/a-comlin.adb include/adainclude/a-comlin.ads include/adainclude/a-cwila1.ads include/adainclude/a-decima.adb include/adainclude/a-decima.ads +include/adainclude/a-diocst.adb +include/adainclude/a-diocst.ads include/adainclude/a-direio.adb include/adainclude/a-direio.ads include/adainclude/a-dynpri.adb include/adainclude/a-dynpri.ads +include/adainclude/a-except.adb include/adainclude/a-except.ads +include/adainclude/a-filico.adb +include/adainclude/a-filico.ads include/adainclude/a-finali.adb include/adainclude/a-finali.ads include/adainclude/a-flteio.ads include/adainclude/a-fwteio.ads include/adainclude/a-inteio.ads +include/adainclude/a-interr.adb include/adainclude/a-interr.ads include/adainclude/a-intnam.ads include/adainclude/a-ioexce.ads @@ -42,15 +55,23 @@ include/adainclude/a-llftio.ads include/adainclude/a-llfwti.ads include/adainclude/a-llitio.ads include/adainclude/a-lliwti.ads +include/adainclude/a-ncelfu.ads include/adainclude/a-ngcefu.adb include/adainclude/a-ngcefu.ads include/adainclude/a-ngcoty.adb include/adainclude/a-ngcoty.ads include/adainclude/a-ngelfu.adb include/adainclude/a-ngelfu.ads +include/adainclude/a-nlcefu.ads +include/adainclude/a-nlcoty.ads include/adainclude/a-nlelfu.ads +include/adainclude/a-nllcef.ads +include/adainclude/a-nllcty.ads include/adainclude/a-nllefu.ads +include/adainclude/a-nscefu.ads +include/adainclude/a-nscoty.ads include/adainclude/a-nselfu.ads +include/adainclude/a-nucoty.ads include/adainclude/a-nudira.adb include/adainclude/a-nudira.ads include/adainclude/a-nuelfu.ads @@ -62,16 +83,18 @@ include/adainclude/a-numran.adb include/adainclude/a-numran.ads include/adainclude/a-reatim.adb include/adainclude/a-reatim.ads -include/adainclude/a-retico.adb -include/adainclude/a-retico.ads include/adainclude/a-retide.adb include/adainclude/a-retide.ads include/adainclude/a-sequio.adb include/adainclude/a-sequio.ads include/adainclude/a-sfteio.ads include/adainclude/a-sfwtio.ads +include/adainclude/a-siocst.adb +include/adainclude/a-siocst.ads include/adainclude/a-siteio.ads include/adainclude/a-siwtio.ads +include/adainclude/a-ssicst.adb +include/adainclude/a-ssicst.ads include/adainclude/a-ssitio.ads include/adainclude/a-ssiwti.ads include/adainclude/a-stmaco.ads @@ -89,6 +112,7 @@ include/adainclude/a-strsea.adb include/adainclude/a-strsea.ads include/adainclude/a-strunb.adb include/adainclude/a-strunb.ads +include/adainclude/a-ststio.adb include/adainclude/a-ststio.ads include/adainclude/a-stwibo.adb include/adainclude/a-stwibo.ads @@ -101,6 +125,7 @@ include/adainclude/a-stwise.ads include/adainclude/a-stwiun.adb include/adainclude/a-stwiun.ads include/adainclude/a-swmwco.ads +include/adainclude/a-sytaco.adb include/adainclude/a-sytaco.ads include/adainclude/a-tags.adb include/adainclude/a-tags.ads @@ -108,71 +133,154 @@ include/adainclude/a-tasatt.adb include/adainclude/a-tasatt.ads include/adainclude/a-taside.adb include/adainclude/a-taside.ads -include/adainclude/a-teioau.adb -include/adainclude/a-teioau.ads -include/adainclude/a-teiopi.adb -include/adainclude/a-teiopi.ads +include/adainclude/a-teioed.adb +include/adainclude/a-teioed.ads include/adainclude/a-textio.adb include/adainclude/a-textio.ads +include/adainclude/a-ticoau.adb +include/adainclude/a-ticoau.ads include/adainclude/a-ticoio.adb include/adainclude/a-ticoio.ads +include/adainclude/a-tideau.adb +include/adainclude/a-tideau.ads +include/adainclude/a-tideio.adb +include/adainclude/a-tideio.ads +include/adainclude/a-tienau.adb +include/adainclude/a-tienau.ads +include/adainclude/a-tienio.adb +include/adainclude/a-tienio.ads +include/adainclude/a-tifiio.adb +include/adainclude/a-tifiio.ads +include/adainclude/a-tiflau.adb +include/adainclude/a-tiflau.ads +include/adainclude/a-tiflio.adb +include/adainclude/a-tiflio.ads +include/adainclude/a-tigeau.adb +include/adainclude/a-tigeau.ads +include/adainclude/a-tiinau.adb +include/adainclude/a-tiinau.ads +include/adainclude/a-tiinio.adb +include/adainclude/a-tiinio.ads +include/adainclude/a-timoau.adb +include/adainclude/a-timoau.ads +include/adainclude/a-timoio.adb +include/adainclude/a-timoio.ads +include/adainclude/a-tiocst.adb +include/adainclude/a-tiocst.ads include/adainclude/a-titest.adb include/adainclude/a-titest.ads include/adainclude/a-unccon.ads include/adainclude/a-uncdea.adb include/adainclude/a-uncdea.ads +include/adainclude/a-witeio.adb include/adainclude/a-witeio.ads -include/adainclude/a-wticio.ads -include/adainclude/a-wtiopi.ads -include/adainclude/a-wtitst.adb -include/adainclude/a-wtitst.ads +include/adainclude/a-wtcoau.adb +include/adainclude/a-wtcoau.ads +include/adainclude/a-wtcoio.adb +include/adainclude/a-wtcoio.ads +include/adainclude/a-wtcstr.adb +include/adainclude/a-wtcstr.ads +include/adainclude/a-wtdeau.adb +include/adainclude/a-wtdeau.ads +include/adainclude/a-wtdeio.adb +include/adainclude/a-wtdeio.ads +include/adainclude/a-wtedit.adb +include/adainclude/a-wtedit.ads +include/adainclude/a-wtenau.adb +include/adainclude/a-wtenau.ads +include/adainclude/a-wtenio.adb +include/adainclude/a-wtenio.ads +include/adainclude/a-wtfiio.adb +include/adainclude/a-wtfiio.ads +include/adainclude/a-wtflau.adb +include/adainclude/a-wtflau.ads +include/adainclude/a-wtflio.adb +include/adainclude/a-wtflio.ads +include/adainclude/a-wtgeau.adb +include/adainclude/a-wtgeau.ads +include/adainclude/a-wtinau.adb +include/adainclude/a-wtinau.ads +include/adainclude/a-wtinio.adb +include/adainclude/a-wtinio.ads +include/adainclude/a-wtmoau.adb +include/adainclude/a-wtmoau.ads +include/adainclude/a-wtmoio.adb +include/adainclude/a-wtmoio.ads +include/adainclude/a-wttest.adb +include/adainclude/a-wttest.ads include/adainclude/ada.ads include/adainclude/calendar.ads include/adainclude/directio.ads include/adainclude/g-busora.adb include/adainclude/g-busora.ads +include/adainclude/g-busorg.adb +include/adainclude/g-busorg.ads +include/adainclude/g-casuti.adb +include/adainclude/g-casuti.ads include/adainclude/g-hesora.adb include/adainclude/g-hesora.ads +include/adainclude/g-hesorg.adb +include/adainclude/g-hesorg.ads +include/adainclude/g-htable.adb +include/adainclude/g-htable.ads include/adainclude/g-io.adb include/adainclude/g-io.ads +include/adainclude/g-io_aux.adb +include/adainclude/g-io_aux.ads +include/adainclude/g-os_lib.adb +include/adainclude/g-os_lib.ads include/adainclude/gnat.ads include/adainclude/i-c.adb include/adainclude/i-c.ads +include/adainclude/i-cexten.ads +include/adainclude/i-cobol.adb include/adainclude/i-cobol.ads -include/adainclude/i-cpoerr.ads include/adainclude/i-cpoint.adb include/adainclude/i-cpoint.ads -include/adainclude/i-cporte.adb -include/adainclude/i-cporte.ads -include/adainclude/i-cpotim.adb -include/adainclude/i-cpotim.ads include/adainclude/i-cpp.adb include/adainclude/i-cpp.ads -include/adainclude/i-cpthre.adb -include/adainclude/i-cpthre.ads +include/adainclude/i-cstrea.adb +include/adainclude/i-cstrea.ads include/adainclude/i-cstrin.adb include/adainclude/i-cstrin.ads -include/adainclude/i-csycon.ads include/adainclude/i-fortra.adb include/adainclude/i-fortra.ads +include/adainclude/i-os2err.ads +include/adainclude/i-os2lib.adb +include/adainclude/i-os2lib.ads +include/adainclude/i-os2syn.ads +include/adainclude/i-os2thr.ads include/adainclude/i-pacdec.adb include/adainclude/i-pacdec.ads include/adainclude/interfac.ads include/adainclude/ioexcept.ads +include/adainclude/machcode.ads include/adainclude/s-addima.adb include/adainclude/s-addima.ads include/adainclude/s-arit64.adb include/adainclude/s-arit64.ads include/adainclude/s-assert.adb include/adainclude/s-assert.ads +include/adainclude/s-asthan.adb +include/adainclude/s-asthan.ads include/adainclude/s-atacco.adb include/adainclude/s-atacco.ads +include/adainclude/s-auxdec.adb +include/adainclude/s-auxdec.ads +include/adainclude/s-bitops.adb +include/adainclude/s-bitops.ads include/adainclude/s-cconst.ads +include/adainclude/s-chepoo.ads include/adainclude/s-comexc.adb include/adainclude/s-comexc.ads -include/adainclude/s-comopt.ads +include/adainclude/s-debpoo.adb +include/adainclude/s-debpoo.ads +include/adainclude/s-direio.adb +include/adainclude/s-direio.ads include/adainclude/s-errrep.adb include/adainclude/s-errrep.ads +include/adainclude/s-exctab.adb +include/adainclude/s-exctab.ads include/adainclude/s-exnflt.ads include/adainclude/s-exngen.adb include/adainclude/s-exngen.ads @@ -207,9 +315,13 @@ include/adainclude/s-fatgen.ads include/adainclude/s-fatlfl.ads include/adainclude/s-fatllf.ads include/adainclude/s-fatsfl.ads -include/adainclude/s-filaux.ads +include/adainclude/s-ficobl.ads +include/adainclude/s-fileio.adb +include/adainclude/s-fileio.ads include/adainclude/s-finimp.adb include/adainclude/s-finimp.ads +include/adainclude/s-finroo.adb +include/adainclude/s-finroo.ads include/adainclude/s-fore.adb include/adainclude/s-fore.ads include/adainclude/s-imgbiu.adb @@ -240,11 +352,75 @@ include/adainclude/s-imgwch.adb include/adainclude/s-imgwch.ads include/adainclude/s-imgwiu.adb include/adainclude/s-imgwiu.ads +include/adainclude/s-inmaop.adb +include/adainclude/s-inmaop.ads +include/adainclude/s-interr.adb +include/adainclude/s-interr.ads +include/adainclude/s-intman.adb +include/adainclude/s-intman.ads include/adainclude/s-io.adb include/adainclude/s-io.ads +include/adainclude/s-maccod.ads +include/adainclude/s-mantis.adb +include/adainclude/s-mantis.ads +include/adainclude/s-osinte.adb +include/adainclude/s-osinte.ads +include/adainclude/s-pack03.adb +include/adainclude/s-pack03.ads +include/adainclude/s-pack05.adb +include/adainclude/s-pack05.ads +include/adainclude/s-pack06.adb +include/adainclude/s-pack06.ads +include/adainclude/s-pack07.adb +include/adainclude/s-pack07.ads +include/adainclude/s-pack09.adb +include/adainclude/s-pack09.ads +include/adainclude/s-pack10.adb +include/adainclude/s-pack10.ads +include/adainclude/s-pack11.adb +include/adainclude/s-pack11.ads +include/adainclude/s-pack12.adb +include/adainclude/s-pack12.ads +include/adainclude/s-pack13.adb +include/adainclude/s-pack13.ads +include/adainclude/s-pack14.adb +include/adainclude/s-pack14.ads +include/adainclude/s-pack15.adb +include/adainclude/s-pack15.ads +include/adainclude/s-pack17.adb +include/adainclude/s-pack17.ads +include/adainclude/s-pack18.adb +include/adainclude/s-pack18.ads +include/adainclude/s-pack19.adb +include/adainclude/s-pack19.ads +include/adainclude/s-pack20.adb +include/adainclude/s-pack20.ads +include/adainclude/s-pack21.adb +include/adainclude/s-pack21.ads +include/adainclude/s-pack22.adb +include/adainclude/s-pack22.ads +include/adainclude/s-pack23.adb +include/adainclude/s-pack23.ads +include/adainclude/s-pack24.adb +include/adainclude/s-pack24.ads +include/adainclude/s-pack25.adb +include/adainclude/s-pack25.ads +include/adainclude/s-pack26.adb +include/adainclude/s-pack26.ads +include/adainclude/s-pack27.adb +include/adainclude/s-pack27.ads +include/adainclude/s-pack28.adb +include/adainclude/s-pack28.ads +include/adainclude/s-pack29.adb +include/adainclude/s-pack29.ads +include/adainclude/s-pack30.adb +include/adainclude/s-pack30.ads +include/adainclude/s-pack31.adb +include/adainclude/s-pack31.ads +include/adainclude/s-parame.adb include/adainclude/s-parame.ads -include/adainclude/s-pooemp.adb -include/adainclude/s-pooemp.ads +include/adainclude/s-parint.adb +include/adainclude/s-parint.ads include/adainclude/s-pooglo.adb include/adainclude/s-pooglo.ads include/adainclude/s-pooloc.adb @@ -252,66 +428,76 @@ include/adainclude/s-pooloc.ads include/adainclude/s-poosiz.adb include/adainclude/s-poosiz.ads include/adainclude/s-powtab.ads +include/adainclude/s-proinf.adb +include/adainclude/s-proinf.ads +include/adainclude/s-rpc.adb +include/adainclude/s-rpc.ads include/adainclude/s-secsta.adb include/adainclude/s-secsta.ads -include/adainclude/s-signal.adb -include/adainclude/s-signal.ads +include/adainclude/s-sequio.adb +include/adainclude/s-sequio.ads +include/adainclude/s-stalib.adb include/adainclude/s-stalib.ads include/adainclude/s-std.adb include/adainclude/s-std.ads include/adainclude/s-stoele.adb include/adainclude/s-stoele.ads include/adainclude/s-stopoo.ads +include/adainclude/s-stratt.adb +include/adainclude/s-stratt.ads include/adainclude/s-strcon.adb include/adainclude/s-strcon.ads include/adainclude/s-strequ.adb include/adainclude/s-strequ.ads include/adainclude/s-strops.adb include/adainclude/s-strops.ads +include/adainclude/s-taenca.adb +include/adainclude/s-taenca.ads include/adainclude/s-taprob.adb include/adainclude/s-taprob.ads +include/adainclude/s-taprop.adb +include/adainclude/s-taprop.ads include/adainclude/s-tasabo.adb include/adainclude/s-tasabo.ads -include/adainclude/s-tasclo.adb -include/adainclude/s-tasclo.ads +include/adainclude/s-tasinf.ads +include/adainclude/s-tasini.adb +include/adainclude/s-tasini.ads include/adainclude/s-taskin.adb include/adainclude/s-taskin.ads -include/adainclude/s-taslib.adb -include/adainclude/s-taslib.ads -include/adainclude/s-tasmem.adb -include/adainclude/s-tasmem.ads include/adainclude/s-tasoli.adb include/adainclude/s-tasoli.ads include/adainclude/s-taspda.adb include/adainclude/s-taspda.ads -include/adainclude/s-taspri.adb include/adainclude/s-taspri.ads include/adainclude/s-tasque.adb include/adainclude/s-tasque.ads +include/adainclude/s-tasqup.adb include/adainclude/s-tasren.adb include/adainclude/s-tasren.ads include/adainclude/s-tassta.adb include/adainclude/s-tassta.ads -include/adainclude/s-tastal.adb -include/adainclude/s-tastal.ads include/adainclude/s-tastim.adb include/adainclude/s-tastim.ads include/adainclude/s-tasuti.adb include/adainclude/s-tasuti.ads -include/adainclude/s-tatise.adb -include/adainclude/s-tatise.ads -include/adainclude/s-tcmasp.adb -include/adainclude/s-tcmasp.ads +include/adainclude/s-tataat.adb +include/adainclude/s-tataat.ads +include/adainclude/s-timope.adb +include/adainclude/s-timope.ads include/adainclude/s-timtyp.ads include/adainclude/s-unstyp.ads include/adainclude/s-valboo.adb include/adainclude/s-valboo.ads include/adainclude/s-valcha.adb include/adainclude/s-valcha.ads +include/adainclude/s-valdec.adb +include/adainclude/s-valdec.ads include/adainclude/s-valenu.adb include/adainclude/s-valenu.ads include/adainclude/s-valint.adb include/adainclude/s-valint.ads +include/adainclude/s-vallld.adb +include/adainclude/s-vallld.ads include/adainclude/s-vallli.adb include/adainclude/s-vallli.ads include/adainclude/s-valllu.adb @@ -322,8 +508,12 @@ include/adainclude/s-valuns.adb include/adainclude/s-valuns.ads include/adainclude/s-valuti.adb include/adainclude/s-valuti.ads +include/adainclude/s-valwch.adb +include/adainclude/s-valwch.ads include/adainclude/s-vercon.adb include/adainclude/s-vercon.ads +include/adainclude/s-wchcnv.adb +include/adainclude/s-wchcnv.ads include/adainclude/s-wchcon.ads include/adainclude/s-wchjis.adb include/adainclude/s-wchjis.ads @@ -343,15 +533,56 @@ include/adainclude/s-widllu.adb include/adainclude/s-widllu.ads include/adainclude/s-widwch.adb include/adainclude/s-widwch.ads +include/adainclude/s-wwdcha.adb +include/adainclude/s-wwdcha.ads +include/adainclude/s-wwdenu.adb +include/adainclude/s-wwdenu.ads +include/adainclude/s-wwdwch.adb +include/adainclude/s-wwdwch.ads include/adainclude/sequenio.ads include/adainclude/system.ads include/adainclude/text_io.ads include/adainclude/unchconv.ads include/adainclude/unchdeal.adb include/adainclude/unchdeal.ads +include/adainclude/win_task-errors.ads +include/adainclude/win_task-synchronization.ads +include/adainclude/win_task-threads.ads +include/adainclude/win_task.adb +include/adainclude/win_task.ads +include/assert.h +info/cpp.info +info/cpp.info-1 +info/cpp.info-2 +info/cpp.info-3 +info/gcc.info +info/gcc.info-1 +info/gcc.info-10 +info/gcc.info-11 +info/gcc.info-12 +info/gcc.info-13 +info/gcc.info-14 +info/gcc.info-15 +info/gcc.info-16 +info/gcc.info-17 +info/gcc.info-18 +info/gcc.info-19 +info/gcc.info-2 +info/gcc.info-20 +info/gcc.info-21 +info/gcc.info-22 +info/gcc.info-23 +info/gcc.info-24 +info/gcc.info-25 +info/gcc.info-3 +info/gcc.info-4 +info/gcc.info-5 +info/gcc.info-6 +info/gcc.info-7 +info/gcc.info-8 +info/gcc.info-9 +lib/adalib/a-adaint.o lib/adalib/a-argv.o -lib/adalib/a-calcon.ali -lib/adalib/a-calcon.o lib/adalib/a-caldel.ali lib/adalib/a-caldel.o lib/adalib/a-calend.ali @@ -363,8 +594,11 @@ lib/adalib/a-charac.o lib/adalib/a-chlat1.ali lib/adalib/a-chlat1.o lib/adalib/a-cio.o +lib/adalib/a-colien.ali +lib/adalib/a-colien.o lib/adalib/a-comlin.ali lib/adalib/a-comlin.o +lib/adalib/a-cstrea.o lib/adalib/a-cwila1.ali lib/adalib/a-cwila1.o lib/adalib/a-decima.ali @@ -372,29 +606,67 @@ lib/adalib/a-decima.o lib/adalib/a-dynpri.ali lib/adalib/a-dynpri.o lib/adalib/a-errno.o +lib/adalib/a-except.ali +lib/adalib/a-except.o lib/adalib/a-exit.o +lib/adalib/a-filico.ali +lib/adalib/a-filico.o +lib/adalib/a-final.o lib/adalib/a-finali.ali lib/adalib/a-finali.o lib/adalib/a-flteio.ali lib/adalib/a-flteio.o +lib/adalib/a-fwteio.ali +lib/adalib/a-fwteio.o +lib/adalib/a-init.o lib/adalib/a-inteio.ali lib/adalib/a-inteio.o +lib/adalib/a-interr.ali +lib/adalib/a-interr.o lib/adalib/a-intnam.ali lib/adalib/a-intnam.o lib/adalib/a-ioexce.ali lib/adalib/a-ioexce.o +lib/adalib/a-iwteio.ali +lib/adalib/a-iwteio.o +lib/adalib/a-lfteio.ali +lib/adalib/a-lfteio.o +lib/adalib/a-lfwtio.ali +lib/adalib/a-lfwtio.o lib/adalib/a-liteio.ali lib/adalib/a-liteio.o +lib/adalib/a-liwtio.ali +lib/adalib/a-liwtio.o lib/adalib/a-llftio.ali lib/adalib/a-llftio.o +lib/adalib/a-llfwti.ali +lib/adalib/a-llfwti.o lib/adalib/a-llitio.ali lib/adalib/a-llitio.o +lib/adalib/a-lliwti.ali +lib/adalib/a-lliwti.o +lib/adalib/a-ncelfu.ali +lib/adalib/a-ncelfu.o +lib/adalib/a-nlcefu.ali +lib/adalib/a-nlcefu.o +lib/adalib/a-nlcoty.ali +lib/adalib/a-nlcoty.o lib/adalib/a-nlelfu.ali lib/adalib/a-nlelfu.o +lib/adalib/a-nllcef.ali +lib/adalib/a-nllcef.o +lib/adalib/a-nllcty.ali +lib/adalib/a-nllcty.o lib/adalib/a-nllefu.ali lib/adalib/a-nllefu.o +lib/adalib/a-nscefu.ali +lib/adalib/a-nscefu.o +lib/adalib/a-nscoty.ali +lib/adalib/a-nscoty.o lib/adalib/a-nselfu.ali lib/adalib/a-nselfu.o +lib/adalib/a-nucoty.ali +lib/adalib/a-nucoty.o lib/adalib/a-nuelfu.ali lib/adalib/a-nuelfu.o lib/adalib/a-nuflra.ali @@ -408,16 +680,22 @@ lib/adalib/a-numran.o lib/adalib/a-raise.o lib/adalib/a-reatim.ali lib/adalib/a-reatim.o -lib/adalib/a-retico.ali -lib/adalib/a-retico.o lib/adalib/a-retide.ali lib/adalib/a-retide.o lib/adalib/a-sfteio.ali lib/adalib/a-sfteio.o +lib/adalib/a-sfwtio.ali +lib/adalib/a-sfwtio.o lib/adalib/a-siteio.ali lib/adalib/a-siteio.o +lib/adalib/a-siwtio.ali +lib/adalib/a-siwtio.o +lib/adalib/a-ssicst.ali +lib/adalib/a-ssicst.o lib/adalib/a-ssitio.ali lib/adalib/a-ssitio.o +lib/adalib/a-ssiwti.ali +lib/adalib/a-ssiwti.o lib/adalib/a-stmaco.ali lib/adalib/a-stmaco.o lib/adalib/a-strbou.ali @@ -434,6 +712,8 @@ lib/adalib/a-strsea.ali lib/adalib/a-strsea.o lib/adalib/a-strunb.ali lib/adalib/a-strunb.o +lib/adalib/a-ststio.ali +lib/adalib/a-ststio.o lib/adalib/a-stwibo.ali lib/adalib/a-stwibo.o lib/adalib/a-stwifi.ali @@ -447,43 +727,89 @@ lib/adalib/a-stwiun.o lib/adalib/a-swmwco.ali lib/adalib/a-swmwco.o lib/adalib/a-sysdep.o +lib/adalib/a-sytaco.ali +lib/adalib/a-sytaco.o lib/adalib/a-tags.ali lib/adalib/a-tags.o lib/adalib/a-taside.ali lib/adalib/a-taside.o -lib/adalib/a-teioau.ali -lib/adalib/a-teioau.o +lib/adalib/a-teioed.ali +lib/adalib/a-teioed.o lib/adalib/a-textio.ali lib/adalib/a-textio.o +lib/adalib/a-ticoau.ali +lib/adalib/a-ticoau.o +lib/adalib/a-tideau.ali +lib/adalib/a-tideau.o +lib/adalib/a-tienau.ali +lib/adalib/a-tienau.o +lib/adalib/a-tiflau.ali +lib/adalib/a-tiflau.o +lib/adalib/a-tigeau.ali +lib/adalib/a-tigeau.o +lib/adalib/a-tiinau.ali +lib/adalib/a-tiinau.o lib/adalib/a-time.o +lib/adalib/a-timoau.ali +lib/adalib/a-timoau.o +lib/adalib/a-tiocst.ali +lib/adalib/a-tiocst.o +lib/adalib/a-titest.ali +lib/adalib/a-titest.o +lib/adalib/a-witeio.ali +lib/adalib/a-witeio.o +lib/adalib/a-wtcoau.ali +lib/adalib/a-wtcoau.o +lib/adalib/a-wtcstr.ali +lib/adalib/a-wtcstr.o +lib/adalib/a-wtdeau.ali +lib/adalib/a-wtdeau.o +lib/adalib/a-wtedit.ali +lib/adalib/a-wtedit.o +lib/adalib/a-wtenau.ali +lib/adalib/a-wtenau.o +lib/adalib/a-wtflau.ali +lib/adalib/a-wtflau.o +lib/adalib/a-wtgeau.ali +lib/adalib/a-wtgeau.o +lib/adalib/a-wtinau.ali +lib/adalib/a-wtinau.o +lib/adalib/a-wtmoau.ali +lib/adalib/a-wtmoau.o +lib/adalib/a-wttest.ali +lib/adalib/a-wttest.o lib/adalib/ada.ali lib/adalib/ada.o lib/adalib/calendar.ali lib/adalib/calendar.o lib/adalib/g-busora.ali lib/adalib/g-busora.o +lib/adalib/g-casuti.ali +lib/adalib/g-casuti.o lib/adalib/g-hesora.ali lib/adalib/g-hesora.o +lib/adalib/g-htable.ali +lib/adalib/g-htable.o lib/adalib/g-io.ali lib/adalib/g-io.o +lib/adalib/g-io_aux.ali +lib/adalib/g-io_aux.o +lib/adalib/g-os_lib.ali +lib/adalib/g-os_lib.o lib/adalib/gnat.ali lib/adalib/gnat.o lib/adalib/i-c.ali lib/adalib/i-c.o -lib/adalib/i-cpoerr.ali -lib/adalib/i-cpoerr.o -lib/adalib/i-cporte.ali -lib/adalib/i-cporte.o -lib/adalib/i-cpotim.ali -lib/adalib/i-cpotim.o +lib/adalib/i-cexten.ali +lib/adalib/i-cexten.o +lib/adalib/i-cobol.ali +lib/adalib/i-cobol.o lib/adalib/i-cpp.ali lib/adalib/i-cpp.o -lib/adalib/i-cpthre.ali -lib/adalib/i-cpthre.o +lib/adalib/i-cstrea.ali +lib/adalib/i-cstrea.o lib/adalib/i-cstrin.ali lib/adalib/i-cstrin.o -lib/adalib/i-csycon.ali -lib/adalib/i-csycon.o lib/adalib/i-fortra.ali lib/adalib/i-fortra.o lib/adalib/i-pacdec.ali @@ -493,22 +819,34 @@ lib/adalib/interfac.o lib/adalib/io-aux.o lib/adalib/ioexcept.ali lib/adalib/ioexcept.o -lib/adalib/libgnat.a -lib/adalib/libgthreads.a +lib/adalib/machcode.ali +lib/adalib/machcode.o lib/adalib/s-addima.ali lib/adalib/s-addima.o lib/adalib/s-arit64.ali lib/adalib/s-arit64.o lib/adalib/s-assert.ali lib/adalib/s-assert.o +lib/adalib/s-asthan.ali +lib/adalib/s-asthan.o +lib/adalib/s-auxdec.ali +lib/adalib/s-auxdec.o +lib/adalib/s-bitops.ali +lib/adalib/s-bitops.o lib/adalib/s-cconst.ali lib/adalib/s-cconst.o +lib/adalib/s-chepoo.ali +lib/adalib/s-chepoo.o lib/adalib/s-comexc.ali lib/adalib/s-comexc.o -lib/adalib/s-comopt.ali -lib/adalib/s-comopt.o +lib/adalib/s-debpoo.ali +lib/adalib/s-debpoo.o +lib/adalib/s-direio.ali +lib/adalib/s-direio.o lib/adalib/s-errrep.ali lib/adalib/s-errrep.o +lib/adalib/s-exctab.ali +lib/adalib/s-exctab.o lib/adalib/s-exnflt.ali lib/adalib/s-exnflt.o lib/adalib/s-exngen.ali @@ -563,10 +901,14 @@ lib/adalib/s-fatllf.ali lib/adalib/s-fatllf.o lib/adalib/s-fatsfl.ali lib/adalib/s-fatsfl.o -lib/adalib/s-filaux.ali -lib/adalib/s-filaux.o +lib/adalib/s-ficobl.ali +lib/adalib/s-ficobl.o +lib/adalib/s-fileio.ali +lib/adalib/s-fileio.o lib/adalib/s-finimp.ali lib/adalib/s-finimp.o +lib/adalib/s-finroo.ali +lib/adalib/s-finroo.o lib/adalib/s-fore.ali lib/adalib/s-fore.o lib/adalib/s-imgbiu.ali @@ -597,12 +939,76 @@ lib/adalib/s-imgwch.ali lib/adalib/s-imgwch.o lib/adalib/s-imgwiu.ali lib/adalib/s-imgwiu.o +lib/adalib/s-inmaop.ali +lib/adalib/s-inmaop.o +lib/adalib/s-interr.ali +lib/adalib/s-interr.o +lib/adalib/s-intman.ali +lib/adalib/s-intman.o lib/adalib/s-io.ali lib/adalib/s-io.o +lib/adalib/s-maccod.ali +lib/adalib/s-maccod.o +lib/adalib/s-mantis.ali +lib/adalib/s-mantis.o +lib/adalib/s-osinte.ali +lib/adalib/s-osinte.o +lib/adalib/s-pack03.ali +lib/adalib/s-pack03.o +lib/adalib/s-pack05.ali +lib/adalib/s-pack05.o +lib/adalib/s-pack06.ali +lib/adalib/s-pack06.o +lib/adalib/s-pack07.ali +lib/adalib/s-pack07.o +lib/adalib/s-pack09.ali +lib/adalib/s-pack09.o +lib/adalib/s-pack10.ali +lib/adalib/s-pack10.o +lib/adalib/s-pack11.ali +lib/adalib/s-pack11.o +lib/adalib/s-pack12.ali +lib/adalib/s-pack12.o +lib/adalib/s-pack13.ali +lib/adalib/s-pack13.o +lib/adalib/s-pack14.ali +lib/adalib/s-pack14.o +lib/adalib/s-pack15.ali +lib/adalib/s-pack15.o +lib/adalib/s-pack17.ali +lib/adalib/s-pack17.o +lib/adalib/s-pack18.ali +lib/adalib/s-pack18.o +lib/adalib/s-pack19.ali +lib/adalib/s-pack19.o +lib/adalib/s-pack20.ali +lib/adalib/s-pack20.o +lib/adalib/s-pack21.ali +lib/adalib/s-pack21.o +lib/adalib/s-pack22.ali +lib/adalib/s-pack22.o +lib/adalib/s-pack23.ali +lib/adalib/s-pack23.o +lib/adalib/s-pack24.ali +lib/adalib/s-pack24.o +lib/adalib/s-pack25.ali +lib/adalib/s-pack25.o +lib/adalib/s-pack26.ali +lib/adalib/s-pack26.o +lib/adalib/s-pack27.ali +lib/adalib/s-pack27.o +lib/adalib/s-pack28.ali +lib/adalib/s-pack28.o +lib/adalib/s-pack29.ali +lib/adalib/s-pack29.o +lib/adalib/s-pack30.ali +lib/adalib/s-pack30.o +lib/adalib/s-pack31.ali +lib/adalib/s-pack31.o lib/adalib/s-parame.ali lib/adalib/s-parame.o -lib/adalib/s-pooemp.ali -lib/adalib/s-pooemp.o +lib/adalib/s-parint.ali +lib/adalib/s-parint.o lib/adalib/s-pooglo.ali lib/adalib/s-pooglo.o lib/adalib/s-pooloc.ali @@ -611,10 +1017,14 @@ lib/adalib/s-poosiz.ali lib/adalib/s-poosiz.o lib/adalib/s-powtab.ali lib/adalib/s-powtab.o +lib/adalib/s-proinf.ali +lib/adalib/s-proinf.o +lib/adalib/s-rpc.ali +lib/adalib/s-rpc.o lib/adalib/s-secsta.ali lib/adalib/s-secsta.o -lib/adalib/s-signal.ali -lib/adalib/s-signal.o +lib/adalib/s-sequio.ali +lib/adalib/s-sequio.o lib/adalib/s-stalib.ali lib/adalib/s-stalib.o lib/adalib/s-std.ali @@ -623,24 +1033,28 @@ lib/adalib/s-stoele.ali lib/adalib/s-stoele.o lib/adalib/s-stopoo.ali lib/adalib/s-stopoo.o +lib/adalib/s-stratt.ali +lib/adalib/s-stratt.o lib/adalib/s-strcon.ali lib/adalib/s-strcon.o lib/adalib/s-strequ.ali lib/adalib/s-strequ.o lib/adalib/s-strops.ali lib/adalib/s-strops.o +lib/adalib/s-taenca.ali +lib/adalib/s-taenca.o lib/adalib/s-taprob.ali lib/adalib/s-taprob.o +lib/adalib/s-taprop.ali +lib/adalib/s-taprop.o lib/adalib/s-tasabo.ali lib/adalib/s-tasabo.o -lib/adalib/s-tasclo.ali -lib/adalib/s-tasclo.o +lib/adalib/s-tasinf.ali +lib/adalib/s-tasinf.o +lib/adalib/s-tasini.ali +lib/adalib/s-tasini.o lib/adalib/s-taskin.ali lib/adalib/s-taskin.o -lib/adalib/s-taslib.ali -lib/adalib/s-taslib.o -lib/adalib/s-tasmem.ali -lib/adalib/s-tasmem.o lib/adalib/s-tasoli.ali lib/adalib/s-tasoli.o lib/adalib/s-taspda.ali @@ -649,20 +1063,20 @@ lib/adalib/s-taspri.ali lib/adalib/s-taspri.o lib/adalib/s-tasque.ali lib/adalib/s-tasque.o +lib/adalib/s-tasqup.ali +lib/adalib/s-tasqup.o lib/adalib/s-tasren.ali lib/adalib/s-tasren.o lib/adalib/s-tassta.ali lib/adalib/s-tassta.o -lib/adalib/s-tastal.ali -lib/adalib/s-tastal.o lib/adalib/s-tastim.ali lib/adalib/s-tastim.o lib/adalib/s-tasuti.ali lib/adalib/s-tasuti.o -lib/adalib/s-tatise.ali -lib/adalib/s-tatise.o -lib/adalib/s-tcmasp.ali -lib/adalib/s-tcmasp.o +lib/adalib/s-tataat.ali +lib/adalib/s-tataat.o +lib/adalib/s-timope.ali +lib/adalib/s-timope.o lib/adalib/s-timtyp.ali lib/adalib/s-timtyp.o lib/adalib/s-unstyp.ali @@ -671,10 +1085,14 @@ lib/adalib/s-valboo.ali lib/adalib/s-valboo.o lib/adalib/s-valcha.ali lib/adalib/s-valcha.o +lib/adalib/s-valdec.ali +lib/adalib/s-valdec.o lib/adalib/s-valenu.ali lib/adalib/s-valenu.o lib/adalib/s-valint.ali lib/adalib/s-valint.o +lib/adalib/s-vallld.ali +lib/adalib/s-vallld.o lib/adalib/s-vallli.ali lib/adalib/s-vallli.o lib/adalib/s-valllu.ali @@ -685,8 +1103,12 @@ lib/adalib/s-valuns.ali lib/adalib/s-valuns.o lib/adalib/s-valuti.ali lib/adalib/s-valuti.o +lib/adalib/s-valwch.ali +lib/adalib/s-valwch.o lib/adalib/s-vercon.ali lib/adalib/s-vercon.o +lib/adalib/s-wchcnv.ali +lib/adalib/s-wchcnv.o lib/adalib/s-wchcon.ali lib/adalib/s-wchcon.o lib/adalib/s-wchjis.ali @@ -707,7 +1129,36 @@ lib/adalib/s-widllu.ali lib/adalib/s-widllu.o lib/adalib/s-widwch.ali lib/adalib/s-widwch.o +lib/adalib/s-wwdcha.ali +lib/adalib/s-wwdcha.o +lib/adalib/s-wwdenu.ali +lib/adalib/s-wwdenu.o +lib/adalib/s-wwdwch.ali +lib/adalib/s-wwdwch.o lib/adalib/system.ali lib/adalib/system.o lib/adalib/text_io.ali lib/adalib/text_io.o +lib/g++-include +lib/include/README +lib/include/float.h +lib/include/limits.h +lib/include/objc/NXConstStr.h +lib/include/objc/Object.h +lib/include/objc/Protocol.h +lib/include/objc/encoding.h +lib/include/objc/hash.h +lib/include/objc/list.h +lib/include/objc/objc-api.h +lib/include/objc/objc.h +lib/include/objc/sarray.h +lib/include/objc/typedstream.h +lib/include/syslimits.h +lib/libgcc.a +lib/libgnat.a +lib/specs +libexec/ada/cc1 +libexec/ada/cpp +libexec/ada/gnat1 +man/man1/cccp.1 +man/man1/gcc.1