source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Contrary to what the NetBSD attribute(3) manual page suggests,
Date: Wed, 13 Mar 2019 13:29:48 -0500 (EST)	[thread overview]
Message-ID: <e3f1ce69d173c41f@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2019-03-13 18:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3f1ce69d173c41f@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).