summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-09 13:17:49 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-09 13:17:49 +0000
commita0219192673923a5150c771288ed334616f6f882 (patch)
tree075284ce09795e62a9925283039720396c390f23
parent24f072b20b99820b86ab0e941c49026a51c11d1d (diff)
downloadmandoc-a0219192673923a5150c771288ed334616f6f882.tar.gz
mandoc-a0219192673923a5150c771288ed334616f6f882.tar.zst
mandoc-a0219192673923a5150c771288ed334616f6f882.zip
Easier integration into FreeBSD (sys/types.h, time.h, etc.).VERSION_1_4_5
-rw-r--r--Makefile7
-rw-r--r--action.c3
-rw-r--r--argv.c4
-rw-r--r--macro.c9
-rw-r--r--mdoc.h4
-rw-r--r--mdocterm.c7
-rw-r--r--strings.c11
-rw-r--r--term.c4
-rw-r--r--validate.c4
9 files changed, 29 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index ccd831df..1c05490c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
.SUFFIXES: .html .sgml
-VERSION = 1.4.4
+VERSION = 1.4.5
VDATE = 9 March 2009
BINDIR = $(PREFIX)/bin
@@ -13,9 +13,12 @@ INSTALL_DATA = install -m 0444
INSTALL_LIB = install -m 0644
INSTALL_MAN = $(INSTALL_DATA)
-CPPFLAGS = -DVERSION=\"$(VERSION)\"
+VFLAGS = -DVERSION=\"$(VERSION)\"
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
+LINTFLAGS += $(VFLAGS)
+CFLAGS += $(VFLAGS)
+
LIBLNS = macro.ln mdoc.ln hash.ln strings.ln xstd.ln argv.ln \
validate.ln action.ln lib.ln att.ln arch.ln vol.ln \
msec.ln st.ln
diff --git a/action.c b/action.c
index 7905c899..bb48c917 100644
--- a/action.c
+++ b/action.c
@@ -1,4 +1,4 @@
-/* $Id: action.c,v 1.37 2009/03/08 20:57:35 kristaps Exp $ */
+/* $Id: action.c,v 1.38 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -23,7 +23,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include "private.h"
diff --git a/argv.c b/argv.c
index df5e0b24..ce7ba9bb 100644
--- a/argv.c
+++ b/argv.c
@@ -1,4 +1,4 @@
-/* $Id: argv.c,v 1.43 2009/03/08 20:57:35 kristaps Exp $ */
+/* $Id: argv.c,v 1.44 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -16,6 +16,8 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <assert.h>
#include <ctype.h>
#include <err.h>
diff --git a/macro.c b/macro.c
index 69f7896a..db537a72 100644
--- a/macro.c
+++ b/macro.c
@@ -1,4 +1,4 @@
-/* $Id: macro.c,v 1.62 2009/03/08 20:57:35 kristaps Exp $ */
+/* $Id: macro.c,v 1.63 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -21,9 +21,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#ifdef __linux__
-#include <time.h>
-#endif
+
+#include "private.h"
/*
* This has scanning/parsing routines, each of which extract a macro and
@@ -31,8 +30,6 @@
* macro.
*/
-#include "private.h"
-
static int macro_obsolete(MACRO_PROT_ARGS);
static int macro_constant(MACRO_PROT_ARGS);
static int macro_constant_scoped(MACRO_PROT_ARGS);
diff --git a/mdoc.h b/mdoc.h
index 9144150e..f79e42ec 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -1,4 +1,4 @@
-/* $Id: mdoc.h,v 1.43 2009/03/09 13:04:01 kristaps Exp $ */
+/* $Id: mdoc.h,v 1.44 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -19,6 +19,8 @@
#ifndef MDOC_H
#define MDOC_H
+#include <time.h>
+
/*
* This library implements a validating scanner/parser for ``mdoc'' roff
* macro documents, a.k.a. BSD manual page documents. The mdoc.c file
diff --git a/mdocterm.c b/mdocterm.c
index 1f791258..d98d8da0 100644
--- a/mdocterm.c
+++ b/mdocterm.c
@@ -1,4 +1,4 @@
-/* $Id: mdocterm.c,v 1.36 2009/03/08 18:02:36 kristaps Exp $ */
+/* $Id: mdocterm.c,v 1.37 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -16,6 +16,8 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <assert.h>
#include <ctype.h>
#include <err.h>
@@ -23,9 +25,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef __OpenBSD__
-#include <time.h>
-#endif
#include "mmain.h"
#include "term.h"
diff --git a/strings.c b/strings.c
index 35fe643f..27dcd989 100644
--- a/strings.c
+++ b/strings.c
@@ -1,4 +1,4 @@
-/* $Id: strings.c,v 1.26 2009/03/06 14:13:47 kristaps Exp $ */
+/* $Id: strings.c,v 1.27 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -16,14 +16,13 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#ifndef __OpenBSD__
-#include <time.h>
-#endif
#include "private.h"
@@ -203,9 +202,9 @@ mdoc_atotime(const char *p)
(void)memset(&tm, 0, sizeof(struct tm));
- if (xstrcmp(p, "$Mdocdate: March 6 2009 $"))
+ if (xstrcmp(p, "$Mdocdate: March 9 2009 $"))
return(time(NULL));
- if ((pp = strptime(p, "$Mdocdate: March 6 2009 $", &tm)) && 0 == *pp)
+ if ((pp = strptime(p, "$Mdocdate: March 9 2009 $", &tm)) && 0 == *pp)
return(mktime(&tm));
/* XXX - this matches "June 1999", which is wrong. */
if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp)
diff --git a/term.c b/term.c
index 156beb96..0317de85 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.49 2009/03/08 20:57:35 kristaps Exp $ */
+/* $Id: term.c,v 1.50 2009/03/09 13:17:49 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -16,6 +16,8 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <assert.h>
#include <ctype.h>
#include <err.h>
diff --git a/validate.c b/validate.c
index 5cc1b431..da76fe6e 100644
--- a/validate.c
+++ b/validate.c
@@ -1,4 +1,4 @@
-/* $Id: validate.c,v 1.76 2009/03/08 20:57:35 kristaps Exp $ */
+/* $Id: validate.c,v 1.77 2009/03/09 13:17:50 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -16,6 +16,8 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>