[Ada] Add case to consider ENODEV a "file not found error"

Pierre-Marie de Rodat derodat@adacore.com
Tue Oct 5 08:26:41 GMT 2021


Starting with VxWorks 21.03, a call to fopen() can now set errno to
ENODEV if a prefix of the path does not match any known device.  This
led the runtime to raise the wrong exception type when trying to a file
for which the parent directory did not exist and caused the acats
testsuite to fail. This patch adds a case to return 1 if errno has been
set to ENODEV. We don't bother with version checking as this affects
both kernel mode and RTP mode, and it does not affect runs done with
previous VxWorks versions.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sysdep.c (__gnat_is_file_not_found_error): Add else if case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 571 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211005/15457d69/attachment-0001.bin>


More information about the Gcc-patches mailing list