static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
-/* $Id$ */
-
#include <config.h>
#include <limits.h>
#include <ctype.h>
#include <errno.h>
-#include <lwres/compat.h>
+#include <lwres/stdlib.h>
+#include <lwres/string.h>
#define DE_CONST(konst, var) \
do { \
#include <errno.h>
#include <string.h>
-#include <lwres/compat.h>
#include <lwres/lwres.h>
#include <lwres/net.h>
#include <lwres/netdb.h>
+#include <lwres/stdlib.h>
+#include <lwres/string.h>
#define SA(addr) ((struct sockaddr *)(addr))
#define SIN(addr) ((struct sockaddr_in *)(addr))
* PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef LWRES_COMPAT_H
-#define LWRES_COMPAT_H 1
+#ifndef LWRES_STDLIB_H
+#define LWRES_STDLIB_H 1
-/*! \file lwres/compat.h */
+/*! \file lwres/stdlib.h */
#include <stdlib.h>
#define strtoul lwres_strtoul
#endif
-#ifdef LWRES_PLATFORM_NEEDSTRLCPY
-#define strlcpy lwres_strlcpy
-#endif
-
LWRES_LANG_BEGINDECLS
unsigned long lwres_strtoul(const char *, char **, int);
-size_t lwres_strlcpy(char *dst, const char *src, size_t size);
LWRES_LANG_ENDDECLS
--- /dev/null
+/*
+ * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef LWRES_STRING_H
+#define LWRES_STRING_H 1
+
+/*! \file lwres/string.h */
+
+#include <stdlib.h>
+
+#include <lwres/lang.h>
+#include <lwres/platform.h>
+
+#ifdef LWRES_PLATFORM_NEEDSTRLCPY
+#define strlcpy lwres_strlcpy
+#endif
+
+LWRES_LANG_BEGINDECLS
+
+size_t lwres_strlcpy(char *dst, const char *src, size_t size);
+
+LWRES_LANG_ENDDECLS
+
+#endif
#include <string.h>
#include <unistd.h>
-#include <lwres/compat.h>
#include <lwres/lwbuffer.h>
#include <lwres/lwres.h>
#include <lwres/net.h>
#include <lwres/result.h>
+#include <lwres/stdlib.h>
+#include <lwres/string.h>
#include "assert_p.h"
#include "context_p.h"
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id$ */
-
#include <config.h>
#include <ctype.h>
#define LWRES__PRINT_SOURCE /* Used to get the lwres_print_* prototypes. */
-#include <lwres/compat.h>
+#include <lwres/stdlib.h>
+#include <lwres/string.h>
#include "assert_p.h"
#include "print_p.h"