Properly reset the port handle when closing
commitd937c6e44ba64694c0fc88f40f42390149d1d624
authorPascal Obry <obry@adacore.com>
Thu, 24 Mar 2022 10:30:05 +0000 (24 11:30 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 24 Mar 2022 10:31:50 +0000 (24 11:31 +0100)
treee0b4b52a5a4eb8317858b5b016c5e02b37dfa3cd
parent85b4d881327e31ae7d2bd4072dcbe425db30f8fe
Properly reset the port handle when closing

When the serial port is closed, we need to ensure that the port handle is
properly reset for it to be detected as closed.

gcc/ada/
PR ada/104767
* libgnat/g-sercom__mingw.adb (Close): Reset port handle to -1.
* libgnat/g-sercom__linux.adb (Close): Likewise.
gcc/ada/libgnat/g-sercom__linux.adb
gcc/ada/libgnat/g-sercom__mingw.adb