2024-05-11 20:16:48 +00:00
|
|
|
# largefile.m4
|
2024-06-29 23:08:28 +00:00
|
|
|
# serial 2
|
2024-05-11 20:16:48 +00:00
|
|
|
dnl Copyright 1992-1996, 1998-2024 Free Software Foundation, Inc.
|
|
|
|
dnl This file is free software; the Free Software Foundation
|
|
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
|
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
|
|
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
# Enable large files on systems where this is not the default.
|
2020-01-14 00:25:28 +00:00
|
|
|
# Enable support for files on Linux file systems with 64-bit inode numbers.
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
|
Update from gnulib
This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib. Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-01-01 03:11:22 +00:00
|
|
|
# The following macro works around a problem in Autoconf's AC_FUNC_FSEEKO:
|
|
|
|
# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
|
|
|
|
# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
|
|
|
|
# and ftello in C++ mode as well.
|
2023-05-15 01:51:22 +00:00
|
|
|
# This problem occurs in Autoconf 2.71 and earlier, which lack AC_SYS_YEAR2038.
|
Update from gnulib
This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib. Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-01-01 03:11:22 +00:00
|
|
|
AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
|
2023-01-07 01:53:54 +00:00
|
|
|
m4_ifndef([AC_SYS_YEAR2038], [[
|
Update from gnulib
This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib. Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-01-01 03:11:22 +00:00
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
|
|
AC_FUNC_FSEEKO
|
|
|
|
case "$host_os" in
|
|
|
|
hpux*)
|
|
|
|
AC_DEFINE([_LARGEFILE_SOURCE], [1],
|
|
|
|
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
|
|
|
|
;;
|
|
|
|
esac
|
2023-01-07 01:53:54 +00:00
|
|
|
]])
|
|
|
|
)
|
Update from gnulib
This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib. Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-01-01 03:11:22 +00:00
|
|
|
|
2024-05-11 20:16:48 +00:00
|
|
|
dnl Remove AC_SYS_YEAR2038_RECOMMENDED if unpatched Autoconf 2.72 or earlier.
|
|
|
|
dnl Autoconf 2.72 still uses -n32, which is not a C preprocessor option,
|
|
|
|
dnl and which was useful only on IRIX which is no longer supported.
|
|
|
|
dnl This should be fixed in Autoconf 2.73.
|
|
|
|
m4_ifdef([AC_SYS_YEAR2038_RECOMMENDED],
|
|
|
|
[m4_bmatch(m4_ifdef([_AC_SYS_LARGEFILE_OPTIONS],
|
|
|
|
[m4_defn([_AC_SYS_LARGEFILE_OPTIONS])],
|
|
|
|
["-n32"]),
|
|
|
|
["-n32"],
|
|
|
|
[m4_undefine([AC_SYS_YEAR2038_RECOMMENDED])])])
|
|
|
|
|
2023-05-15 01:51:22 +00:00
|
|
|
m4_ifndef([AC_SYS_YEAR2038_RECOMMENDED], [
|
2024-05-11 20:16:48 +00:00
|
|
|
# Fix up AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
|
|
|
|
# unpatched Autoconf 2.72 or earlier. This code is taken from Autoconf master.
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
|
2023-01-07 01:53:54 +00:00
|
|
|
# _AC_SYS_YEAR2038_TEST_CODE
|
|
|
|
# --------------------------
|
|
|
|
# C code used to probe for time_t that can represent time points more
|
|
|
|
# than 2**31 - 1 seconds after the epoch. With the usual Unix epoch,
|
|
|
|
# these correspond to dates after 2038-01-18 22:14:07 +0000 (Gregorian),
|
|
|
|
# hence the name.
|
|
|
|
AC_DEFUN([_AC_SYS_YEAR2038_TEST_CODE],
|
|
|
|
[[
|
|
|
|
#include <time.h>
|
|
|
|
/* Check that time_t can represent 2**32 - 1 correctly. */
|
|
|
|
#define LARGE_TIME_T \\
|
|
|
|
((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
|
|
|
|
int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
|
|
|
|
&& LARGE_TIME_T % 65537 == 0)
|
|
|
|
? 1 : -1];
|
|
|
|
]])
|
|
|
|
|
|
|
|
# _AC_SYS_YEAR2038_OPTIONS
|
|
|
|
# ------------------------
|
|
|
|
# List of known ways to enable support for large time_t. If you change
|
|
|
|
# this list you probably also need to change the AS_CASE at the end of
|
|
|
|
# _AC_SYS_YEAR2038_PROBE.
|
|
|
|
m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
|
|
|
|
["none needed"] dnl 64-bit and newer 32-bit Unix
|
|
|
|
["-D_TIME_BITS=64"] dnl glibc 2.34 with some 32-bit ABIs
|
|
|
|
["-D__MINGW_USE_VC2005_COMPAT"] dnl 32-bit MinGW
|
|
|
|
["-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"]
|
|
|
|
dnl 32-bit MinGW (misconfiguration)
|
|
|
|
))
|
|
|
|
|
2023-05-15 01:51:22 +00:00
|
|
|
# _AC_SYS_YEAR2038_PROBE
|
|
|
|
# ----------------------
|
2023-01-07 01:53:54 +00:00
|
|
|
# Subroutine of AC_SYS_YEAR2038. Probe for time_t that can represent
|
|
|
|
# time points more than 2**31 - 1 seconds after the epoch (dates after
|
|
|
|
# 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
|
|
|
|
# to one of the values in the _AC_SYS_YEAR2038_OPTIONS list, or to
|
|
|
|
# "support not detected" if none of them worked. Then, set compilation
|
|
|
|
# options and #defines as necessary to enable large time_t support.
|
|
|
|
#
|
|
|
|
# Note that we do not test whether mktime, localtime, etc. handle
|
|
|
|
# large values of time_t correctly, as that would require use of
|
|
|
|
# AC_TRY_RUN. Note also that some systems only support large time_t
|
|
|
|
# together with large off_t.
|
|
|
|
#
|
|
|
|
# If you change this macro you may also need to change
|
|
|
|
# _AC_SYS_YEAR2038_OPTIONS.
|
|
|
|
AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
|
2024-06-29 23:08:28 +00:00
|
|
|
[AC_CACHE_CHECK([for $CC option to support timestamps after 2038],
|
2023-01-07 01:53:54 +00:00
|
|
|
[ac_cv_sys_year2038_opts],
|
|
|
|
[ac_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
ac_opt_found=no
|
|
|
|
for ac_opt in _AC_SYS_YEAR2038_OPTIONS; do
|
|
|
|
AS_IF([test x"$ac_opt" != x"none needed"],
|
|
|
|
[CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_YEAR2038_TEST_CODE])],
|
|
|
|
[ac_cv_sys_year2038_opts="$ac_opt"
|
|
|
|
ac_opt_found=yes])
|
|
|
|
test $ac_opt_found = no || break
|
|
|
|
done
|
|
|
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
|
|
|
test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"])
|
|
|
|
|
|
|
|
ac_have_year2038=yes
|
|
|
|
AS_CASE([$ac_cv_sys_year2038_opts],
|
|
|
|
["none needed"], [],
|
|
|
|
["support not detected"],
|
2023-05-15 01:51:22 +00:00
|
|
|
[ac_have_year2038=no],
|
2023-01-07 01:53:54 +00:00
|
|
|
|
|
|
|
["-D_TIME_BITS=64"],
|
|
|
|
[AC_DEFINE([_TIME_BITS], [64],
|
|
|
|
[Number of bits in time_t, on hosts where this is settable.])],
|
|
|
|
|
2023-05-15 01:51:22 +00:00
|
|
|
["-D__MINGW_USE_VC2005_COMPAT"],
|
2023-01-07 01:53:54 +00:00
|
|
|
[AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
|
|
|
|
[Define to 1 on platforms where this makes time_t a 64-bit type.])],
|
|
|
|
|
|
|
|
["-U_USE_32_BIT_TIME_T"*],
|
|
|
|
[AC_MSG_FAILURE(m4_text_wrap(
|
|
|
|
[the 'time_t' type is currently forced to be 32-bit.
|
2023-05-15 01:51:22 +00:00
|
|
|
It will stop working after mid-January 2038.
|
2023-01-07 01:53:54 +00:00
|
|
|
Remove _USE_32BIT_TIME_T from the compiler flags.],
|
|
|
|
[], [], [55]))],
|
|
|
|
|
|
|
|
[AC_MSG_ERROR(
|
|
|
|
[internal error: bad value for \$ac_cv_sys_year2038_opts])])
|
|
|
|
])
|
|
|
|
|
|
|
|
# _AC_SYS_YEAR2038_ENABLE
|
|
|
|
# -----------------------
|
|
|
|
# Depending on which of the YEAR2038 macros was used, add either an
|
2023-05-15 01:51:22 +00:00
|
|
|
# --enable-year2038 or a --disable-year2038 to
|
|
|
|
# the configure script. This is expanded very late and
|
2023-01-07 01:53:54 +00:00
|
|
|
# therefore there cannot be any code in the AC_ARG_ENABLE. The
|
2023-05-15 01:51:22 +00:00
|
|
|
# default value for 'enable_year2038' is emitted unconditionally
|
2023-01-07 01:53:54 +00:00
|
|
|
# because the generated code always looks at this variable.
|
|
|
|
m4_define([_AC_SYS_YEAR2038_ENABLE],
|
|
|
|
[m4_divert_text([DEFAULTS],
|
|
|
|
m4_provide_if([AC_SYS_YEAR2038],
|
|
|
|
[enable_year2038=yes],
|
|
|
|
[enable_year2038=no]))]dnl
|
|
|
|
[AC_ARG_ENABLE([year2038],
|
|
|
|
m4_provide_if([AC_SYS_YEAR2038],
|
|
|
|
[AS_HELP_STRING([--disable-year2038],
|
2023-05-15 01:51:22 +00:00
|
|
|
[don't support timestamps after 2038])],
|
2023-01-07 01:53:54 +00:00
|
|
|
[AS_HELP_STRING([--enable-year2038],
|
|
|
|
[support timestamps after 2038])]))])
|
|
|
|
|
|
|
|
# AC_SYS_YEAR2038
|
|
|
|
# ---------------
|
|
|
|
# Attempt to detect and activate support for large time_t.
|
|
|
|
# On systems where time_t is not always 64 bits, this probe can be
|
|
|
|
# skipped by passing the --disable-year2038 option to configure.
|
|
|
|
AC_DEFUN([AC_SYS_YEAR2038],
|
2023-05-15 01:51:22 +00:00
|
|
|
[AC_REQUIRE([AC_SYS_LARGEFILE])dnl
|
|
|
|
AS_IF([test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no],
|
|
|
|
[# If we're not cross compiling and 'touch' works with a large
|
|
|
|
# timestamp, then we can presume the system supports wider time_t
|
|
|
|
# *somehow* and we just weren't able to detect it. One common
|
|
|
|
# case that we deliberately *don't* probe for is a system that
|
|
|
|
# supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
|
|
|
|
# wide time_t. (It would be inappropriate for us to override an
|
|
|
|
# intentional use of -m32.) Error out, demanding use of
|
|
|
|
# --disable-year2038 if this is intentional.
|
|
|
|
AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
|
|
|
|
[AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
|
|
|
|
[*'Feb 7 2106'* | *'Feb 7 17:10'*],
|
|
|
|
[AC_MSG_FAILURE(m4_text_wrap(
|
|
|
|
[this system appears to support timestamps after mid-January 2038,
|
|
|
|
but no mechanism for enabling wide 'time_t' was detected.
|
|
|
|
Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
|
|
|
|
To proceed with 32-bit time_t, configure with '--disable-year2038'.],
|
|
|
|
[], [], [55]))])])])])
|
|
|
|
|
|
|
|
# AC_SYS_YEAR2038_RECOMMENDED
|
|
|
|
# ---------------------------
|
|
|
|
# Same as AC_SYS_YEAR2038, but recommend support for large time_t.
|
|
|
|
# If we cannot find any way to make time_t capable of representing
|
|
|
|
# values larger than 2**31 - 1, error out unless --disable-year2038 is given.
|
|
|
|
AC_DEFUN([AC_SYS_YEAR2038_RECOMMENDED],
|
|
|
|
[AC_REQUIRE([AC_SYS_YEAR2038])dnl
|
|
|
|
AS_IF([test "$enable_year2038,$ac_have_year2038" = yes,no],
|
|
|
|
[AC_MSG_FAILURE(m4_text_wrap(
|
|
|
|
[could not enable timestamps after mid-January 2038.
|
|
|
|
This package recommends support for these later timestamps.
|
|
|
|
However, to proceed with signed 32-bit time_t even though it
|
|
|
|
will fail then, configure with '--disable-year2038'.],
|
|
|
|
[], [], [55]))])])
|
2023-01-07 01:53:54 +00:00
|
|
|
|
|
|
|
# _AC_SYS_LARGEFILE_TEST_CODE
|
|
|
|
# ---------------------------
|
|
|
|
# C code used to probe for large file support.
|
|
|
|
m4_define([_AC_SYS_LARGEFILE_TEST_CODE],
|
|
|
|
[@%:@include <sys/types.h>
|
2023-07-09 20:05:01 +00:00
|
|
|
@%:@ifndef FTYPE
|
|
|
|
@%:@ define FTYPE off_t
|
|
|
|
@%:@endif
|
|
|
|
/* Check that FTYPE can represent 2**63 - 1 correctly.
|
|
|
|
We can't simply define LARGE_FTYPE to be 9223372036854775807,
|
2023-01-07 01:53:54 +00:00
|
|
|
since some C++ compilers masquerading as C compilers
|
|
|
|
incorrectly reject 9223372036854775807. */
|
2023-07-09 20:05:01 +00:00
|
|
|
@%:@define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
|
|
|
|
int FTYPE_is_large[[(LARGE_FTYPE % 2147483629 == 721
|
|
|
|
&& LARGE_FTYPE % 2147483647 == 1)
|
2023-01-07 01:53:54 +00:00
|
|
|
? 1 : -1]];[]dnl
|
|
|
|
])
|
2023-05-15 01:51:22 +00:00
|
|
|
# Defined by Autoconf 2.71 and circa 2022 Gnulib unwisely depended on it.
|
|
|
|
m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [_AC_SYS_LARGEFILE_TEST_CODE])
|
2023-01-07 01:53:54 +00:00
|
|
|
|
|
|
|
# _AC_SYS_LARGEFILE_OPTIONS
|
|
|
|
# -------------------------
|
|
|
|
# List of known ways to enable support for large files. If you change
|
|
|
|
# this list you probably also need to change the AS_CASE at the end of
|
|
|
|
# _AC_SYS_LARGEFILE_PROBE.
|
|
|
|
m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
|
|
|
|
["none needed"] dnl Most current systems
|
|
|
|
["-D_FILE_OFFSET_BITS=64"] dnl X/Open LFS spec
|
2023-05-15 01:51:22 +00:00
|
|
|
["-D_LARGE_FILES=1"] dnl 32-bit AIX 4.2.1+, 32-bit z/OS
|
2023-01-07 01:53:54 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
# _AC_SYS_LARGEFILE_PROBE
|
|
|
|
# -----------------------
|
|
|
|
# Subroutine of AC_SYS_LARGEFILE. Probe for large file support and set
|
|
|
|
# the cache variable ac_cv_sys_largefile_opts to one of the values in
|
|
|
|
# the _AC_SYS_LARGEFILE_OPTIONS list, or to "support not detected" if
|
|
|
|
# none of the options in that list worked. Then, set compilation
|
|
|
|
# options and #defines as necessary to enable large file support.
|
|
|
|
#
|
|
|
|
# If large file support is not detected, the behavior depends on which of
|
|
|
|
# the top-level AC_SYS_LARGEFILE macros was used (see below).
|
|
|
|
#
|
|
|
|
# If you change this macro you may also need to change
|
|
|
|
# _AC_SYS_LARGEFILE_OPTIONS.
|
|
|
|
AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
|
2024-06-29 23:08:28 +00:00
|
|
|
[AC_CACHE_CHECK([for $CC option to support large files],
|
2023-01-07 01:53:54 +00:00
|
|
|
[ac_cv_sys_largefile_opts],
|
2024-05-11 20:16:48 +00:00
|
|
|
[ac_save_CPPFLAGS=$CPPFLAGS
|
2023-01-07 01:53:54 +00:00
|
|
|
ac_opt_found=no
|
|
|
|
for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
|
|
|
|
AS_IF([test x"$ac_opt" != x"none needed"],
|
2024-05-11 20:16:48 +00:00
|
|
|
[CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
|
2023-01-07 01:53:54 +00:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
|
2023-07-09 20:05:01 +00:00
|
|
|
[AS_IF([test x"$ac_opt" = x"none needed"],
|
|
|
|
[# GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
|
2024-05-11 20:16:48 +00:00
|
|
|
CPPFLAGS="$CPPFLAGS -DFTYPE=ino_t"
|
2023-07-09 20:05:01 +00:00
|
|
|
AC_COMPILE_IFELSE([], [],
|
2024-05-11 20:16:48 +00:00
|
|
|
[CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
|
2023-07-09 20:05:01 +00:00
|
|
|
AC_COMPILE_IFELSE([], [ac_opt='-D_FILE_OFFSET_BITS=64'])])])
|
|
|
|
ac_cv_sys_largefile_opts=$ac_opt
|
2023-01-07 01:53:54 +00:00
|
|
|
ac_opt_found=yes])
|
|
|
|
test $ac_opt_found = no || break
|
|
|
|
done
|
2024-05-11 20:16:48 +00:00
|
|
|
CPPFLAGS=$ac_save_CPPFLAGS
|
2023-05-15 01:51:22 +00:00
|
|
|
dnl Gnulib implements large file support for native Windows, based on the
|
|
|
|
dnl variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE.
|
|
|
|
m4_ifdef([gl_LARGEFILE], [
|
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
|
|
if test $ac_opt_found != yes; then
|
|
|
|
AS_CASE([$host_os],
|
2024-01-20 19:45:04 +00:00
|
|
|
[mingw* | windows*],
|
2023-05-15 01:51:22 +00:00
|
|
|
[ac_cv_sys_largefile_opts="supported through gnulib"
|
|
|
|
ac_opt_found=yes]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
])
|
2023-01-07 01:53:54 +00:00
|
|
|
test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
|
|
|
|
|
|
|
|
ac_have_largefile=yes
|
|
|
|
AS_CASE([$ac_cv_sys_largefile_opts],
|
|
|
|
["none needed"], [],
|
2023-05-15 01:51:22 +00:00
|
|
|
["supported through gnulib"], [],
|
2023-01-07 01:53:54 +00:00
|
|
|
["support not detected"],
|
|
|
|
[ac_have_largefile=no],
|
|
|
|
|
|
|
|
["-D_FILE_OFFSET_BITS=64"],
|
|
|
|
[AC_DEFINE([_FILE_OFFSET_BITS], [64],
|
|
|
|
[Number of bits in a file offset, on hosts where this is settable.])],
|
|
|
|
|
|
|
|
["-D_LARGE_FILES=1"],
|
|
|
|
[AC_DEFINE([_LARGE_FILES], [1],
|
|
|
|
[Define to 1 on platforms where this makes off_t a 64-bit type.])],
|
|
|
|
|
|
|
|
[AC_MSG_ERROR(
|
|
|
|
[internal error: bad value for \$ac_cv_sys_largefile_opts])])
|
|
|
|
|
2023-05-15 01:51:22 +00:00
|
|
|
AS_IF([test "$enable_year2038" != no],
|
|
|
|
[_AC_SYS_YEAR2038_PROBE])
|
|
|
|
AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
|
|
|
|
# AC_SYS_LARGEFILE
|
|
|
|
# ----------------
|
|
|
|
# By default, many hosts won't let programs access large files;
|
|
|
|
# one must use special compiler options to get large-file access to work.
|
|
|
|
# For more details about this brain damage please see:
|
Update from Gnulib
This incorporates:
2019-09-22 Update some URLs
2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC
2019-09-15 creat: new module
2019-09-15 access: new module
2019-09-09 Add option to assume best, not worst, when cross-compiling.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h:
* lib/ftoastr.c, lib/get-permissions.c:
* lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c:
* lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h:
* lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h:
* lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4:
* m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4:
* m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/largefile.m4:
* m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4:
* m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4:
* m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/open-slash.m4: New file, copied from Gnulib.
2019-09-23 06:50:59 +00:00
|
|
|
# http://www.unix.org/version2/whatsnew/lfs20mar.html
|
2020-01-14 00:25:28 +00:00
|
|
|
# Additionally, on Linux file systems with 64-bit inodes a file that happens
|
|
|
|
# to have a 64-bit inode number cannot be accessed by 32-bit applications on
|
|
|
|
# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
AC_DEFUN([AC_SYS_LARGEFILE],
|
2023-05-15 01:51:22 +00:00
|
|
|
[AC_ARG_ENABLE([largefile],
|
|
|
|
[AS_HELP_STRING([--disable-largefile],
|
|
|
|
[omit support for large files])])dnl
|
|
|
|
AS_IF([test "$enable_largefile,$enable_year2038" != no,no],
|
|
|
|
[_AC_SYS_LARGEFILE_PROBE])])
|
|
|
|
])# m4_ifndef AC_SYS_YEAR2038_RECOMMENDED
|
2012-05-26 23:14:36 +00:00
|
|
|
|
|
|
|
# Enable large files on systems where this is implemented by Gnulib, not by the
|
|
|
|
# system headers.
|
|
|
|
# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib
|
|
|
|
# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively.
|
|
|
|
AC_DEFUN([gl_LARGEFILE],
|
|
|
|
[
|
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
|
|
case "$host_os" in
|
2024-01-20 19:45:04 +00:00
|
|
|
mingw* | windows*)
|
2012-05-26 23:14:36 +00:00
|
|
|
dnl Native Windows.
|
|
|
|
dnl mingw64 defines off_t to a 64-bit type already, if
|
|
|
|
dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
|
|
|
|
AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64],
|
|
|
|
[AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[#include <sys/types.h>
|
|
|
|
int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
|
|
|
|
]],
|
|
|
|
[[]])],
|
|
|
|
[gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no])
|
|
|
|
])
|
|
|
|
if test $gl_cv_type_off_t_64 = no; then
|
|
|
|
WINDOWS_64_BIT_OFF_T=1
|
|
|
|
else
|
|
|
|
WINDOWS_64_BIT_OFF_T=0
|
|
|
|
fi
|
Merge from gnulib
This incorporates:
2017-05-13 largefile: Simplify
2017-05-13 largefile: Improve and document
2017-05-13 truncate: New module
2017-05-13 windows-stat-timespec: New module
2017-05-13 windows-stat-override: New module
2017-05-11 getopt-posix: port to mingw
2017-05-11 gettimeofday: Increase precision on mingw
2017-05-10 time: Fix missing initialization of HAVE_TIMEZONE_T
2017-05-10 Implement a way to opt out from MSVC support
2017-05-09 tzset: Expand comment about TZ problem on native Windows
* build-aux/config.guess, lib/dup2.c, lib/fcntl.c, lib/fsync.c:
* lib/getdtablesize.c, lib/getopt.c, lib/gettimeofday.c:
* lib/mktime.c, lib/stat-time.h, lib/sys_stat.in.h, lib/unistd.in.h:
* lib/utimens.c, m4/gettimeofday.m4, m4/largefile.m4:
* m4/sys_stat_h.m4, m4/sys_time_h.m4, m4/time_h.m4, m4/time_rz.m4:
* m4/unistd_h.m4: Copy from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2017-05-14 08:29:05 +00:00
|
|
|
dnl Some mingw versions define, if _FILE_OFFSET_BITS=64, 'struct stat'
|
|
|
|
dnl to 'struct _stat32i64' or 'struct _stat64' (depending on
|
|
|
|
dnl _USE_32BIT_TIME_T), which has a 32-bit st_size member.
|
|
|
|
AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64],
|
|
|
|
[AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[#include <sys/types.h>
|
|
|
|
struct stat buf;
|
|
|
|
int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
|
|
|
|
]],
|
|
|
|
[[]])],
|
|
|
|
[gl_cv_member_st_size_64=yes], [gl_cv_member_st_size_64=no])
|
|
|
|
])
|
|
|
|
if test $gl_cv_member_st_size_64 = no; then
|
|
|
|
WINDOWS_64_BIT_ST_SIZE=1
|
|
|
|
else
|
|
|
|
WINDOWS_64_BIT_ST_SIZE=0
|
|
|
|
fi
|
2012-05-26 23:14:36 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
dnl Nothing to do on gnulib's side.
|
|
|
|
dnl A 64-bit off_t is
|
Merge from gnulib.
* lib/filemode.h, lib/signal.in.h, lib/stat.c, lib/stdint.in.h:
* lib/stdlib.in.h, lib/unistd.in.h, m4/extensions.m4, m4/getloadavg.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/largefile.m4, m4/mktime.m4:
* m4/multiarch.m4, m4/nocrash.m4, m4/stdio_h.m4, m4/time_r.m4:
Copy new versions from gnulib, incorporating the following changes:
2012-06-22 time_r: fix typo that always overrode localtime_r decl
2012-06-22 Write "Mac OS X" instead of "MacOS X".
2012-06-21 mktime: fix integer overflow in 'configure'-time test
2012-06-21 nonblocking: Avoid compilation error on mingw64.
2012-06-19 stat, fstat: Avoid warnings on mingw64.
2012-06-19 getopt-gnu: Fix exit code overflow in autoconf test.
2012-06-22 17:20:00 +00:00
|
|
|
dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
|
2012-05-26 23:14:36 +00:00
|
|
|
dnl OSF/1, Cygwin,
|
|
|
|
dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
|
|
|
|
dnl glibc, HP-UX, Solaris,
|
|
|
|
dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX,
|
|
|
|
dnl - impossible to achieve on Minix 3.1.8.
|
|
|
|
WINDOWS_64_BIT_OFF_T=0
|
|
|
|
WINDOWS_64_BIT_ST_SIZE=0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
])
|