head 1.19; access; symbols FSL_1_7_0:1.19 FSL_1_6_1:1.19 FSL_1_6_0:1.18 FSL_1_6b2:1.18 FSL_1_6b1:1.18 FSL_1_5_0:1.18 FSL_1_5a3:1.18 FSL_1_5a2:1.18 FSL_1_5a1:1.18 FSL_1_4_0:1.17 FSL_1_4b1:1.17 FSL_1_4a1:1.16 FSL_1_3_0:1.16 FSL_1_3b1:1.16 FSL_1_2_1:1.16 FSL_1_2_0:1.16 FSL_1_1_0:1.16 FSL_1_1b1:1.15 FSL_1_0_8:1.13 FSL_1_0_7:1.13 FSL_1_0_6:1.12 FSL_1_0_5:1.12 FSL_1_0_4:1.12 FSL_1_0_3:1.12 FSL_1_0_2:1.12 FSL_1_0_1:1.12 FSL_1_0_0:1.9 FSL_0_9_0:1.9 FSL_0_1_12:1.6 FSL_0_1_11:1.6 FSL_0_1_10:1.6 FSL_0_1_9:1.6 FSL_0_1_8:1.4 FSL_0_1_7:1.4 FSL_0_1_6:1.4 FSL_0_1_5:1.4 FSL_0_1_1:1.4; locks; strict; comment @# @; 1.19 date 2005.10.03.09.28.53; author rse; state Exp; branches; next 1.18; 1.18 date 2004.02.17.09.22.30; author thl; state Exp; branches; next 1.17; 1.17 date 2004.01.09.10.48.26; author thl; state Exp; branches; next 1.16; 1.16 date 2003.05.22.14.01.55; author thl; state Exp; branches; next 1.15; 1.15 date 2003.05.22.12.30.35; author thl; state Exp; branches; next 1.14; 1.14 date 2003.05.20.15.47.23; author thl; state Exp; branches; next 1.13; 1.13 date 2003.01.06.16.41.21; author rse; state Exp; branches; next 1.12; 1.12 date 2002.08.02.11.42.17; author rse; state Exp; branches; next 1.11; 1.11 date 2002.08.02.11.40.00; author rse; state Exp; branches; next 1.10; 1.10 date 2002.08.02.11.33.10; author rse; state Exp; branches; next 1.9; 1.9 date 2002.08.01.11.41.05; author rse; state Exp; branches; next 1.8; 1.8 date 2002.08.01.09.36.53; author rse; state Exp; branches; next 1.7; 1.7 date 2002.07.31.12.58.03; author thl; state Exp; branches; next 1.6; 1.6 date 2002.07.27.18.13.51; author rse; state Exp; branches; next 1.5; 1.5 date 2002.07.27.15.37.21; author rse; state Exp; branches; next 1.4; 1.4 date 2002.07.23.11.57.46; author thl; state Exp; branches; next 1.3; 1.3 date 2002.07.17.14.23.10; author thl; state Exp; branches; next 1.2; 1.2 date 2002.07.12.17.26.23; author rse; state Exp; branches; next 1.1; 1.1 date 2002.07.09.09.42.09; author rse; state Exp; branches; next ; desc @@ 1.19 log @Adjust copyright messages to include new year 2005. @ text @## ## OSSP fsl - Faking/Flexible Syslog Library ## Copyright (c) 2002-2005 Ralf S. Engelschall ## Copyright (c) 2002-2005 The OSSP Project ## Copyright (c) 2002-2005 Cable & Wireless ## ## This file is part of OSSP fsl, a syslog(3) API faking library which ## can be found at http://www.ossp.org/pkg/lib/fsl/. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## ## Makefile.in: make(1) build procedure ## @@SET_MAKE@@ DESTDIR = prefix = @@prefix@@ exec_prefix = @@exec_prefix@@ bindir = @@bindir@@ libdir = @@libdir@@ includedir = @@includedir@@ mandir = @@mandir@@ CC = @@CC@@ CPPFLAGS = @@CPPFLAGS@@ CFLAGS = @@DEFS@@ @@CFLAGS@@ LDFLAGS = @@LDFLAGS@@ LIBS = @@LIBS@@ RM = rm -f RMDIR = rmdir SHTOOL = ./shtool LIBTOOL = ./libtool TRUE = true POD2MAN = pod2man LIB_NAME = libfsl.la LIB_OBJS = fsl.lo fsl_version.lo LIB_DEPS = @@LIB_DEPS@@ MAN_NAME = fsl.3 TST_NAME = fsl_test TST_OBJS = fsl_test.o FSL_CFGDIR = @@FSL_CFGDIR@@ FSL_PREFIX = @@FSL_PREFIX@@ FSL_DEBUGLOGCODE = @@FSL_DEBUGLOGCODE@@ FSL_DEBUGLOGFILE = @@FSL_DEBUGLOGFILE@@ FSL_DEBUGLOGMASK = @@FSL_DEBUGLOGMASK@@ FSL_DEBUGLOGSTOP = @@FSL_DEBUGLOGSTOP@@ SUBDIRS = @@SUBDIR_L2@@ @@SUBDIR_CFG@@ @@SUBDIR_PCRE@@ .SUFFIXES: .SUFFIXES: .c .o .lo all: _SUBDIRS_all $(LIB_NAME) $(TST_NAME) $(MAN_NAME) .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c $< .c.lo: @@$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< # convenience rule for calling _SUBDIRS with various make targets _SUBDIRS_all _SUBDIRS_check _SUBDIRS_install _SUBDIRS_uninstall _SUBDIRS_clean \ _SUBDIRS_distclean _SUBDIRS_realclean _SUBDIRS_depend: @@$(MAKE) $(MFLAGS) \ _SUBDIRS_TARGET=`echo $@@ | sed -e 's/^_SUBDIRS_//'` \ _SUBDIRS_STEPDOWN # the work horse rule which steps down to the subdirs in a loop _SUBDIRS_STEPDOWN: @@for subdir in $(SUBDIRS); do \ test ! -f "$$subdir/Makefile" && continue; \ echo "===> $(_SUBDIRS_DP)$$subdir ($(_SUBDIRS_TARGET))"; \ (cd $$subdir; \ $(MAKE) $(MFLAGS) \ _SUBDIRS_DP="$(_SUBDIRS_DP)$$subdir/" \ $(_SUBDIRS_TARGET) || exit 1) || exit 1; \ echo "<=== $(_SUBDIRS_DP)$$subdir"; \ done $(LIB_NAME): $(LIB_OBJS) @@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_DEPS) -rpath $(libdir) \ -version-info `$(SHTOOL) version -lc -dlibtool fsl_version.c` $(LIBS) $(TST_NAME): $(TST_OBJS) $(LIB_NAME) @@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS) man: $(MAN_NAME) $(MAN_NAME): fsl.pod fsl_version.c VS=`$(SHTOOL) version -lc -dshort fsl_version.c`; \ VL=`$(SHTOOL) version -lc -dlong fsl_version.c`; \ D=`$(SHTOOL) version -lc -dlong fsl_version.c | sed -e 's;.*(;;' -e 's;).*;;'`; \ $(POD2MAN) --quotes=none \ --section=3 --center="Faking/Flexible Syslog Library" \ --release="$$D" --date="OSSP fsl $$VS" fsl.pod | \ sed -e "s;FSL_VERSION_STR;$$VL;" \ -e "s;\@@FSL_CFGDIR\@@;$(FSL_CFGDIR);g" \ -e "s;\@@FSL_PREFIX\@@;$(FSL_PREFIX);g" \ -e "s;\@@FSL_DEBUGLOGCODE\@@;$(FSL_DEBUGLOGCODE);g" \ -e "s;\@@FSL_DEBUGLOGFILE\@@;$(FSL_DEBUGLOGFILE);g" \ -e "s;\@@FSL_DEBUGLOGMASK\@@;$(FSL_DEBUGLOGMASK);g" \ -e "s;\@@FSL_DEBUGLOGSTOP\@@;$(FSL_DEBUGLOGSTOP);g" \ >fsl.3 test: check check: $(TST_NAME) @@[ -f fsl_test.syslog ] && $(RM) fsl_test.syslog || true @@$(LIBTOOL) --mode=execute ./$(TST_NAME) @@echo "fsl_test.syslog:"; if [ -s fsl_test.syslog ]; then cat fsl_test.syslog; else echo " ***EMPTY***"; fi @@echo "this test requires manual configuration, use fsl_test.cfg as template and see pathes below" @@strings <$(TST_NAME) | grep '@@(#)' install: all $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3 $(SHTOOL) install -c -m 755 fsl-config $(DESTDIR)$(bindir)/ $(SHTOOL) install -c -m 644 fsl.3 $(DESTDIR)$(mandir)/man3/ @@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libfsl.la $(DESTDIR)$(libdir)/ uninstall: @@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libfsl.la -$(RM) $(DESTDIR)$(mandir)/man3/fsl.3 -$(RM) $(DESTDIR)$(bindir)/fsl-config -$(RMDIR) $(DESTDIR)$(mandir)/man3 >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(libdir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) clean: @@$(MAKE) $(MFLAGS) _SUBDIRS_clean -$(RM) $(LIB_NAME) $(LIB_OBJS) -$(RM) $(TST_NAME) $(TST_OBJS) -$(RM) fsl_test.debug fsl_test.syslog >/dev/null 2>&1 || $(TRUE) -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE) -$(RM) *.o *.lo distclean: @@$(MAKE) $(MFLAGS) _SUBDIRS_distclean @@$(MAKE) $(MFLAGS) clean -$(RM) config.log config.status config.cache -$(RM) Makefile config.h sa-config -$(RM) libtool realclean: @@$(MAKE) $(MFLAGS) _SUBDIRS_realclean @@$(MAKE) $(MFLAGS) distclean -$(RM) fsl.3 -$(RM) configure config.h.in -$(RM) shtool -$(RM) ltmain.sh libtool.m4 config.guess config.sub @ 1.18 log @correct spelling: privileges, convenient; @ text @d3 3 a5 3 ## Copyright (c) 2002-2004 Ralf S. Engelschall ## Copyright (c) 2002-2004 The OSSP Project ## Copyright (c) 2002-2004 Cable & Wireless Deutschland @ 1.17 log @Adjust copyright messages to include new year 2004 @ text @d82 1 a82 1 # convinience rule for calling _SUBDIRS with various make targets @ 1.16 log @whitespaces @ text @d3 3 a5 3 ## Copyright (c) 2002-2003 Ralf S. Engelschall ## Copyright (c) 2002-2003 The OSSP Project ## Copyright (c) 2002-2003 Cable & Wireless Deutschland @ 1.15 log @for details see attached ChangeLog @ text @d87 1 a87 1 _SUBDIRS_STEPDOWN d167 1 a167 1 realclean: @ 1.14 log @- improve prefixing by renaming variables l2_fslenv > fsldebug_l2_env l2_fslnch > fsldebug_l2_nch triedopenfsldebug > fsldebug_transientproblem openfsldebugpermanenterror > fsldebug_permanentproblem - add function fsldebugcreate() - rename functions and slightly change their operation to work in a stealth mode for LOG_NDELAY support openfsldebug() > fsl closefsllog() > fsldebugdestroy() - make fsldebug() a metafunction and split the old functionality into fsldebugl2() for l2 and fsldebugf2() for stderr filedescriptor - improve prefixing by adding debugging prototypes to support fsldebug() calling fsldebugcreate() which uses fsldebug() for logging static void fsldebugcreate (void); static void fsldebug (l2_level_t, const char *, ...); static int fsldebugl2 (l2_level_t, const char *, va_list); static int fsldebugf2 (l2_level_t, const char *, va_list); static void fsldebugdestroy(void); - change default for delayopen to TRUE as user has to use LOG_NDELAY to force immediate open. - improve handling of NULL strings when debugging - unify debugging messages on entry to captured functions using common prefix 'fsl in ...' - obey LOG_NDELAY on fsl debugging as well - add filedescriptor consumption checks to test suite - remove confusing use of the word "error" in test suite messages - improve Makefile to prepare and detect empty files - tested on FreeBSD, Linux and Solaris - not intended for release - further modifications are underway @ text @d62 6 a67 2 FSL_CFGDIR = @@FSL_CFGDIR@@ FSL_PREFIX = @@FSL_PREFIX@@ d118 6 a123 1 -e "s;\@@FSL_PREFIX\@@;$(FSL_PREFIX);g" >fsl.3 a126 1 @@[ -f fsl_test.debug ] && $(RM) fsl_test.debug || true d128 1 a128 5 @@true && \ FSL_CFGDIR=.; export FSL_CFGDIR; \ FSL_PREFIX=fsl_test.cfg; export FSL_PREFIX; \ FSL_DEBUG="trace: file(path=fsl_test.debug)"; export FSL_DEBUG; \ $(LIBTOOL) --mode=execute ./$(TST_NAME) d130 2 a131 1 #echo "fsl_test.debug:"; if [ -s fsl_test.debug ]; then cat fsl_test.debug; else echo " ***EMPTY***"; fi @ 1.13 log @Adjust copyright messages to include new year 2003 @ text @d118 3 a120 2 @@$(RM) fsl_test.debug >/dev/null 2>&1 || true; \ $(RM) fsl_test.syslog >/dev/null 2>&1 || true; \ d125 2 a126 1 @@echo "fsl_test.syslog:"; cat fsl_test.syslog @ 1.12 log @make sure people don't think nothing was tested at all @ text @d3 3 a5 3 ## Copyright (c) 2002 Ralf S. Engelschall ## Copyright (c) 2002 The OSSP Project ## Copyright (c) 2002 Cable & Wireless Deutschland @ 1.11 log @Change building of fsl_version.c from direct inclusion to standard object linking. @ text @d124 1 @ 1.10 log @allow 'make test', too. @ text @d54 1 a54 1 LIB_OBJS = fsl.lo @ 1.9 log @add support for FSL_PREFIX and FSL_DEBUG variables. @ text @d116 1 @ 1.8 log @cleanup @ text @d63 1 d112 3 a114 1 sed -e "s;FSL_VERSION_STR;$$VL;" -e "s;FSL_CFGDIR;$(FSL_CFGDIR);g" >fsl.3 d117 6 a122 1 @@$(LIBTOOL) --mode=execute ./$(TST_NAME) d147 1 @ 1.7 log @now logging FSL version @ text @d98 1 a98 1 -version-info `$(SHTOOL) version -l txt -d libtool VERSION` $(LIBS) d107 1 a107 1 D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \ @ 1.6 log @source tree cleanups and fixes @ text @d104 3 a106 3 $(MAN_NAME): fsl.pod V1=`$(SHTOOL) version -l txt -d short VERSION`; \ V2=`$(SHTOOL) version -l txt -d long VERSION`; \ d110 2 a111 2 --release="$$D" --date="OSSP fsl $$V1" fsl.pod | \ sed -e "s;FSL_VERSION_STR;$$V2;" -e "s;FSL_CFGDIR;$(FSL_CFGDIR);g" >fsl.3 @ 1.5 log @add Flexible to the official name @ text @d62 2 d111 1 a111 1 sed -e "s;FSL_VERSION_STR;$$V2;" >fsl.3 @ 1.4 log @fix building of manpage @ text @d2 1 a2 1 ## OSSP fsl - Faking Syslog Library d107 1 a107 1 --section=3 --center="Faking Syslog Library" \ @ 1.3 log @clean/distclean interdependencies @ text @d57 2 d67 1 a67 1 all: _SUBDIRS_all $(LIB_NAME) $(TST_NAME) d101 2 a102 2 man: fsl.3 fsl.3: fsl.pod d114 1 a114 1 install: @ 1.2 log @add OSSP pcre to build environment @ text @d138 1 a138 1 distclean: clean d140 1 d145 1 a145 1 realclean: distclean d147 1 @ 1.1 log @First cut for new-born OSSP fsl, a faking syslog(3) API library. It is internally based (and contains) OSSP l2 and OSSP cfg. @ text @d60 1 a60 1 SUBDIRS = @@SUBDIR_L2@@ @@SUBDIR_CFG@@ @