30 lines
929 B
Diff
30 lines
929 B
Diff
https://github.com/file/file/commit/8dc5513908381a14981b16a85d59ba054bf4df52
|
|
|
|
From 8dc5513908381a14981b16a85d59ba054bf4df52 Mon Sep 17 00:00:00 2001
|
|
From: Christos Zoulas <christos@zoulas.com>
|
|
Date: Mon, 31 Jul 2023 15:56:12 +0000
|
|
Subject: [PATCH] Check if we support _TIME_BITS. (Werner Fink)
|
|
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -152,6 +152,18 @@ AC_TYPE_UINT64_T
|
|
AC_TYPE_INT64_T
|
|
AC_TYPE_INTPTR_T
|
|
AC_TYPE_UINTPTR_T
|
|
+m4_ifdef([AC_SYS_YEAR2038], [AC_SYS_YEAR2038], [
|
|
+# GNU libc only allows setting _TIME_BITS when FILE_OFFSET_BITS is also set.
|
|
+# GNU libc defines __TIMESIZE on systems where _TIME_BITS can be set.
|
|
+AS_IF([test X"$ac_cv_sys_file_offset_bits" = X"64"], [
|
|
+ AC_CHECK_DECL(__TIMESIZE, [
|
|
+ AC_DEFINE([_TIME_BITS], [64], [Number of bits in a timestamp, on hosts where this is settable.])
|
|
+ ], [], [
|
|
+AC_INCLUDES_DEFAULT
|
|
+#include <time.h>
|
|
+ ])
|
|
+ ])
|
|
+])
|
|
AC_FUNC_MMAP
|
|
AC_FUNC_FORK
|
|
AC_FUNC_MBRTOWC
|
|
|