[Ada] GNAT.Serial_Communications: simplify the Serial_Port structure
authorDmitriy Anisimkov <anisimko@adacore.com>
Mon, 8 Jul 2019 08:14:59 +0000 (08:14 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 8 Jul 2019 08:14:59 +0000 (08:14 +0000)
commit55d4e2ba076049f88c24011f2f63aa226e6c87a0
tree0ed5dc35f9377fb40de37a2f33036fd11b808648
parentaec80f204f01c8c8ccd78a6cc4cfa07ba99ecb9f
[Ada] GNAT.Serial_Communications: simplify the Serial_Port structure

2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

* libgnat/g-sercom.ads
(Serial_Port_Descriptor): New type.
(Serial_Port): Add a comment, make it hold a
Serial_Port_Descriptor.
(To_Ada, To_C): New procedures.
(Port_Data, Port_Data_Access): Remove types.
* libgnat/g-sercom.adb (To_Ada): New stub.
* libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
Update implementations accordingly.
* s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
System.Win32.HANDLE on Windows, and to Interfaces.C.int on
Linux. Add "Interfaces.C." prefix for other basic integer type
bindings.
* xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
for subtypes generation.

From-SVN: r273225
gcc/ada/ChangeLog
gcc/ada/libgnat/g-sercom.adb
gcc/ada/libgnat/g-sercom.ads
gcc/ada/libgnat/g-sercom__linux.adb
gcc/ada/libgnat/g-sercom__mingw.adb
gcc/ada/s-oscons-tmplt.c
gcc/ada/xoscons.adb