1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Update jgnat so it will continue to build with the new compiler which

has much stricter Ada 95 style checking.

PR: 34749
Submitted by: MAINTAINER
This commit is contained in:
Kevin Lo 2002-02-09 08:20:42 +00:00
parent 04d303cc0a
commit b82428243b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54413
16 changed files with 353 additions and 4 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= jgnat
PORTVERSION= 1.1.p
PORTREVISION= 1
CATEGORIES= lang java
MASTER_SITES= ftp://cs.nyu.edu/pub/gnat/jgnat/jgnat-1.1p/split-1.1p/ \
ftp://ftp.cdrom.com/pub/languages/ada/compiler/gnat/jgnat/jgnat-1.1p/split-1.1p/ \
@ -34,13 +35,14 @@ WRKSRC= ${WRKDIR}/${DISTNAME:C@-([^\-]+)$@/\1@}
LIBDIR= ${PREFIX}/lib/jgnat
ADAINCDIR= ${LIBDIR}/adainclude
ADALIBDIR= ${LIBDIR}/adalib
JARDIR= ${PREFIX}/share/java/classes
do-install:
.for dir in ${LIBDIR} ${ADAINCDIR} ${ADALIBDIR}
.for dir in ${LIBDIR} ${ADAINCDIR} ${ADALIBDIR} ${JARDIR}
@${MKDIR} ${dir}
.endfor
@${INSTALL_PROGRAM} ${WRKSRC}/../bin/* ${PREFIX}/bin
@${INSTALL_DATA} ${WRKSRC}/../lib/jgnat.jar ${LIBDIR}
@${INSTALL_DATA} ${WRKSRC}/../lib/jgnat.jar ${JARDIR}
@${INSTALL_DATA} ${WRKSRC}/../lib/jgnat/adainclude/* ${ADAINCDIR}
@${INSTALL_DATA} ${WRKSRC}/../lib/jgnat/adalib/* ${ADALIBDIR}
@${CHMOD} a-r ${ADALIBDIR}/*.ali

View File

@ -0,0 +1,10 @@
--- a-chahan.adb.orig Fri Sep 1 10:13:48 2000
+++ a-chahan.adb Fri Feb 8 22:14:02 2002
@@ -38,7 +38,6 @@
with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants;
package body Ada.Characters.Handling is
-pragma Preelaborate (Handling);
------------------------------------
-- Character Classification Table --

View File

@ -0,0 +1,15 @@
--- bindgen.adb.orig Fri Sep 1 10:13:49 2000
+++ bindgen.adb Fri Feb 8 21:58:21 2002
@@ -1890,10 +1890,10 @@
-- Constants to help defining periods
- Always : constant := 0;
+ -- Always : constant := 0;
Hour : constant := 60;
Day : constant := 24 * Hour;
- Month : constant := 30 * Day;
+ -- Month : constant := 30 * Day;
Never : constant := Integer'Last;
-- Special value indicating no warnings should be given

View File

@ -0,0 +1,11 @@
--- exp_ch4.adb.orig Fri Sep 1 10:13:50 2000
+++ exp_ch4.adb Fri Feb 8 21:20:29 2002
@@ -2623,7 +2623,7 @@
Expand_Concatenate_Other (Cnode, Opnds);
end if;
- exit when Cnode = N;
+ exit Outer when Cnode = N;
Cnode := Parent (Cnode);
end loop Outer;
end Expand_N_Op_Concat;

View File

@ -0,0 +1,11 @@
--- gnatbind.adb.orig Fri Sep 1 10:13:51 2000
+++ gnatbind.adb Fri Feb 8 21:50:43 2002
@@ -183,7 +183,7 @@
Next_Arg := 1;
Scan_Args : loop
- exit when Next_Arg >= Arg_Count;
+ exit Scan_Args when Next_Arg >= Arg_Count;
declare
Next_Argv : String (1 .. Len_Arg (Next_Arg));

View File

@ -0,0 +1,11 @@
--- gnatls.adb.orig Fri Sep 1 10:13:51 2000
+++ gnatls.adb Fri Feb 8 22:04:50 2002
@@ -678,7 +678,7 @@
Next_Arg := 1;
Scan_Args : loop
- exit when Next_Arg >= Arg_Count;
+ exit Scan_Args when Next_Arg >= Arg_Count;
declare
Next_Argv : String (1 .. Len_Arg (Next_Arg));

View File

@ -0,0 +1,11 @@
--- make.adb.orig Fri Sep 1 10:13:54 2000
+++ make.adb Fri Feb 8 21:44:31 2002
@@ -1824,7 +1824,7 @@
Next_Arg := 1;
Scan_Args : loop
- exit when Next_Arg > Argument_Count;
+ exit Scan_Args when Next_Arg > Argument_Count;
Scan_Make_Arg (Argument (Next_Arg));
Next_Arg := Next_Arg + 1;
end loop Scan_Args;

View File

@ -0,0 +1,11 @@
--- par-ch3.adb.orig Fri Sep 1 10:13:57 2000
+++ par-ch3.adb Fri Feb 8 21:14:11 2002
@@ -2587,7 +2587,7 @@
P_Component_Items (Decls_List);
P_Pragmas_Opt (Decls_List);
- exit when Token = Tok_End
+ exit Component_Scan_Loop when Token = Tok_End
or else Token = Tok_Case
or else Token = Tok_When;

View File

@ -0,0 +1,11 @@
--- par-ch5.adb.orig Fri Sep 1 10:13:57 2000
+++ par-ch5.adb Fri Feb 8 21:15:01 2002
@@ -1006,7 +1006,7 @@
-- Error recovery: can raise Error_Resync
- function P_Assignment_Statement (Lhs : Node_Id) return Node_Id is
+ function P_Assignment_Statement (LHS : Node_Id) return Node_Id is
Assign_Node : Node_Id;
begin

View File

@ -0,0 +1,133 @@
--- /dev/null Fri Feb 8 20:51:30 2002
+++ s-imgenu.adb Fri Feb 8 20:53:07 2002
@@ -0,0 +1,130 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUNTIME COMPONENTS --
+-- --
+-- S Y S T E M . I M G _ E N U M --
+-- --
+-- B o d y --
+-- --
+-- $Revision: 1.2 $
+-- --
+-- Copyright (C) 2000 Free Software Foundation, Inc. --
+-- --
+-- GNAT 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. GNAT 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 GNAT; 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. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- --
+------------------------------------------------------------------------------
+
+with Unchecked_Conversion;
+
+package body System.Img_Enum is
+
+ -------------------------
+ -- Image_Enumeration_8 --
+ -------------------------
+
+ function Image_Enumeration_8
+ (Pos : Natural;
+ Names : String;
+ Indexes : System.Address)
+ return String
+ is
+ type Natural_8 is range 0 .. 2 ** 7 - 1;
+ type Index_Table is array (Natural) of Natural_8;
+ type Index_Table_Ptr is access Index_Table;
+
+ function To_Index_Table_Ptr is
+ new Unchecked_Conversion (System.Address, Index_Table_Ptr);
+
+ IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes);
+
+ Start : Natural := Natural (IndexesT (Pos));
+ Next : Natural := Natural (IndexesT (Pos + 1));
+
+ subtype Result_Type is String (1 .. Next - Start);
+ -- We need this result type to force the result to have the
+ -- required lower bound of 1, rather than the slice bounds.
+
+ begin
+ return Result_Type (Names (Start .. Next - 1));
+ end Image_Enumeration_8;
+
+ --------------------------
+ -- Image_Enumeration_16 --
+ --------------------------
+
+ function Image_Enumeration_16
+ (Pos : Natural;
+ Names : String;
+ Indexes : System.Address)
+ return String
+ is
+ type Natural_16 is range 0 .. 2 ** 15 - 1;
+ type Index_Table is array (Natural) of Natural_16;
+ type Index_Table_Ptr is access Index_Table;
+
+ function To_Index_Table_Ptr is
+ new Unchecked_Conversion (System.Address, Index_Table_Ptr);
+
+ IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes);
+
+ Start : Natural := Natural (IndexesT (Pos));
+ Next : Natural := Natural (IndexesT (Pos + 1));
+
+ subtype Result_Type is String (1 .. Next - Start);
+ -- We need this result type to force the result to have the
+ -- required lower bound of 1, rather than the slice bounds.
+
+ begin
+ return Result_Type (Names (Start .. Next - 1));
+ end Image_Enumeration_16;
+
+ --------------------------
+ -- Image_Enumeration_32 --
+ --------------------------
+
+ function Image_Enumeration_32
+ (Pos : Natural;
+ Names : String;
+ Indexes : System.Address)
+ return String
+ is
+ type Natural_32 is range 0 .. 2 ** 31 - 1;
+ type Index_Table is array (Natural) of Natural_32;
+ type Index_Table_Ptr is access Index_Table;
+
+ function To_Index_Table_Ptr is
+ new Unchecked_Conversion (System.Address, Index_Table_Ptr);
+
+ IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes);
+
+ Start : Natural := Natural (IndexesT (Pos));
+ Next : Natural := Natural (IndexesT (Pos + 1));
+
+ subtype Result_Type is String (1 .. Next - Start);
+ -- We need this result type to force the result to have the
+ -- required lower bound of 1, rather than the slice bounds.
+
+ begin
+ return Result_Type (Names (Start .. Next - 1));
+ end Image_Enumeration_32;
+
+end System.Img_Enum;

View File

@ -0,0 +1,81 @@
--- /dev/null Fri Feb 8 20:51:30 2002
+++ s-imgenu.ads Fri Feb 8 20:53:06 2002
@@ -0,0 +1,78 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUNTIME COMPONENTS --
+-- --
+-- S Y S T E M . I M G _ E N U M --
+-- --
+-- S p e c --
+-- --
+-- $Revision: 1.2 $
+-- --
+-- Copyright (C) 2000 Free Software Foundation, Inc. --
+-- --
+-- GNAT 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. GNAT 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 GNAT; 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. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- --
+------------------------------------------------------------------------------
+
+-- Enumeration_Type'Image for all enumeration types except those in package
+-- Standard (where we have no opportunity to build image tables), and in
+-- package System (where it is too early to start building image tables).
+-- Special routines exist for the enumeration routines in these packages.
+
+package System.Img_Enum is
+pragma Pure (Img_Enum);
+
+ function Image_Enumeration_8
+ (Pos : Natural;
+ Names : String;
+ Indexes : System.Address)
+ return String;
+ -- Used to compute Enum'Image (Str) where Enum is some enumeration type
+ -- other than those defined in package Standard. Names is a string with
+ -- a lower bound of 1 containing the characters of all the enumeration
+ -- literals concatenated together in sequence. Indexes is the address
+ -- of an array of type array (0 .. N) of Natural_8, where N is the
+ -- is the number of enumeration literals in the type. The Indexes values
+ -- are the starting subscript of each enumeration literal, indexed by Pos
+ -- values, with an extra entry at the end containing Names'Length + 1.
+ -- The reason that Indexes is passed by address is that the actual type
+ -- is created on the fly by the expander. The value returned is the
+ -- desired 'Image value.
+
+ function Image_Enumeration_16
+ (Pos : Natural;
+ Names : String;
+ Indexes : System.Address)
+ return String;
+ -- Identical to Image_Enumeration_8 except that it handles types
+ -- using array (0 .. Num) of Natural_16 for the Indexes table.
+
+ function Image_Enumeration_32
+ (Pos : Natural;
+ Names : String;
+ Indexes : System.Address)
+ return String;
+ -- Identical to Image_Enumeration_8 except that it handles types
+ -- using array (0 .. Num) of Natural_32 for the Indexes table.
+
+
+end System.Img_Enum;

View File

@ -0,0 +1,20 @@
--- sem_dist.adb.orig Fri Sep 1 10:14:00 2000
+++ sem_dist.adb Fri Feb 8 21:38:20 2002
@@ -213,7 +213,7 @@
-- Process_Partition_ID --
--------------------------
- procedure Process_Partition_ID (N : Node_Id) is
+ procedure Process_Partition_Id (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Ety : Entity_Id;
Nd : Node_Id;
@@ -288,7 +288,7 @@
Rewrite (N, Convert_To (Typ, Get_Pt_Id_Call));
Analyze_And_Resolve (N, Typ);
- end Process_Partition_ID;
+ end Process_Partition_Id;
----------------------------------
-- Process_Remote_AST_Attribute --

View File

@ -0,0 +1,11 @@
--- sem_res.adb.orig Fri Sep 1 10:14:00 2000
+++ sem_res.adb Fri Feb 8 21:31:04 2002
@@ -1460,7 +1460,7 @@
if Present (It.Typ) then
Get_Next_Interp (I, It);
else
- exit;
+ exit Interp_Loop;
end if;
end loop Interp_Loop;
end if;

View File

@ -0,0 +1,11 @@
--- sem_util.adb.orig Fri Sep 1 10:14:00 2000
+++ sem_util.adb Fri Feb 8 21:08:34 2002
@@ -1745,7 +1745,7 @@
Assoc := First (Governed_By);
Find_Constraint : loop
Discrim := First (Choices (Assoc));
- exit when Chars (Discrim_Name) = Chars (Discrim)
+ exit Find_Constraint when Chars (Discrim_Name) = Chars (Discrim)
or else (Present (Corresponding_Discriminant (Entity (Discrim)))
and then
Chars (Corresponding_Discriminant (Entity (Discrim)))

View File

@ -11,7 +11,7 @@ using /bin/sh, you should:
--Set your CLASSPATH as follows:
$CLASSPATH=.:/usr/local/lib/gnat/jgnat.jar:$CLASSPATH
$CLASSPATH=.:/usr/local/share/java/classes/jgnat.jar:$CLASSPATH
$export CLASSPATH
-----------------------------------------------------------------------

View File

@ -700,7 +700,7 @@ lib/jgnat/adalib/s-wwdenu.ali
lib/jgnat/adalib/s-wwdwch.ali
lib/jgnat/adalib/system.ali
lib/jgnat/adalib/text_io.ali
lib/jgnat/jgnat.jar
share/java/classes/jgnat.jar
@dirrm lib/jgnat/adainclude
@dirrm lib/jgnat/adalib
@dirrm lib/jgnat