New features:
authorian <ian>
Sun, 15 Aug 1999 16:15:48 +0000 (16:15 +0000)
committerian <ian>
Sun, 15 Aug 1999 16:15:48 +0000 (16:15 +0000)
* 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
client/.cvsignore
client/Makefile.in
client/adnslogres.c
settings.make.in

index 2f96f27..31e3046 100644 (file)
--- 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.
 
  --
 
index e6b4fa8..7875d38 100644 (file)
@@ -1,3 +1,5 @@
 Makefile
 adnstest
 adnstest_s
+adnslogres
+adnslogres_s
index c75d4d0..fd161ff 100644 (file)
@@ -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)
index d15f7b3..9c5216e 100644 (file)
@@ -3,7 +3,9 @@
  * - a replacement for the Apache logresolve program using adns
  */
 /*
- *  This file is Copyright (C) 1999 Tony Finch <fanf@demon.net> <dot@dotat.at>
+ *  This file is
+ *   Copyright (C) 1999 Tony Finch <fanf@demon.net> <dot@dotat.at>
+ *   Copyright (C) 1999 Ian Jackson <ian@davenant.greenend.org.uk>
  *  
  *  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
  *  
  *  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 =
-       "$Id: adnslogres.c,v 1.1 1999/08/15 15:30:32 ian Exp $";
+       "$Id: adnslogres.c,v 1.2 1999/08/15 16:15:52 ian Exp $";
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -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;
 }
index 3984a0b..7e0a249 100644 (file)
@@ -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