]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4811. [bug] Revert api changes to use <isc/buffer.h> inline
authorMark Andrews <marka@isc.org>
Wed, 8 Nov 2017 12:28:10 +0000 (23:28 +1100)
committerMark Andrews <marka@isc.org>
Wed, 8 Nov 2017 12:28:10 +0000 (23:28 +1100)
                        macros.  Provide a alternative mechanism to turn
                        on the use of inline macros when building BIND.
                        [RT #46520]

CHANGES
config.h.in
configure
configure.in
lib/isc/include/isc/buffer.h

diff --git a/CHANGES b/CHANGES
index 8aca06cce56410c3765e0c45bdecd8d796cc41b2..b743ba6d097dec071a6c1e01872dbe65f58ab661 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+4811.  [bug]           Revert api changes to use <isc/buffer.h> inline
+                       macros.  Provide a alternative mechanism to turn
+                       on the use of inline macros when building BIND.
+                       [RT #46520]
+
 4810.  [test]          The chain system test failed if the IPv6 interfaces
                        were not configured. [RT #46508]
 
index 078428626cd958d5aae3bc7eff84fbb0ce2fc8d4..03ead78f0a2ee47f05420ed766eea9506f416852 100644 (file)
@@ -535,6 +535,9 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define to the sockaddr length type used by getnameinfo(3). */
 #undef IRS_GETNAMEINFO_SOCKLEN_T
 
+/* Define if you want to use inline buffers */
+#undef ISC_BUFFER_USEINLINE
+
 /* Define to allow building of objects for dlopen(). */
 #undef ISC_DLZ_DLOPEN
 
index 136d531ff6d174b554c2cdd0c5603ac7b875a026..0b45297233c5f0905db2c459c7e1b39edc6a6aa7 100755 (executable)
--- a/configure
+++ b/configure
@@ -980,6 +980,7 @@ with_gnu_ld
 with_sysroot
 enable_libtool_lock
 enable_libbind
+enable_buffer_useinline
 enable_warn_shadow
 enable_warn_error
 enable_developer
@@ -1686,6 +1687,9 @@ Optional Features:
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-libbind       deprecated
+  --enable-buffer-useinline
+                          define ISC_BUFFER_USEINLINE when compiling
+                          [[default=yes]]
   --enable-warn-shadow   turn on -Wshadow when compiling
   --enable-warn-error    turn on -Werror when compiling
   --enable-developer      enable developer build settings
@@ -11444,6 +11448,20 @@ It is available from http://www.isc.org as a separate download." "$LINENO" 5
                ;;
 esac
 
+# Check whether --enable-buffer_useinline was given.
+if test "${enable_buffer_useinline+set}" = set; then :
+  enableval=$enable_buffer_useinline; if test yes = "${enable}"
+             then
+
+$as_echo "#define ISC_BUFFER_USEINLINE 1" >>confdefs.h
+
+             fi
+else
+  $as_echo "#define ISC_BUFFER_USEINLINE 1" >>confdefs.h
+
+fi
+
+
 # Check whether --enable-warn_shadow was given.
 if test "${enable_warn_shadow+set}" = set; then :
   enableval=$enable_warn_shadow;
index 81788165b9a8688b2b34b86d78461ecc17e48797..9354ff2f16107b3e7983664cb268ba4035374f40 100644 (file)
@@ -54,6 +54,15 @@ It is available from http://www.isc.org as a separate download.])
                ;;
 esac
 
+AC_ARG_ENABLE(buffer_useinline, AS_HELP_STRING([--enable-buffer-useinline],
+             [define ISC_BUFFER_USEINLINE when compiling [[default=yes]]]),
+             if test yes = "${enable}"
+             then
+                     AC_DEFINE([ISC_BUFFER_USEINLINE], [1],
+                               [Define if you want to use inline buffers])
+             fi,
+             AC_DEFINE([ISC_BUFFER_USEINLINE], [1]))
+
 AC_ARG_ENABLE(warn_shadow, [  --enable-warn-shadow       turn on -Wshadow when compiling])
 
 AC_ARG_ENABLE(warn_error, [  --enable-warn-error         turn on -Werror when compiling])
index a02e0955fb023204e3fd77fc92f8358ef1f01123..c9be276227bb06a07624e610f9269c056fe5a66b 100644 (file)
 #include <isc/types.h>
 
 /*!
- * To make many functions be inline macros (via \#define) define this to 1.
- * To use continue to use them as functions define this to 0.
- */
-#ifndef ISC_BUFFER_USEINLINE
-#define ISC_BUFFER_USEINLINE 1
-#endif
+ * To make many functions be inline macros (via \#define) define this.
+ * If it is undefined, a function will be used.
+  */
+/* #define ISC_BUFFER_USEINLINE */
+
 
 ISC_LANG_BEGINDECLS
 
@@ -1009,7 +1008,7 @@ ISC_LANG_ENDDECLS
                _cp[3] = (unsigned char)_val2; \
        } while (0)
 
-#if ISC_BUFFER_USEINLINE
+#if defined(ISC_BUFFER_USEINLINE)
 #define isc_buffer_init                        ISC__BUFFER_INIT
 #define isc_buffer_initnull            ISC__BUFFER_INITNULL
 #define isc_buffer_invalidate          ISC__BUFFER_INVALIDATE