]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_8] make lwres/stdlib.h and lwres/string.h instead of compat.h
authorEvan Hunt <each@isc.org>
Wed, 6 Aug 2014 05:02:05 +0000 (22:02 -0700)
committerEvan Hunt <each@isc.org>
Wed, 6 Aug 2014 05:02:05 +0000 (22:02 -0700)
lib/lwres/compat.c
lib/lwres/getaddrinfo.c
lib/lwres/include/lwres/stdlib.h [moved from lib/lwres/include/lwres/compat.h with 84% similarity]
lib/lwres/include/lwres/string.h [new file with mode: 0644]
lib/lwres/lwconfig.c
lib/lwres/print.c

index 9edc5658b9e67cadc5d5a02b503f0d632b7818da..2f59da2f01936e748652b34efa4610b8da894359 100644 (file)
 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 { \
index be1f09aafb4d067d5996b1d9d4b16dcbcc25c454..133f0c1f9ec4d150202f22106586135215acfa2b 100644 (file)
 #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))
similarity index 84%
rename from lib/lwres/include/lwres/compat.h
rename to lib/lwres/include/lwres/stdlib.h
index 19a9372166627c414b88c6c407c320c8763240bb..4ee1dd2dacc4174d2ca34c45f3d5769c58786893 100644 (file)
  * 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
 
diff --git a/lib/lwres/include/lwres/string.h b/lib/lwres/include/lwres/string.h
new file mode 100644 (file)
index 0000000..deebb5a
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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
index 06dab6eebeb600f18080cb4334698de34059d4f8..32019b973182cb9ffa1a6b524dea4baa6fcbedd1 100644 (file)
 #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"
index 4c0f5aac33b33f36bcd62f63adbc4b673f91dcc1..4f44814bece7eecba173165dd9a33aa6c616745e 100644 (file)
@@ -15,8 +15,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 #include <config.h>
 
 #include <ctype.h>
@@ -25,7 +23,8 @@
 
 #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"