From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 73c86fb3 for ; Wed, 13 Mar 2019 13:29:48 -0500 (EST) Date: Wed, 13 Mar 2019 13:29:48 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Contrary to what the NetBSD attribute(3) manual page suggests, X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: 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 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