* mandoc: Contrary to what the NetBSD attribute(3) manual page suggests,
@ 2019-03-13 18:29 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-03-13 18:29 UTC (permalink / raw)
To: source
Log Message:
-----------
Contrary to what the NetBSD attribute(3) manual page suggests,
using __dead instead of __attribute__((__noreturn__)) actually
hinders portability rather than helping it.
Given that mandoc already uses __attribute__ in several files
and that in the portable version, ./configure already contains
rudimentary support for ignoring it on platforms that do not
support it, use __attribute__ directly.
This is expected to fix build failures that Stephen Gregoratto
<dev at sgregoratto dot me> reported from Arch and Debian Linux.
Modified Files:
--------------
mandoc:
man_validate.c
mdoc_validate.c
Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v
retrieving revision 1.372
retrieving revision 1.373
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.372 -r1.373
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -64,7 +64,7 @@ static size_t macro2len(enum roff_tok);
static void rewrite_macro2len(struct roff_man *, char **);
static int similar(const char *, const char *);
-static __dead void post_abort(POST_ARGS);
+static void post_abort(POST_ARGS) __attribute__((__noreturn__));
static void post_an(POST_ARGS);
static void post_an_norm(POST_ARGS);
static void post_at(POST_ARGS);
@@ -497,7 +497,7 @@ check_toptext(struct roff_man *mdoc, int
}
}
-static __dead void
+static void
post_abort(POST_ARGS)
{
abort();
Index: man_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/man_validate.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -Lman_validate.c -Lman_validate.c -u -p -r1.147 -r1.148
--- man_validate.c
+++ man_validate.c
@@ -41,7 +41,7 @@
typedef void (*v_check)(CHKARGS);
-static __dead void check_abort(CHKARGS);
+static void check_abort(CHKARGS) __attribute__((__noreturn__));
static void check_par(CHKARGS);
static void check_part(CHKARGS);
static void check_root(CHKARGS);
@@ -196,7 +196,7 @@ check_root(CHKARGS)
"(OpenBSD)" : "(NetBSD)");
}
-static __dead void
+static void
check_abort(CHKARGS)
{
abort();
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-13 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 18:29 mandoc: Contrary to what the NetBSD attribute(3) manual page suggests, schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).