diff --git a/CHANGES b/CHANGES index c4f6a3e95e..bdd3d158f3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +4811. [bug] Revert api changes to use inline + macros. Provide a alternative mechanism to turn + on the use of inline macros when building BIND. + [RT #46520] + --- 9.11.3b1 released --- 4876. [bug] Address deadlock with accessing a keytable. [RT #47000] diff --git a/config.h.in b/config.h.in index 701526c820..9f910ae095 100644 --- a/config.h.in +++ b/config.h.in @@ -533,6 +533,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 diff --git a/configure b/configure index b03ca33009..d416621de3 100755 --- a/configure +++ b/configure @@ -1008,6 +1008,7 @@ with_gnu_ld with_sysroot enable_libtool_lock enable_libbind +enable_buffer_useinline enable_warn_shadow enable_warn_error enable_developer @@ -1710,6 +1711,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 @@ -11470,6 +11474,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; diff --git a/configure.in b/configure.in index 1c80c3f648..8ea42e5d06 100644 --- a/configure.in +++ b/configure.in @@ -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, AS_HELP_STRING([--enable-warn-shadow], [turn on -Wshadow when compiling])) diff --git a/lib/isc/include/isc/buffer.h b/lib/isc/include/isc/buffer.h index 569471f0bf..10f4325c90 100644 --- a/lib/isc/include/isc/buffer.h +++ b/lib/isc/include/isc/buffer.h @@ -104,12 +104,11 @@ #include /*! - * 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 @@ -977,7 +976,7 @@ ISC_LANG_ENDDECLS _cp[3] = _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