summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autoconf/autoconf/backports/0016-Improve-year2038-largefile-option-processing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/autoconf/autoconf/backports/0016-Improve-year2038-largefile-option-processing.patch')
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/backports/0016-Improve-year2038-largefile-option-processing.patch121
1 files changed, 121 insertions, 0 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/backports/0016-Improve-year2038-largefile-option-processing.patch b/meta/recipes-devtools/autoconf/autoconf/backports/0016-Improve-year2038-largefile-option-processing.patch
new file mode 100644
index 0000000000..e96faf2666
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf/backports/0016-Improve-year2038-largefile-option-processing.patch
@@ -0,0 +1,121 @@
1From a1e82aff0fd842b0f09e2cd166560dfda725ba13 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
3Date: Sun, 9 Apr 2023 11:41:57 -0700
4Subject: [PATCH 16/29] Improve year2038, largefile option processing
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_PROBE)
10(_AC_SYS_YEAR2038_ENABLE, _AC_SYS_YEAR2038_OPT_IN)
11(AC_SYS_YEAR2038, _AC_SYS_LARGEFILE_PROBE)
12(_AC_SYS_LARGEFILE_ENABLE): Do not use enable_largefile to record
13whether largefile is required, as ‘./configure
14--disable-largefile’ sets enable_largefile=no even if largefile is
15required and this disables largefile. Instead, use a separate
16shell variable ac_largefile_required and test it as well.
17Similarly for enable_year2038.
18(_AC_SYS_LARGEFILE_ENABLE): Omit --disable-largefile help string
19if year2038 is required, since largefile is a prereq for year2038.
20
21Upstream-Status: Backport
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23---
24 lib/autoconf/specific.m4 | 35 ++++++++++++++++++++++-------------
25 1 file changed, 22 insertions(+), 13 deletions(-)
26
27diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
28index 5dc006959..1a3f4a65c 100644
29--- a/lib/autoconf/specific.m4
30+++ b/lib/autoconf/specific.m4
31@@ -155,10 +155,10 @@ AS_CASE([$ac_cv_sys_year2038_opts],
32 ["none needed"], [],
33 ["support not detected"],
34 [ac_have_year2038=no
35- AS_CASE([$enable_year2038],
36- [required],
37+ AS_CASE([$ac_year2038_required,$enable_year2038],
38+ [yes,*],
39 [AC_MSG_FAILURE([support for timestamps after Jan 2038 is required])],
40- [yes],
41+ [*,yes],
42 [# If we're not cross compiling and 'touch' works with a large
43 # timestamp, then we can presume the system supports wider time_t
44 # *somehow* and we just weren't able to detect it. One common
45@@ -209,10 +209,12 @@ AS_CASE([$ac_cv_sys_year2038_opts],
46 m4_define([_AC_SYS_YEAR2038_ENABLE],
47 [m4_divert_text([DEFAULTS],
48 m4_provide_if([AC_SYS_YEAR2038_REQUIRED],
49- [enable_year2038=required],
50+ [ac_year2038_required=yes],
51+ [ac_year2038_required=no]))dnl
52+m4_divert_text([DEFAULTS],
53 m4_provide_if([AC_SYS_YEAR2038],
54 [enable_year2038=yes],
55- [enable_year2038=no])))]dnl
56+ [enable_year2038=no]))]dnl
57 [m4_provide_if([AC_SYS_YEAR2038_REQUIRED], [],
58 [AC_ARG_ENABLE([year2038],
59 m4_provide_if([AC_SYS_YEAR2038],
60@@ -231,7 +233,8 @@ m4_define([_AC_SYS_YEAR2038_ENABLE],
61 # documented macro.
62 AC_DEFUN([_AC_SYS_YEAR2038_OPT_IN],
63 [m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
64- AS_IF([test "$enable_year2038" != no], [_AC_SYS_YEAR2038_PROBE])
65+ AS_IF([test "$ac_year2038_required,$enable_year2038" != no,no],
66+ [_AC_SYS_YEAR2038_PROBE])
67 AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
68 ])])
69
70@@ -244,7 +247,8 @@ AC_DEFUN([AC_SYS_YEAR2038],
71 [m4_provide_if([AC_SYS_LARGEFILE_REQUIRED], [],
72 [AC_REQUIRE([AC_SYS_LARGEFILE])])]dnl
73 [m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
74- AS_IF([test "$enable_year2038" != no], [_AC_SYS_YEAR2038_PROBE])
75+ AS_IF([test "$ac_year2038_required,$enable_year2038" != no,no],
76+ [_AC_SYS_YEAR2038_PROBE])
77 AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
78 ])])
79
80@@ -326,7 +330,7 @@ AS_CASE([$ac_cv_sys_largefile_opts],
81 ["none needed"], [],
82 ["support not detected"],
83 [ac_have_largefile=no
84- AS_IF([test $enable_largefile = required],
85+ AS_IF([test $ac_largefile_required,$ac_year2038_required != no,no],
86 [AC_MSG_FAILURE([support for large files is required])])],
87
88 ["-D_FILE_OFFSET_BITS=64"],
89@@ -358,11 +362,15 @@ _AC_SYS_YEAR2038_OPT_IN
90 m4_define([_AC_SYS_LARGEFILE_ENABLE],
91 [m4_divert_text([DEFAULTS],
92 m4_provide_if([AC_SYS_LARGEFILE_REQUIRED],
93- [enable_largefile=required],
94- [enable_largefile=yes]))]dnl
95+ [ac_largefile_required=yes],
96+ [ac_largefile_required=no]))dnl
97+m4_divert_text([DEFAULTS],
98+ [enable_largefile=yes])]dnl
99 [m4_provide_if([AC_SYS_LARGEFILE_REQUIRED], [],
100-[AC_ARG_ENABLE([largefile],
101- [AS_HELP_STRING([--disable-largefile], [omit support for large files])])])])
102+ [m4_provide_if([AC_SYS_YEAR2038_REQUIRED], [],
103+ [AC_ARG_ENABLE([largefile],
104+ [AS_HELP_STRING([--disable-largefile],
105+ [omit support for large files])])])])])
106
107 # AC_SYS_LARGEFILE
108 # ----------------
109@@ -377,7 +385,8 @@ m4_define([_AC_SYS_LARGEFILE_ENABLE],
110 # large files; see also AC_SYS_LARGEFILE_REQUIRED.
111 AC_DEFUN([AC_SYS_LARGEFILE],
112 [m4_provide_if([_AC_SYS_LARGEFILE_PROBE], [], [dnl
113- AS_IF([test "$enable_largefile" != no], [_AC_SYS_LARGEFILE_PROBE])
114+ AS_IF([test "$ac_largefile_required,$enable_largefile,$ac_year2038_required" != no,no,no],
115+ [_AC_SYS_LARGEFILE_PROBE])
116 AC_CONFIG_COMMANDS_PRE([_AC_SYS_LARGEFILE_ENABLE])
117 ])])
118
119--
1202.41.0
121