-/* $Id: xstd.c,v 1.11 2009/03/16 23:37:28 kristaps Exp $ */
+/* $Id: xstd.c,v 1.13 2009/03/23 14:22:11 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
#include <stdlib.h>
#include <string.h>
-#include "private.h"
+#include "libmdoc.h"
+
+#ifdef __linux__
+extern size_t strlcpy(char *, const char *, size_t);
+extern size_t strlcat(char *, const char *, size_t);
+#endif
/*
* Contains wrappers for common functions to simplify their general
return(p);
}
-void *
-xcalloc(size_t num, size_t sz)
-{
- void *p;
-
- if (NULL == (p = calloc(num, sz)))
- err(EXIT_FAILURE, "calloc");
- return(p);
-}
char *
xstrdup(const char *p)