=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- mandoc/term.c 2009/02/21 21:00:06 1.6 +++ mandoc/term.c 2009/02/22 14:31:08 1.7 @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.6 2009/02/21 21:00:06 kristaps Exp $ */ +/* $Id: term.c,v 1.7 2009/02/22 14:31:08 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -24,6 +24,10 @@ #include #include +#ifdef __linux__ +#include +#endif + #include "term.h" enum termstyle { @@ -46,6 +50,10 @@ static void pescape(struct termp *, static void chara(struct termp *, char); static void style(struct termp *, enum termstyle); +#ifdef __linux__ +extern size_t strlcat(char *, const char *, size_t); +extern size_t strlcpy(char *, const char *, size_t); +#endif void flushln(struct termp *p) @@ -363,7 +371,12 @@ termprint_footer(struct termp *p, const struct mdoc_me err(1, "malloc"); tm = localtime(&meta->date); + +#ifdef __linux__ + if (0 == strftime(buf, p->rmargin, "%B %d, %Y", tm)) +#else if (NULL == strftime(buf, p->rmargin, "%B %d, %Y", tm)) +#endif err(1, "strftime"); osz = strlcpy(os, meta->os, p->rmargin);