From: Brooks Davis <brooks@freebsd.org>
To: tech@mandoc.bsd.lv
Subject: small for FreeBSD
Date: Thu, 8 Feb 2018 19:31:46 +0000 [thread overview]
Message-ID: <20180208193146.GA87404@spindle.one-eyed-alien.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
In our local tree we have this change to work around the fact that
FreeBSD doesn't provide a getline() prototype unless _WITH_GETLINE is
defined before stdio.h is included. It would be nice if some variant of
this could make it in to mandoc.
Thanks,
Brooks
commit f1e1737d27fe77dc6f7709aee31911e30684d653
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date: Wed Aug 16 22:58:19 2017 +0100
getline(3) now requires defining _WITH_GETLINE before including stdio.h.
Otherwise, getline() comes without function prototypes, which is not OK
on CHERI.
(Upstreaming candidate.)
diff --git a/contrib/mdocml/mandocdb.c b/contrib/mdocml/mandocdb.c
index b9e4fb1c813..4f064d88fde 100644
--- a/contrib/mdocml/mandocdb.c
+++ b/contrib/mdocml/mandocdb.c
@@ -40,6 +40,7 @@
#endif
#include <stdarg.h>
#include <stddef.h>
+#define _WITH_GETLINE
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next reply other threads:[~2018-02-08 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 19:31 Brooks Davis [this message]
2018-02-08 23:40 ` Jan Stary
2018-02-08 23:47 ` Brooks Davis
2018-02-09 0:54 ` Ingo Schwarze
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=20180208193146.GA87404@spindle.one-eyed-alien.net \
--to=brooks@freebsd.org \
--cc=tech@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).