From 23d78b27cbd50ce871d20713cb28760a37fd2f09 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 15 Aug 1999 16:15:48 +0000 Subject: [PATCH] New features: * New adnslogres, ~100x faster replacement for Apache logresolve; Thanks to Tony Finch for the program and the performance figure. * Do not give -u 0 -g 0 options to install. --- changelog | 5 +++++ client/.cvsignore | 2 ++ client/Makefile.in | 10 ++++++---- client/adnslogres.c | 15 ++++++++++----- settings.make.in | 2 +- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/changelog b/changelog index 2f96f27..31e3046 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,9 @@ adns (0.5) unstable; urgency=medium + New features: + * New adnslogres, ~100x faster replacement for Apache logresolve; + Thanks to Tony Finch for the program and the performance figure. + Incompatible changes: * RRs with mailboxes never rejected due to strange chars if _raw. * Lack of a mailbox produces `.' not `<>'. @@ -11,6 +15,7 @@ adns (0.5) unstable; urgency=medium * Give install the '-c' flag (otherwise some delete the original !). * Reject TXT RRs with no strings. * Don't complain so much about poll(2) tests if not available. + * Do not give -u 0 -g 0 options to install. -- diff --git a/client/.cvsignore b/client/.cvsignore index e6b4fa8..7875d38 100644 --- a/client/.cvsignore +++ b/client/.cvsignore @@ -1,3 +1,5 @@ Makefile adnstest adnstest_s +adnslogres +adnslogres_s diff --git a/client/Makefile.in b/client/Makefile.in index c75d4d0..fd161ff 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -19,8 +19,9 @@ srcdir= @srcdir@ VPATH= @srcdir@ -TARG_LOCAL= adnstest_s -TARG_INSTALL= adnstest +PROGRAMS= adnstest adnslogres +TARG_INSTALL= $(PROGRAMS) +TARG_LOCAL= $(addsuffix _s, $(PROGRAMS)) TARGETS= $(TARG_LOCAL) $(TARG_INSTALL) include $(srcdir)/../settings.make @@ -35,7 +36,8 @@ install: $(TARG_INSTALL) uninstall: for f in $(TARGETS); do rm -f $(bin_dir)/$$f; done -adnstest: adnstest.o $(srcdir)/../dynamic/$(SHLIBFILE) +%: %.o $(srcdir)/../dynamic/$(SHLIBFILE) + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) -adnstest_s: adnstest.o $(srcdir)/../src/libadns.a +%_s: %.o $(srcdir)/../src/libadns.a $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) diff --git a/client/adnslogres.c b/client/adnslogres.c index 7aa46f1..814ad62 100644 --- a/client/adnslogres.c +++ b/client/adnslogres.c @@ -3,7 +3,9 @@ * - a replacement for the Apache logresolve program using adns */ /* - * This file is Copyright (C) 1999 Tony Finch + * This file is + * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999 Ian Jackson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +19,10 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * This version was originally supplied by Tony Finch, but has been + * modified by Ian Jackson as it was incorporated into adns. */ static const char * const cvsid = @@ -87,7 +92,7 @@ static void printline(char *start, char *addr, char *rest, char *domain) { printf("%.*s%s%s", addr - start, start, domain, rest); else fputs(start, stdout); - /* XXX: error checking */ + if (ferror(stdout)) aargh("write output"); } typedef struct logline { @@ -159,9 +164,9 @@ static void proclog(void) { adns_finish(adns); } -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]) { progname= *argv; proclog(); + if (fclose(stdout)) aargh("finish writing output"); return 0; } diff --git a/settings.make.in b/settings.make.in index 3984a0b..7e0a249 100644 --- a/settings.make.in +++ b/settings.make.in @@ -44,7 +44,7 @@ bin_dir= $(exec_prefix)/bin lib_dir= $(exec_prefix)/lib include_dir= $(prefix)/include -INSTALL= install -c -o 0 -g 0 +INSTALL= install -c INSTALL_PROGRAM= $(INSTALL) -m 755 $(INSTALL_PROGRAM_FLAGS) INSTALL_DATA= $(INSTALL) -m 644 -- 2.30.2