projects/guix·blob javascript-team · refs

87 lines · 2.2 KiB

1From: Michael Hudson-Doyle <[email protected]>
2Date: Thu, 11 Apr 2024 11:18:39 +0200
3Subject: Add function prototypes to fix implicit function declaration errors
4
5Reviewed-By: Tobias Heider <[email protected]>
6Bug-Debian: https://bugs.debian.org/1066285
7---
8 cl/cl.h | 5 +++++
9 cl/cl_funcs.c | 6 ++++++
10 common/conv.h | 3 +++
11 common/multibyte.h | 6 ++++++
12 dist/configure | 1 +
13 5 files changed, 21 insertions(+)
14
15diff --git a/cl/cl.h b/cl/cl.h
16index 3d71410..4ff232d 100644
17--- a/cl/cl.h
18+++ b/cl/cl.h
19@@ -26,6 +26,11 @@
20 #endif
21 #endif
22
23+/*
24+ * for setupterm()
25+ */
26+#include <term.h>
27+
28 typedef struct _cl_private {
29 char ibuf[256]; /* Input keys. */
30
31diff --git a/cl/cl_funcs.c b/cl/cl_funcs.c
32index c5fc597..b6174ef 100644
33--- a/cl/cl_funcs.c
34+++ b/cl/cl_funcs.c
35@@ -31,6 +31,12 @@ static const char sccsid[] = "$Id: cl_funcs.c,v 10.72 2002/03/02 23:18:33 skimo
36 #include "../vi/vi.h"
37 #include "cl.h"
38
39+/*
40+ * This is declared by ncurses.h, but only if _XOPEN_SOURCE is set and lots of
41+ * other things break if we define that.
42+ */
43+extern int waddnwstr (WINDOW *,const wchar_t *,int);
44+
45 static void cl_rdiv __P((SCR *));
46
47 static int
48diff --git a/common/conv.h b/common/conv.h
49index 76b06c1..a7675c4 100644
50--- a/common/conv.h
51+++ b/common/conv.h
52@@ -21,3 +21,6 @@ struct _conv {
53 char2wchar_t input2int;
54 wchar2char_t int2disp;
55 };
56+
57+extern int conv_enc (SCR *sp, int option, char *enc);
58+extern void conv_init (SCR *orig, SCR *sp);
59diff --git a/common/multibyte.h b/common/multibyte.h
60index 820f4ec..2484521 100644
61--- a/common/multibyte.h
62+++ b/common/multibyte.h
63@@ -5,6 +5,12 @@
64 #include <wchar.h>
65 #include <wctype.h>
66
67+/*
68+ * This is declared by wchar.h, but only if _XOPEN_SOURCE is set and lots of
69+ * other things break if we define that.
70+ */
71+extern int wcwidth (wchar_t c);
72+
73 typedef wchar_t RCHAR_T;
74 #define RCHAR_T_MAX ((1 << 24)-1)
75 typedef wchar_t CHAR_T;
76diff --git a/dist/configure b/dist/configure
77index b23e167..d7fb54f 100755
78--- a/dist/configure
79+++ b/dist/configure
80@@ -27385,6 +27385,7 @@ cat confdefs.h >>conftest.$ac_ext
81 cat >>conftest.$ac_ext <<_ACEOF
82 /* end confdefs.h. */
83 #include <$CURSHEADER>
84+#include <term.h>
85 int
86 main ()
87 {