]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
memmove, strtoul, and strcasestr functions are part of ISO C90, remove the compatibil...
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 13:10:32 +0000 (15:10 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:48 +0000 (10:31 +0200)
16 files changed:
bin/dig/host.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssec-verify.c
bin/tests/optional/serial_test.c
configure.in
lib/dns/dnsrps.c
lib/dns/rcode.c
lib/dns/rdata.c
lib/dns/rpz.c
lib/isc/Makefile.in
lib/isc/include/isc/platform.h.in
lib/isc/include/isc/stdlib.h [deleted file]
lib/isc/parseint.c
lib/isc/strtoul.c [deleted file]
lib/isccc/cc.c
util/copyrights

index c134cbe079cb329f485cb00df8f2dba192b95d38..ce2442d94a420ac72c623517e54c57821f38a2a6 100644 (file)
@@ -29,7 +29,6 @@
 #include <isc/string.h>
 #include <isc/util.h>
 #include <isc/task.h>
-#include <isc/stdlib.h>
 
 #include <dns/byaddr.h>
 #include <dns/fixedname.h>
index 45dc753c1c8a44c10c1639a7f9642a3430950ebd..39ccb4e57d21b8c86a1fe554b5b4ff1e425ac6b3 100644 (file)
@@ -49,7 +49,6 @@
 #include <isc/serial.h>
 #include <isc/safe.h>
 #include <isc/stdio.h>
-#include <isc/stdlib.h>
 #include <isc/string.h>
 #include <isc/task.h>
 #include <isc/time.h>
index 009b1275850e76ee18373e351ec837b1697b2110..4f09c0f9b627a436931e7781290dc1b1177e2254 100644 (file)
@@ -32,7 +32,6 @@
 #include <isc/rwlock.h>
 #include <isc/serial.h>
 #include <isc/stdio.h>
-#include <isc/stdlib.h>
 #include <isc/string.h>
 #include <isc/time.h>
 #include <isc/util.h>
index 3ecb147c8b1251a16c4557b1d669bec6a3a9873b..cf3443db91dbd1732c3552b751525159e97dda46 100644 (file)
 #include <config.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <inttypes.h>
 
 #include <isc/print.h>
 #include <isc/serial.h>
-#include <isc/stdlib.h>
 
 int
 main() {
index 21f80c2120d2e47949369506c755e9711604a4df..821b6589d7a072e766f55e355a2ba97a5cc9003a 100644 (file)
@@ -2014,20 +2014,6 @@ AC_SUBST(ISC_PLATFORM_HAVETFO)
 #
 # Check for some other useful functions that are not ever-present.
 #
-
-AC_CHECK_FUNC(memmove,
-       [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
-       [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
-AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
-
-AC_CHECK_FUNC(strtoul,
-       [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
-        GENRANDOMLIB=""],
-       [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
-        GENRANDOMLIB='${ISCLIBS}'])
-AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
-AC_SUBST(GENRANDOMLIB)
-
 AC_CHECK_FUNC(strlcpy,
        [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
        [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
@@ -2038,11 +2024,6 @@ AC_CHECK_FUNC(strlcat,
        [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
 AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
 
-AC_CHECK_FUNC(strcasestr,
-       [ISC_PLATFORM_NEEDSTRCASESTR="#undef ISC_PLATFORM_NEEDSTRCASESTR"],
-       [ISC_PLATFORM_NEEDSTRCASESTR="#define ISC_PLATFORM_NEEDSTRCASESTR 1"])
-AC_SUBST(ISC_PLATFORM_NEEDSTRCASESTR)
-
 AC_SUBST(READLINE_LIB)
 AC_ARG_WITH(readline,
            AS_HELP_STRING([--with-readline[=LIBSPEC]],
index 71dc878cd00857ea53535f9446b2d8189aa5938f..a85e48ca69319b91b2cb3ebdf8abe48cebed5d77 100644 (file)
@@ -19,7 +19,6 @@
 #ifdef USE_DNSRPS
 
 #include <isc/mem.h>
-#include <isc/stdlib.h>
 #include <isc/string.h>
 #include <isc/util.h>
 
index 47e2ef5717199e79ad6cb605eb99e821ae127ba8..914ac47864c76c1a257714107e120ca310f1a5ba 100644 (file)
@@ -15,6 +15,7 @@
 #include <ctype.h>
 #include <inttypes.h>
 #include <stdbool.h>
+#include <stdlib.h>
 
 #include <isc/buffer.h>
 #include <isc/parseint.h>
@@ -22,7 +23,6 @@
 #include <isc/region.h>
 #include <isc/result.h>
 #include <isc/stdio.h>
-#include <isc/stdlib.h>
 #include <isc/string.h>
 #include <isc/types.h>
 #include <isc/util.h>
index 206528f23b92decca05712170d096131ddc5cb17..c3175553d463335d4d45978badc8ca6a09b6481a 100644 (file)
@@ -25,7 +25,6 @@
 #include <isc/parseint.h>
 #include <isc/print.h>
 #include <isc/string.h>
-#include <isc/stdlib.h>
 #include <isc/util.h>
 
 #include <dns/callbacks.h>
index 2010ca0a8b0659c616a49f7decb5e4b5098ea88e..f5348b2f7b2815c4702a09c56a127e8ebf900303 100644 (file)
@@ -22,7 +22,6 @@
 #include <isc/netaddr.h>
 #include <isc/print.h>
 #include <isc/rwlock.h>
-#include <isc/stdlib.h>
 #include <isc/string.h>
 #include <isc/task.h>
 #include <isc/util.h>
index 098467b4902f25313830310d8d2cf3ae321bece0..a9bfe1f8829d02f01db5e29b56af1016cdd6bda8 100644 (file)
@@ -57,7 +57,7 @@ OBJS =                pk11.@O@ pk11_result.@O@ \
                ratelimiter.@O@ refcount.@O@ region.@O@ regex.@O@ result.@O@ \
                rwlock.@O@ \
                serial.@O@ sha1.@O@ sha2.@O@ sockaddr.@O@ stats.@O@ \
-               string.@O@ strtoul.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
+               string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
                tm.@O@ timer.@O@ version.@O@ \
                ${UNIXOBJS} ${NLSOBJS} ${THREADOBJS}
 SYMTBLOBJS =   backtrace-emptytbl.@O@
@@ -74,7 +74,7 @@ SRCS =                pk11.c pk11_result.c \
                parseint.c portset.c quota.c radix.c random.c \
                ratelimiter.c refcount.c region.c regex.c result.c rwlock.c \
                serial.c sha1.c sha2.c sockaddr.c stats.c string.c \
-               strtoul.c symtab.c task.c taskpool.c timer.c \
+               symtab.c task.c taskpool.c timer.c \
                tm.c version.c
 
 LIBS =         @OPENSSL_LIBS@ @LIBS@
index e2d3622ccce77f6fc6626ae59d11cbf88360fcc6..e30c02c55be0ad2c6e3722fe9f1f236bd3fb5439 100644 (file)
  */
 @ISC_PLATFORM_NEEDSTRLCAT@
 
-/*
- * Define if this system needs strtoul.
- */
-@ISC_PLATFORM_NEEDSTRTOUL@
-
-/*
- * Define if this system needs memmove.
- */
-@ISC_PLATFORM_NEEDMEMMOVE@
-
-/*
- * Define if this system needs strcasestr.
- */
-@ISC_PLATFORM_NEEDSTRCASESTR@
-
 /***
  *** Miscellaneous.
  ***/
diff --git a/lib/isc/include/isc/stdlib.h b/lib/isc/include/isc/stdlib.h
deleted file mode 100644 (file)
index c44b0ea..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-#ifndef ISC_STDLIB_H
-#define ISC_STDLIB_H 1
-
-/*! \file isc/stdlib.h */
-
-#include <stdlib.h>
-
-#include <isc/lang.h>
-#include <isc/platform.h>
-
-#ifdef ISC_PLATFORM_NEEDSTRTOUL
-#define strtoul isc_strtoul
-#endif
-
-ISC_LANG_BEGINDECLS
-
-unsigned long isc_strtoul(const char *, char **, int);
-
-ISC_LANG_ENDDECLS
-
-#endif
index 58593695ad6006b2e03fc3d6ab939125f0c0ac02..ced6911cc1520744f380ce2f0ddccc1d63465a37 100644 (file)
 #include <errno.h>
 #include <limits.h>
 #include <inttypes.h>
+#include <stdlib.h>
 
 #include <isc/parseint.h>
 #include <isc/result.h>
-#include <isc/stdlib.h>
 
 isc_result_t
 isc_parse_uint32(uint32_t *uip, const char *string, int base) {
diff --git a/lib/isc/strtoul.c b/lib/isc/strtoul.c
deleted file mode 100644 (file)
index 6f9bfd6..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-#include <config.h>
-
-/*
- * Copyright (c) 1990, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*! \file */
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoul.c  8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <isc/stdlib.h>
-#include <isc/util.h>
-
-/*!
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff.  Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long
-isc_strtoul(const char *nptr, char **endptr, int base) {
-       const char *s = nptr;
-       unsigned long acc;
-       unsigned char c;
-       unsigned long cutoff;
-       int neg = 0, any, cutlim;
-
-       /*
-        * See strtol for comments as to the logic used.
-        */
-       do {
-               c = *s++;
-       } while (isspace(c));
-       if (c == '-') {
-               neg = 1;
-               c = *s++;
-       } else if (c == '+')
-               c = *s++;
-       if ((base == 0 || base == 16) &&
-           c == '0' && (*s == 'x' || *s == 'X')) {
-               c = s[1];
-               s += 2;
-               base = 16;
-       }
-       if (base == 0)
-               base = c == '0' ? 8 : 10;
-       cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
-       cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
-       for (acc = 0, any = 0;; c = *s++) {
-               if (!isascii(c))
-                       break;
-               if (isdigit(c))
-                       c -= '0';
-               else if (isalpha(c))
-                       c -= isupper(c) ? 'A' - 10 : 'a' - 10;
-               else
-                       break;
-               if (c >= base)
-                       break;
-               if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
-                       any = -1;
-               else {
-                       any = 1;
-                       acc *= base;
-                       acc += c;
-               }
-       }
-       if (any < 0) {
-               acc = ULONG_MAX;
-               errno = ERANGE;
-       } else if (neg)
-               acc = -acc;
-       if (endptr != 0)
-               DE_CONST(any ? s - 1 : nptr, *endptr);
-       return (acc);
-}
index a4caca5266a001bae578d3f835d360b7ed0d7cb7..960da65523185c5de8401c9db0376164cfbdffc1 100644 (file)
@@ -38,7 +38,6 @@
 #include <isc/hmacsha.h>
 #include <isc/print.h>
 #include <isc/safe.h>
-#include <isc/stdlib.h>
 
 #include <pk11/site.h>
 
index d490f0c32d9bb2affa19fec13596c6c117d5416b..a5a915e4579eb9c39300a0b7eaf85413121490f8 100644 (file)
 ./lib/isc/include/isc/socket.h                 C       1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2016,2018
 ./lib/isc/include/isc/stats.h                  C       2009,2012,2016,2018
 ./lib/isc/include/isc/stdio.h                  C       2000,2001,2004,2005,2006,2007,2013,2016,2018
-./lib/isc/include/isc/stdlib.h                 C       2003,2004,2005,2006,2007,2016,2018
 ./lib/isc/include/isc/string.h                 C       2000,2001,2003,2004,2005,2006,2007,2014,2016,2018
 ./lib/isc/include/isc/symtab.h                 C       1996,1997,1998,1999,2000,2001,2004,2005,2006,2007,2009,2011,2012,2013,2016,2018
 ./lib/isc/include/isc/task.h                   C       1998,1999,2000,2001,2003,2004,2005,2006,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018