aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-03-13 18:29:18 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-03-13 18:29:18 +0000
commit72861f3e14542e73d6ffe973dc172e3f9ce1f843 (patch)
tree6a5bd08e422731779554151949cd7961966dc014
parent7030641da6e071e839134f27adcf3e9576998e5b (diff)
downloadmandoc-72861f3e14542e73d6ffe973dc172e3f9ce1f843.tar.gz
mandoc-72861f3e14542e73d6ffe973dc172e3f9ce1f843.tar.zst
mandoc-72861f3e14542e73d6ffe973dc172e3f9ce1f843.zip
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.
-rw-r--r--man_validate.c6
-rw-r--r--mdoc_validate.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/man_validate.c b/man_validate.c
index d4a0311a..7c10ea5f 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -1,4 +1,4 @@
-/* $Id: man_validate.c,v 1.147 2019/03/11 13:21:11 schwarze Exp $ */
+/* $Id: man_validate.c,v 1.148 2019/03/13 18:29:18 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -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();
diff --git a/mdoc_validate.c b/mdoc_validate.c
index e2cde10c..c409f908 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.372 2019/03/11 13:21:11 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.373 2019/03/13 18:29:18 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 ln, int pos, const char *p)
}
}
-static __dead void
+static void
post_abort(POST_ARGS)
{
abort();