1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
From 4df675986524d0e8e76530a3e1bd7860aef9973d Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Sun, 19 May 2024 21:27:38 -0400
Subject: [PATCH 1/2] m4: fix various missing includes of headers for feature
test funcs
---
m4/cvs_func_printf_ptr.m4 | 1 +
m4/mkdir-slash.m4 | 6 +++++-
m4/nanosleep.m4 | 1 +
m4/regex.m4 | 1 +
m4/rename.m4 | 1 +
5 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/m4/cvs_func_printf_ptr.m4 b/m4/cvs_func_printf_ptr.m4
index 4348e29..f04c135 100644
--- a/m4/cvs_func_printf_ptr.m4
+++ b/m4/cvs_func_printf_ptr.m4
@@ -24,6 +24,7 @@ AC_DEFUN([CVS_FUNC_PRINTF_PTR],
[AC_CACHE_CHECK(whether printf supports %p,
cvs_cv_func_printf_ptr,
[AC_TRY_RUN([#include <stdio.h>
+#include <stdlib.h>
/* If printf supports %p, exit 0. */
int
main ()
diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4
index c1e595b..0ca9a91 100644
--- a/m4/mkdir-slash.m4
+++ b/m4/mkdir-slash.m4
@@ -1,4 +1,4 @@
-#serial 4
+#serial 5
# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -10,6 +10,7 @@
# trailing slashes.
AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
[dnl
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
gl_cv_func_mkdir_trailing_slash_bug,
[
@@ -19,6 +20,9 @@ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
# include <sys/types.h>
# include <sys/stat.h>
# include <stdlib.h>
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
int main ()
{
rmdir ("confdir-slash");
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index 5590b9b..035e440 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -39,6 +39,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
# include <time.h>
# endif
# endif
+# include <stdlib.h>
int
main ()
diff --git a/m4/regex.m4 b/m4/regex.m4
index 34435de..5988f68 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -36,6 +36,7 @@ AC_DEFUN([gl_INCLUDED_REGEX],
[#include <stdio.h>
#include <string.h>
#include <regex.h>
+#include <stdlib.h>
int
main ()
{
diff --git a/m4/rename.m4 b/m4/rename.m4
index 7d59160..362fdd4 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -23,6 +23,7 @@ AC_DEFUN([vb_FUNC_RENAME],
AC_MSG_ERROR([cannot create temporary directory])
AC_TRY_RUN([
# include <stdio.h>
+# include <stdlib.h>
int
main ()
{
--
2.44.1
From f6e7556c404e1cb3ddb088fab480aa39a9ad0306 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Sun, 19 May 2024 21:47:06 -0400
Subject: [PATCH 2/2] fix missing config.h includes preventing functions from
being found
_GNU_SOURCE needs to be defined by config.h, so that fputs_unlocked is
provided by stdio.h (as used by gnulib's unlocked-io module).
---
src/add.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/add.c b/src/add.c
index 7f94e2b..025cfc9 100644
--- a/src/add.c
+++ b/src/add.c
@@ -29,6 +29,8 @@
* file to be resurrected.
*/
+#include <config.h>
+
#include <assert.h>
#include "cvs.h"
#include "save-cwd.h"
--
2.44.1
|