Module: wine
Branch: master
Commit: 124ea59b8da45ca242770336999b79ecba9b941c
URL: https://gitlab.winehq.org/wine/wine/-/commit/124ea59b8da45ca242770336999b79…
Author: Aida Jonikienė <aidas957(a)gmail.com>
Date: Tue Feb 6 11:24:26 2024 +0200
configure: Use YEAR2038 macro when it's available.
autoconf 2.72 disabled the time size increase when LARGEFILE macro is being
used: https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=cf09f48841b66fe76…
That change can cause 32-bit Wine to return EOVERFLOW when running
stat() on a file in certain edge cases (which causes some files to
be skipped leading to applications failing to run properly).
This change was tested with both autoconf 2.71 and 2.72 to make sure
nothing broke there.
---
configure | 6 +++---
configure.ac | 2 +-
include/config.h.in | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index e87495c42d9..d7f4313a8cb 100755
--- a/configure
+++ b/configure
@@ -7861,6 +7861,9 @@ rm -rf conftest*
fi
fi
+test "$ac_cv_sys_file_offset_bits" = 64 &&
+printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
+
ac_header= ac_cache=
for ac_item in $ac_header_c_list
@@ -10105,9 +10108,6 @@ fi
printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
- test "$ac_cv_sys_file_offset_bits" = 64 &&
-printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
-
if test $HOST_ARCH = i386
then
DLLFLAGS="$DLLFLAGS -fno-PIC"
diff --git a/configure.ac b/configure.ac
index ba1be1bf9d3..57f64ebffc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -404,6 +404,7 @@ AC_SUBST(OPENGL_LIBS,"")
dnl **** Check for header files ****
AC_SYS_LARGEFILE()
+m4_ifdef([AC_SYS_YEAR2038],[AC_SYS_YEAR2038()],[test "$ac_cv_sys_file_offset_bits" = 64 && AC_DEFINE(_TIME_BITS,64,[Define to 64 to enable 64-bit time_t])])
AC_CHECK_HEADERS(\
CL/cl.h \
@@ -754,7 +755,6 @@ case $host_os in
*)
AC_DEFINE(_GNU_SOURCE,1,[Define to 1 to enable GNU extensions on Linux])
- test "$ac_cv_sys_file_offset_bits" = 64 && AC_DEFINE(_TIME_BITS,64,[Define to 64 to enable 64-bit time_t on Linux])
if test $HOST_ARCH = i386
then
DLLFLAGS="$DLLFLAGS -fno-PIC"
diff --git a/include/config.h.in b/include/config.h.in
index cda76fcfe2e..a910b2c85f1 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -824,7 +824,7 @@
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
-/* Define to 64 to enable 64-bit time_t on Linux */
+/* Define to 64 to enable 64-bit time_t */
#undef _TIME_BITS
/* Define to `__inline__' or `__inline' if that's what the C compiler