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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:4e0b:: with SMTP id c11-v6mr20409687iob.22.1534779693854; Mon, 20 Aug 2018 08:41:33 -0700 (PDT) X-Received: by 2002:aca:de07:: with SMTP id v7-v6mr1034144oig.5.1534779693701; Mon, 20 Aug 2018 08:41:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!4.us.feeder.erje.net!feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w19-v6no3378423itb.0!news-out.google.com!g5-v6ni5135iti.0!nntp.google.com!w19-v6no3378417itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 20 Aug 2018 08:41:33 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.255.63.4; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 165.255.63.4 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <21aea423-bb16-4612-b914-1dab4d941b25@googlegroups.com> Subject: Re: file descriptor of a serial port From: jan.de.kruyf@gmail.com Injection-Date: Mon, 20 Aug 2018 15:41:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54191 Date: 2018-08-20T08:41:33-07:00 List-Id: On Monday, August 20, 2018 at 5:17:15 PM UTC+2, bj=C3=B6rn lundin wrote: > On 2018-08-20 15:56, jan.....com wrote: >=20 > > I tried to construct a child package of GNAT.Serial_Communications but = the compiler does not like that, since it does not=20 > >actually compile that package. >=20 > Do you actually 'with' that new child package? > Otherwise it is strange that it is not compiled. >=20 >=20 >=20 > --=20 > -- > Bj=C3=B6rn Bj=C3=B6rn, this is what I get on building of package body Gnat.Serial_Communications.Baud is . . procedure Get_Divisor (Port : Serial_Port) is function Toint is new Ada.Unchecked_Conversion -- line 53 (Source =3D> Port_Data, Target =3D> Integer); begin . . gprbuild -Paupdi.gpr Compile [Ada] g-secoba.adb g-secoba.adb:53:17: premature use of incomplete type g-secoba.adb:53:17: instantiation abandoned g-secoba.adb:57:33: "toint" is undefined gprbuild: *** compilation phase failed --------------------- And now I do get the compilers problem. the Port_Data type is only spelled = out in the body of Gnat.Serial_Communications as an integer. So I cannot se= e it in the child. Pity. So I will have to construct a hand crafted Serial_Communications pack= age. Thanks for your help. j.