From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_TVD_MIME_NO_HEADERS autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,2273a296de8c1b6d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: Ahven 1.8 Date: Sat, 05 Jun 2010 13:41:15 +0100 Organization: A noiseless patient Spider Message-ID: References: <20100602192413.ff36db38.tero.koskinen@iki.fi> <82ocfs1fpv.fsf@stephe-leake.org> <357172d2-0e3f-4700-bcbb-3351f93c8372@s1g2000prf.googlegroups.com> <827hmf17i8.fsf@stephe-leake.org> <20100604183708.2ff8bfd3.tero.koskinen@iki.fi> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Date: Sat, 5 Jun 2010 12:41:17 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="13769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183nXtDPvqGwmQK97aGVgHU1krc72rYDPE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (darwin) Cancel-Lock: sha1:bzN+EF4rX8D6jHwzPi2R3dKgInM= sha1:phynIdqPWinz7Mq7Kt0CwXTIJKA= Xref: g2news1.google.com comp.lang.ada:11308 Date: 2010-06-05T13:41:15+01:00 List-Id: --=-=-= Tero Koskinen writes: > * AUnit is Ada 2005 code only and I think it can be compiled > only with GNAT (not 100% sure since I haven't tried it with > other Ada 2005 compilers) The 2005-ness occurs because AUnit uses a private copy of Ada.Containers.Lists with some 05 constructs removed so that it can be compiled with "an" Ada 95 compiler. Unfortunately, what they mean is "with an Ada 95 compiler that recognises pragma Ada_2005 to mean that some Ada 2005 constructs are permitted even when compiling in Ada 95 mode". This doesn't include older GNATs, and certainly won't include compilers from other vendors. These patches update the current SVN source of AUnit to work with older GNATs. Ask me if you need a copy and the news system has mangled them or I've failed to drive Emacs correctly ... --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=ada_95_only.diff Content-Description: Allow use of AUnit 3 with Ada 95-only compiler Index: aunit/containers/ada_containers-aunit_lists.adb =================================================================== --- aunit/containers/ada_containers-aunit_lists.adb (revision 164273) +++ aunit/containers/ada_containers-aunit_lists.adb (working copy) @@ -23,8 +23,6 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ -pragma Ada_2005; - with System; use type System.Address; with AUnit.Memory; use AUnit.Memory; @@ -726,7 +724,7 @@ procedure Iterate (Container : List; - Process : not null access procedure (Position : Cursor)) + Process : Processor) is C : List renames Container'Unrestricted_Access.all; B : Natural renames C.Busy; Index: aunit/containers/ada_containers-aunit_lists.ads =================================================================== --- aunit/containers/ada_containers-aunit_lists.ads (revision 164273) +++ aunit/containers/ada_containers-aunit_lists.ads (working copy) @@ -35,8 +35,6 @@ -- Some Ada2005 constructs have also been removed so that user tests can be -- compiled in Ada95. -pragma Ada_2005; - generic type Element_Type is private; @@ -181,9 +179,11 @@ function Has_Element (Position : Cursor) return Boolean; + type Processor is access procedure (Position : Cursor); + procedure Iterate (Container : List; - Process : not null access procedure (Position : Cursor)); + Process : Processor); -- procedure Reverse_Iterate -- (Container : List; --=-=-=--