chiark / gitweb /
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 2f96f277add07dc7f67ffadc094bde451fa73e4b..31e3046c818d8ff6650f0db3d69211b75fd110ed 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 e6b4fa8098f8dda3227dbebc599feaf82f7db8f0..7875d38580d4ad09af16f19d49e0ba2e9121cffa 100644 (file)
@@ -1,3 +1,5 @@
 Makefile
 adnstest
 adnstest_s
+adnslogres
+adnslogres_s
index c75d4d0c02d22ba0a9af66e003236a5524e0bbc9..fd161ff01ceac18bc6075473a1938c47a2a46c00 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 7aa46f10166c25596a677ceb44d07c6bcb561c39..814ad62ac9607444ded7eb23bab662e5e47c4621 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 =
@@ -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 3984a0b8a4470bf2d3bfad87a905d814f4ef40ad..7e0a249ede75a71ad00f9a29ee353fcebc732581 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