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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,a9f89faeb8f41ad0 X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: ifdef replacement for GNAT Date: 1998/04/14 Message-ID: <6gv6l3$73e$1@peuplier.wanadoo.fr>#1/1 X-Deja-AN: 343865752 Content-Transfer-Encoding: 8bit References: <352287EE.1CFB@tolstoy.mdc.com> <352B8208.41C6@tolstoy.mdc.com> <86g1jm2gcf.fsf@zappa> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Adalog Newsgroups: comp.lang.ada Date: 1998-04-14T00:00:00+00:00 List-Id: Robert Dewar a �crit dans le message ... >Dirk asks > ><and say, Win32? Assume there is something special to be done in all >environments. Without using a nonstandard tool like gnatprep that is. >>> > >The Steelman requirements prohibited the inclusion of preprocessing in >the Ada language, which may surprise you. What may surprise you more is >that I and many others think this is a *good thing*. > >We provide gnatprep for our users, but we do NOT use it ourselves in >the GNAT system. > >The proper approach for achieving target dependence is to follow two steps > > (a) encapsulte the target dependence down to the minimum level > > (b) Provide separate target dependent units for these remaining functions > Note that library packages renaming can be handy in managing this approach. You define for example: package My_Interface_Unix is... package My_Interface_Win32 is... and then: with My_Interface_Win32; package My_Interface renames My_Interface_Win32; and use My_Interface all over the place. If you change operating system, you only need to change the renaming in only one place. Not more work than changing a #define. -- ---------------------------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog