From 25f29dc49f2ee728e81fb950c798fead9fe996ab Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 21 Dec 2014 14:14:35 +0000 Subject: ISO C99 explicitly forbids forward references to enum types (6.7.2.3.3.); patch from daniel@ --- libmandoc.h | 1 - mandoc_headers.3 | 11 +++++++---- msec.c | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libmandoc.h b/libmandoc.h index 67b4fb7a..e5b52efd 100644 --- a/libmandoc.h +++ b/libmandoc.h @@ -37,7 +37,6 @@ __BEGIN_DECLS struct mparse; struct mchars; -enum mandocerr; struct tbl_span; struct eqn; struct roff; diff --git a/mandoc_headers.3 b/mandoc_headers.3 index aa8754e4..79d90fff 100644 --- a/mandoc_headers.3 +++ b/mandoc_headers.3 @@ -47,7 +47,7 @@ HTML formatters search tools .El .Pp -Note that mere usage of an opaque type does +Note that mere usage of an opaque struct type does .Em not require inclusion of the header where that type is defined. .Ss Parser interface @@ -204,7 +204,11 @@ are included, the same file should not include any formatter headers. Requires .In sys/types.h for -.Vt size_t . +.Vt size_t +and +.Qq Pa mandoc.h +for +.Vt enum mandocerr . .Pp Provides .Vt enum rofferr , @@ -222,8 +226,7 @@ from .Pa roff.c for function prototypes. Uses the types -.Vt enum mandocerr , -.Vt struct tbl_span , +.Vt struct tbl_span and .Vt struct eqn from diff --git a/msec.c b/msec.c index ab276366..97595063 100644 --- a/msec.c +++ b/msec.c @@ -20,6 +20,7 @@ #include +#include "mandoc.h" #include "libmandoc.h" #define LINE(x, y) \ -- cgit