Fix build with clang 3.6.0 by moving the 'exiting' macro (which is an alias

for the _Noreturn keyword) to the start of the function declaration.

PR:		198011
Submitted by:	dim@ (reported by clang 3.6 exp-run)
Approved by:	maintainer (via IRC)
This commit is contained in:
Koop Mast 2015-03-10 09:52:59 +00:00
parent 4b76f5739e
commit 1a62f69f93
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=380905
3 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,20 @@
--- src/b-complain.h.orig 2013-04-20 20:08:38.000000000 +0200
+++ src/b-complain.h 2015-02-24 22:01:39.465329000 +0100
@@ -29,12 +29,11 @@
printf_string (2, 3);
extern void generic_error (char const *who, char const *fmt, ...)
printf_string (2, 3);
-extern void generic_fatal (char const *who, char const *fmt, ...)
- printf_string (2, 3) exiting;
-extern void fatal_syntax (size_t lno, char const *fmt, ...)
- printf_string (2, 3) exiting;
-extern void fatal_sys (char const *who)
- exiting;
+extern exiting void generic_fatal (char const *who, char const *fmt, ...)
+ printf_string (2, 3);
+extern exiting void fatal_syntax (size_t lno, char const *fmt, ...)
+ printf_string (2, 3);
+extern exiting void fatal_sys (char const *who);
/* Idioms. Here, prefix P stands for "program" (general operation);
M for "manifestation"; R for "repository". */

View file

@ -0,0 +1,14 @@
--- src/b-fb.h.orig 2013-04-20 20:08:38.000000000 +0200
+++ src/b-fb.h 2015-02-24 21:58:19.888149000 +0100
@@ -21,9 +21,9 @@
*/
extern int change_mode (int fd, mode_t mode);
-extern void Ierror (void) exiting;
+exiting extern void Ierror (void);
extern void testIerror (FILE *f);
-extern void Oerror (void) exiting;
+exiting extern void Oerror (void);
extern void testOerror (FILE *o);
extern FILE *fopen_safer (char const *filename, char const *type);
extern void Ozclose (FILE **p);

View file

@ -0,0 +1,22 @@
--- src/base.h.orig 2013-10-20 10:48:18.000000000 +0200
+++ src/base.h 2015-02-24 21:57:04.059371000 +0100
@@ -753,8 +753,7 @@
int donerewrite (int changed, time_t newRCStime);
void ORCSclose (void);
void ORCSerror (void);
-void unexpected_EOF (void)
- exiting;
+exiting void unexpected_EOF (void);
void initdiffcmd (struct diffcmd *dc);
int getdiffcmd (struct fro *finfile, bool delimiter,
FILE *foutfile, struct diffcmd *dc);
@@ -829,8 +828,7 @@
char datebuf[datesize + zonelenmax]);
/* rcsutil */
-void thank_you_and_goodnight (int const how)
- exiting;
+exiting void thank_you_and_goodnight (int const how);
/* These are for thank_you_and_goodnight. */
#define TYAG_ORCSERROR (1 << 3)
#define TYAG_DIRTMPUNLINK (1 << 2)