wok-next view beaver/stuff/patches/fix-inline.patch @ rev 21223

updated btrfs-progs again (4.9.1 -> 5.3.1)
author Hans-G?nter Theisgen
date Tue Dec 03 10:21:27 2019 +0100 (2019-12-03)
parents
children
line source
1 This fixes link errors:
3 beaver-editor.o: In function `auto_indent_on_insert':
4 editor.c:(.text+0x157): undefined reference to `starts_string'
5 beaver-editor.o: In function `search_for_keyword_correctly':
6 editor.c:(.text+0x7c7): undefined reference to `is_matching_keyword'
7 beaver-editor.o: In function `markup_syhi_range':
8 editor.c:(.text+0xd33): undefined reference to `starts_string'
9 editor.c:(.text+0xdb8): undefined reference to `starts_string'
10 editor.c:(.text+0xe3d): undefined reference to `starts_string'
11 editor.c:(.text+0xec2): undefined reference to `starts_string'
12 editor.c:(.text+0xf47): undefined reference to `starts_string'
13 beaver-editor.o:editor.c:(.text+0xfd0): more undefined references to `starts_string' follow
14 beaver-editor.o: In function `markup_syhi_range':
15 editor.c:(.text+0x1288): undefined reference to `refresh_markers'
16 editor.c:(.text+0x137b): undefined reference to `refresh_markers'
17 beaver-editor.o: In function `search_for_keyword':
18 editor.c:(.text+0x8f4): undefined reference to `search_for_keyword_fastly'
20 As gcc5 doc about "Different semantics for inline functions":
22 > C99 extern inline: An externally visible function is generated; \
23 > same as GNU89 inline.
25 > To fix this, either mark the function foo as extern, or add the \
26 > following declaration: extern inline int foo (void);
28 (from https://gcc.gnu.org/gcc-5/porting_to.html)
30 --- a/src/editor.c
31 +++ b/src/editor.c
32 @@ -487,7 +487,7 @@
33 /* preconditions: iter points to possible start of interesting word
34 postconditions: end is set to the end of the word in the buffer if it was found.
35 if word found, returns TRUE, else FALSE*/
36 -inline gboolean starts_string (gchar * text, gint i, gchar * word, gint * end)
37 +extern inline gboolean starts_string (gchar * text, gint i, gchar * word, gint * end)
38 {
39 gunichar ch;
40 gunichar k;
41 @@ -521,7 +521,7 @@
44 /* returns color index of match, or -1 if none */
45 -inline gint is_matching_keyword (gint Lg, const gchar * str)
46 +extern inline gint is_matching_keyword (gint Lg, const gchar * str)
47 {
48 gint rv = -1;
49 gpointer val;
50 @@ -537,7 +537,7 @@
51 }
54 -inline void refresh_markers (GtkTextBuffer * Buffer)
55 +extern inline void refresh_markers (GtkTextBuffer * Buffer)
56 {
57 gint CurrentPage;
58 gint Lg;
59 @@ -894,7 +894,7 @@
60 END_FCN}
63 -inline void search_for_keyword_fastly (gint page, GtkTextBuffer * Buffer,
64 +extern inline void search_for_keyword_fastly (gint page, GtkTextBuffer * Buffer,
65 gchar * text, gint * i, gint offset,
66 gint Lg)
67 {