From: Ondřej Surý Date: Thu, 11 Feb 2021 13:13:27 +0000 (+0100) Subject: Move the header to bin/dig/readline.h X-Git-Tag: v9.17.11~52^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1448a4c2a6680adc2019b782148321ee2052a7c;p=thirdparty%2Fbind9.git Move the header to bin/dig/readline.h The header provided a compatibility shim to use when other non-GNU readline libraries are in use. The two places where readline library is being used is nslookup and nsupdate, so the header file has been moved to bin/dig directory and it's directly included from bin/nsupdate. This also conceals any readline headers exposed from the libisc headers. --- diff --git a/bin/dig/Makefile.am b/bin/dig/Makefile.am index 538a5fdcfed..e130df08c14 100644 --- a/bin/dig/Makefile.am +++ b/bin/dig/Makefile.am @@ -25,10 +25,15 @@ libdighost_la_SOURCES = \ bin_PROGRAMS = dig host nslookup +nslookup_CPPFLAGS = \ + $(AM_CPPFLAGS) + nslookup_LDADD = \ $(LDADD) if HAVE_READLINE +nslookup_CPPFLAGS += \ + $(READLINE_CFLAGS) nslookup_LDADD += \ $(READLINE_LIBS) endif HAVE_READLINE diff --git a/bin/dig/include/.clang-format b/bin/dig/include/.clang-format deleted file mode 120000 index 0e62f72bcfa..00000000000 --- a/bin/dig/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../.clang-format.headers \ No newline at end of file diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index c28a432b2a7..ad5e970d2dc 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -38,6 +37,7 @@ #include #include "dighost.h" +#include "readline.h" static bool short_form = true, tcpmode = false, tcpmode_set = false, identify = false, stats = true, comments = true, diff --git a/lib/isc/include/isc/readline.h b/bin/dig/readline.h similarity index 100% rename from lib/isc/include/isc/readline.h rename to bin/dig/readline.h diff --git a/bin/nsupdate/Makefile.am b/bin/nsupdate/Makefile.am index 29fd0cfac0c..fc0e62b99cf 100644 --- a/bin/nsupdate/Makefile.am +++ b/bin/nsupdate/Makefile.am @@ -7,7 +7,8 @@ AM_CPPFLAGS += \ $(LIBIRS_CFLAGS) \ $(LIBBIND9_CFLAGS) \ $(GSSAPI_CFLAGS) \ - $(KRB5_CFLAGS) + $(KRB5_CFLAGS) \ + $(READLINE_CFLAGS) AM_CPPFLAGS += \ -DSESSION_KEYFILE=\"${localstatedir}/run/named/session.key\" @@ -27,3 +28,7 @@ LDADD += \ endif bin_PROGRAMS = nsupdate + +nsupdate_SOURCES = \ + nsupdate.c \ + ../dig/readline.h diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 2d10feb95d0..e303ee9dc86 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -95,6 +94,8 @@ #include +#include "../dig/readline.h" + #define MAXCMD (128 * 1024) #define MAXWIRE (64 * 1024) #define PACKETSIZE ((64 * 1024) - 1) diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am index 48ead7c17f4..58438d5c5e9 100644 --- a/lib/isc/Makefile.am +++ b/lib/isc/Makefile.am @@ -66,7 +66,6 @@ libisc_la_HEADERS = \ include/isc/radix.h \ include/isc/random.h \ include/isc/ratelimiter.h \ - include/isc/readline.h \ include/isc/refcount.h \ include/isc/regex.h \ include/isc/region.h \ diff --git a/util/copyrights b/util/copyrights index 32b2552982d..5c0d643f4b1 100644 --- a/util/copyrights +++ b/util/copyrights @@ -55,6 +55,7 @@ ./bin/dig/host.rst RST 2020,2021 ./bin/dig/nslookup.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/dig/nslookup.rst RST 2020,2021 +./bin/dig/readline.h C 2020,2021 ./bin/dig/win32/dig.vcxproj.filters.in X 2013,2015,2018,2019,2020 ./bin/dig/win32/dig.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 ./bin/dig/win32/dig.vcxproj.user X 2013,2018,2019,2020,2021 @@ -1864,7 +1865,6 @@ ./lib/isc/include/isc/radix.h C 2007,2008,2013,2014,2016,2018,2019,2020,2021 ./lib/isc/include/isc/random.h C 1999,2000,2001,2004,2005,2006,2007,2009,2014,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/ratelimiter.h C 1999,2000,2001,2002,2004,2005,2006,2007,2009,2014,2016,2018,2019,2020,2021 -./lib/isc/include/isc/readline.h C 2020,2021 ./lib/isc/include/isc/refcount.h C 2001,2003,2004,2005,2006,2007,2009,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/regex.h C 2013,2016,2018,2019,2020,2021 ./lib/isc/include/isc/region.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2013,2016,2018,2019,2020,2021