File: 1060-gl-in-hook-prototype.patch

package info (click to toggle)
gpstrans 0.41-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 900 kB
  • sloc: ansic: 6,201; makefile: 158; xml: 17
file content (26 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (2)
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
Description: Avoid conflicting prototypes for gl_in_hook and friends.
 This ensure consistent prototypes are used with __STDC__ > 0,
 and bring the definitions in line with getline.h prototypes.
Author: Petter Reinholdtsen
Bug-Debian: https://bugs.debian.org/688452
Forwarded: no
Last-Update: 2024-07-20
---
--- gpstrans-0.41.orig/src/getline/getline.c
+++ gpstrans-0.41/src/getline/getline.c
@@ -42,9 +42,15 @@ void gl_setwidth ();		/* specify width o
 void gl_histadd ();		/* adds entries to hist */
 void gl_strwidth ();		/* to bind gl_strlen */
 
+#if __STDC__ > 0
+int (*gl_in_hook) (char *) = 0;
+int (*gl_out_hook) (char *) = 0;
+int (*gl_tab_hook) (char *, int, int *) = gl_tab;
+#else /* not __STDC__ */
 int (*gl_in_hook) () = 0;
 int (*gl_out_hook) () = 0;
 int (*gl_tab_hook) () = gl_tab;
+#endif /* __STDC__ */
 
 int echo = (1 == 1);