gnu: Add iputils.
[jackhill/guix/guix.git] / gnu / packages / patches / rcs-5.9.4-noreturn.patch
CommitLineData
096f0080
ST
1Builds with GCC-5 failed due to misplaced `_Noreturn (__attribute__((noreturn)))`
2statement.
3
4Patch copied from upstream source repository:
5
6http://git.savannah.gnu.org/cgit/rcs.git/commit/?h=p&id=260704a9164dd34cf7128d6b1e88075ffa3be054
7
8Upstream bug URL:
9
10https://savannah.gnu.org/bugs/?49568
11
12commit 260704a9164dd34cf7128d6b1e88075ffa3be054
13Author: Thien-Thi Nguyen <ttn@gnu.org>
14Date: Thu Jun 18 21:25:53 2015 +0200
15
16 [C slog] Move ‘exiting’ to beginning of func decl.
17
18 Apparently, ‘gcc --std=c11’ does not abide the ‘exiting’
19 attribute appearing at the end of the func decl.
20 Reported by Romain Francoise.
21 See also <https://bugs.debian.org/778100>.
22
23 * src/b-complain.h (generic_fatal, fatal_syntax, fatal_sys)
24 * src/b-fb.h (Ierror, Oerror)
25 * src/base.h (unexpected_EOF, thank_you_and_goodnight):
26 Move ‘exiting’ attribute to beginning of func decl.
27
28diff --git a/src/b-complain.h b/src/b-complain.h
29index 0ffd157..ea0ffc5 100644
30--- a/src/b-complain.h
31+++ b/src/b-complain.h
32@@ -32,12 +32,14 @@ extern void generic_warn (char const *who, char const *fmt, ...)
33 printf_string (2, 3);
34 extern void generic_error (char const *who, char const *fmt, ...)
35 printf_string (2, 3);
36+exiting
37 extern void generic_fatal (char const *who, char const *fmt, ...)
38- printf_string (2, 3) exiting;
39+ printf_string (2, 3);
40+exiting
41 extern void fatal_syntax (size_t lno, char const *fmt, ...)
42- printf_string (2, 3) exiting;
43-extern void fatal_sys (char const *who)
44- exiting;
45+ printf_string (2, 3);
46+exiting
47+extern void fatal_sys (char const *who);
48
49 /* Idioms. Here, prefix P stands for "program" (general operation);
50 M for "manifestation"; R for "repository". */
51diff --git a/src/b-fb.h b/src/b-fb.h
52index c9850e7..bf5eaf8 100644
53--- a/src/b-fb.h
54+++ b/src/b-fb.h
55@@ -21,9 +21,11 @@
56 */
57
58 extern int change_mode (int fd, mode_t mode);
59-extern void Ierror (void) exiting;
60+exiting
61+extern void Ierror (void);
62 extern void testIerror (FILE *f);
63-extern void Oerror (void) exiting;
64+exiting
65+extern void Oerror (void);
66 extern void testOerror (FILE *o);
67 extern FILE *fopen_safer (char const *filename, char const *type);
68 extern void Ozclose (FILE **p);
69diff --git a/src/base.h b/src/base.h
70index 163ee09..5e7a9f8 100644
71--- a/src/base.h
72+++ b/src/base.h
73@@ -755,8 +755,8 @@ int dorewrite (bool lockflag, int changed);
74 int donerewrite (int changed, time_t newRCStime);
75 void ORCSclose (void);
76 void ORCSerror (void);
77-void unexpected_EOF (void)
78- exiting;
79+exiting
80+void unexpected_EOF (void);
81 void initdiffcmd (struct diffcmd *dc);
82 int getdiffcmd (struct fro *finfile, bool delimiter,
83 FILE *foutfile, struct diffcmd *dc);
84@@ -831,8 +831,8 @@ char const *date2str (char const date[datesize],
85 char datebuf[datesize + zonelenmax]);
86
87 /* rcsutil */
88-void thank_you_and_goodnight (int const how)
89- exiting;
90+exiting
91+void thank_you_and_goodnight (int const how);
92 /* These are for ‘thank_you_and_goodnight’. */
93 #define TYAG_ORCSERROR (1 << 3)
94 #define TYAG_DIRTMPUNLINK (1 << 2)