Commit 124ea59b authored by Aida Jonikienė's avatar Aida Jonikienė Committed by Alexandre Julliard

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=cf09f48841b66fe76f606dd6018bb3a93242a7c9 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.
parent c0bffa82
......@@ -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"
......
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment