findprog-in: Improve errno upon failure on native Windows.
commitd9c121346a283503350c0ac7cd6eb5092e87181b
authorBruno Haible <bruno@clisp.org>
Thu, 24 Dec 2020 12:32:39 +0000 (24 13:32 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 24 Dec 2020 12:32:39 +0000 (24 13:32 +0100)
treef1100d1ef70a766d85c09ac957b4d162ed5f73c8
parent2845b3bed86ca649d3206d9b1e0fe30a4ca33110
findprog-in: Improve errno upon failure on native Windows.

* lib/findprog-in.c (find_in_given_path): If the file basename has no
dot and the search with a suffix returned no result, do also a search
without a suffix, and set errno = ENOEXEC if we find a file in this way.
* tests/test-spawn-pipe-script.c (main): Update expected errno.
ChangeLog
lib/findprog-in.c
tests/test-spawn-pipe-script.c