=================================================================== RCS file: /cvs/mandoc/Attic/compat.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- mandoc/Attic/compat.c 2009/03/19 16:40:49 1.4 +++ mandoc/Attic/compat.c 2010/01/01 17:14:26 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.4 2009/03/19 16:40:49 kristaps Exp $ */ +/* $OpenBSD: compat.c,v 1.5 2010/01/01 17:14:26 kristaps Exp $ */ /* * Copyright (c) 1998 Todd C. Miller @@ -15,12 +15,16 @@ * 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 #include -#ifdef __linux__ +int dummy; /* To prevent an empty object file */ +#ifndef HAVE_STRLCAT /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters @@ -55,7 +59,9 @@ strlcat(char *dst, const char *src, size_t siz) return(dlen + (s - src)); /* count does not include NUL */ } +#endif +#ifndef HAVE_STRLCPY /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). @@ -86,5 +92,4 @@ strlcpy(char *dst, const char *src, size_t siz) return(s - src - 1); /* count does not include NUL */ } - #endif