tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* small for FreeBSD
@ 2018-02-08 19:31 Brooks Davis
  2018-02-08 23:40 ` Jan Stary
  0 siblings, 1 reply; 4+ messages in thread
From: Brooks Davis @ 2018-02-08 19:31 UTC (permalink / raw)
  To: tech

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-09  0:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 19:31 small for FreeBSD Brooks Davis
2018-02-08 23:40 ` Jan Stary
2018-02-08 23:47   ` Brooks Davis
2018-02-09  0:54     ` Ingo 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).