On 2021-11-15 a change was made to optimize the conditions of the module
dependencies of 'lseek'. Such optimizations are often hairy, because they
assume that the workaround is only needed in the _currently known_
circumstances.

In this case, the optimization was also wrong, because the dependency
to 'msvc-nothrow' is necessary for _get_osfhandle() to work reliably
on MSVC, regardless of the value of WINDOWS_64_BIT_OFF_T; there are
multiple reasons for the lseek() workaround on native Windows
(support for large files and the behaviour on pipes).


2023-04-24  Bruno Haible  <br...@clisp.org>

        lseek: Fix module dependencies (regression 2021-11-15).
        * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency
        also when WINDOWS_64_BIT_OFF_T is 0.

diff --git a/modules/lseek b/modules/lseek
index 17d02a79c5..711afeb2fa 100644
--- a/modules/lseek
+++ b/modules/lseek
@@ -9,7 +9,7 @@ Depends-on:
 unistd
 sys_types
 largefile
-msvc-nothrow    [test $WINDOWS_64_BIT_OFF_T = 1]
+msvc-nothrow    [test $REPLACE_LSEEK = 1]
 fstat           [test "$gl_cv_func_lseek_pipe" = no]
 
 configure.ac:




Reply via email to