*** src/common.h.ORIG Tue Aug 14 18:07:36 2007 --- src/common.h Tue Aug 14 18:08:30 2007 *************** *** 28,33 **** --- 28,36 ---- #endif #include + #ifdef _AIX + #include + #endif #include #include #include *************** *** 36,42 **** /* default chroot path. this might be redefined in compile time */ #ifndef DNRD_ROOT ! #define DNRD_ROOT "/usr/local/etc/dnrd" #endif #ifndef CONFIG_FILE --- 39,45 ---- /* default chroot path. this might be redefined in compile time */ #ifndef DNRD_ROOT ! #define DNRD_ROOT "/opt/freeware/etc/dnrd" #endif #ifndef CONFIG_FILE *** src/vsyslog.c.ORIG Tue Aug 14 18:11:19 2007 --- src/vsyslog.c Tue Aug 14 18:12:17 2007 *************** *** 0 **** --- 1,53 ---- + /* $Id: vsyslog.c,v 1.2 2000/09/20 03:42:30 robert Exp $ + /* + * Copyright (c) 1994-1996 Sam Leffler + * Copyright (c) 1994-1996 Silicon Graphics, Inc. + * HylaFAX is a trademark of Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + #include + #include + #include + #include + #include + #include + + void + vsyslog(int pri, const char* fmt, va_list ap) + { + char tbuf[2048], fmt_cpy[1024]; + char* cp; + char c; + + /* substitute error message for %m */ + for (cp = fmt_cpy; c = *fmt; ++fmt) { + if (c == '%' && fmt[1] == 'm') { + const char* dp; + ++fmt; + for (dp = strerror(errno); *cp = *dp++; ++cp) + ; + } else + *cp++ = c; + *cp = '\0'; + } + (void) vsnprintf(tbuf, sizeof(tbuf), fmt_cpy, ap); + (void) syslog(pri, "%s", tbuf); + } *** src/Makefile.in.ORIG Tue Aug 14 18:12:27 2007 --- src/Makefile.in Tue Aug 14 18:13:49 2007 *************** *** 55,61 **** dns.$(OBJEXT) lib.$(OBJEXT) main.$(OBJEXT) master.$(OBJEXT) \ query.$(OBJEXT) relay.$(OBJEXT) sig.$(OBJEXT) tcp.$(OBJEXT) \ udp.$(OBJEXT) srvnode.$(OBJEXT) domnode.$(OBJEXT) \ ! rand.$(OBJEXT) qid.$(OBJEXT) check.$(OBJEXT) dnrd_OBJECTS = $(am_dnrd_OBJECTS) dnrd_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. --- 55,61 ---- dns.$(OBJEXT) lib.$(OBJEXT) main.$(OBJEXT) master.$(OBJEXT) \ query.$(OBJEXT) relay.$(OBJEXT) sig.$(OBJEXT) tcp.$(OBJEXT) \ udp.$(OBJEXT) srvnode.$(OBJEXT) domnode.$(OBJEXT) \ ! rand.$(OBJEXT) qid.$(OBJEXT) check.$(OBJEXT) vsyslog.$(OBJEXT) dnrd_OBJECTS = $(am_dnrd_OBJECTS) dnrd_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. *************** *** 163,169 **** target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ! dnrd_SOURCES = args.c args.h cache.c cache.h common.c common.h dns.c dns.h lib.c lib.h main.c master.c master.h query.c query.h relay.c relay.h sig.c sig.h tcp.c tcp.h udp.c udp.h srvnode.h srvnode.c domnode.c domnode.h standard.h rand.h rand.c qid.h qid.c check.c check.h dnrd_LDADD = @THREAD_LIBS@ INCLUDES = @THREAD_CFLAGS@ all: config.h --- 163,169 ---- target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ! dnrd_SOURCES = args.c args.h cache.c cache.h common.c common.h dns.c dns.h lib.c lib.h main.c master.c master.h query.c query.h relay.c relay.h sig.c sig.h tcp.c tcp.h udp.c udp.h srvnode.h srvnode.c domnode.c domnode.h standard.h rand.h rand.c qid.h qid.c check.c check.h vsyslog.c dnrd_LDADD = @THREAD_LIBS@ INCLUDES = @THREAD_CFLAGS@ all: config.h *************** *** 267,272 **** --- 267,273 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srvnode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsyslog.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \