summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 17:14:26 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 17:14:26 +0000
commit92f665747e9d9aecac7c203e53d4eb175e662fc8 (patch)
tree343b938cade639d1cbcc09a9a00911f2789ee947 /mdoc_html.c
parent21ddc0a002b54301ac9de5f6dd73928ed0d73a94 (diff)
downloadmandoc-92f665747e9d9aecac7c203e53d4eb175e662fc8.tar.gz
Big check-in of compatibility layer. This should work on most major architectures. Thanks to Joerg Sonnenberger.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index e43d9809..c9766217 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -14,8 +14,11 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
-#include <sys/param.h>
#include <assert.h>
#include <ctype.h>
@@ -36,6 +39,10 @@
const struct mdoc_node *n, \
struct html *h
+#ifndef MIN
+#define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b))
+#endif
+
struct htmlmdoc {
int (*pre)(MDOC_ARGS);
void (*post)(MDOC_ARGS);
@@ -126,11 +133,6 @@ static int mdoc_vt_pre(MDOC_ARGS);
static int mdoc_xr_pre(MDOC_ARGS);
static int mdoc_xx_pre(MDOC_ARGS);
-#ifdef __linux__
-extern size_t strlcpy(char *, const char *, size_t);
-extern size_t strlcat(char *, const char *, size_t);
-#endif
-
static const struct htmlmdoc mdocs[MDOC_MAX] = {
{mdoc_ap_pre, NULL}, /* Ap */
{NULL, NULL}, /* Dd */