OSSP CVS Repository

ossp - Check-in [2262]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2262
Date: 2002-Jul-09 11:42:09 (local)
2002-Jul-09 09:42:09 (UTC)
User:rse
Branch:
Comment: First cut for new-born OSSP fsl, a faking syslog(3) API library. It is internally based (and contains) OSSP l2 and OSSP cfg.
Tickets:
Inspections:
Files:
ossp-pkg/fsl/.cvsignore      added-> 1.1
ossp-pkg/fsl/Makefile.in      added-> 1.1
ossp-pkg/fsl/README      added-> 1.1
ossp-pkg/fsl/VERSION      added-> 1.1
ossp-pkg/fsl/aclocal.m4      added-> 1.1
ossp-pkg/fsl/configure.ac      added-> 1.1
ossp-pkg/fsl/devtool      added-> 1.1
ossp-pkg/fsl/devtool.conf      added-> 1.1
ossp-pkg/fsl/devtool.func      added-> 1.1
ossp-pkg/fsl/fsl-config.in      added-> 1.1
ossp-pkg/fsl/fsl.ac      added-> 1.1
ossp-pkg/fsl/fsl.c      added-> 1.1
ossp-pkg/fsl/fsl.pod      added-> 1.1
ossp-pkg/fsl/fsl_test.c      added-> 1.1

ossp-pkg/fsl/.cvsignore -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,13 ----
+ Makefile
+ config.guess
+ config.h
+ config.h.in
+ config.sub
+ configure
+ libtool.m4
+ ltmain.sh
+ fsl-config
+ fsl.3
+ fsl.h
+ fsl_test
+ shtool


ossp-pkg/fsl/Makefile.in -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,150 ----
+ ##
+ ##  OSSP fsl - Faking Syslog Library
+ ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ ##
+ ##  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
+ LIB_DEPS    = @LIB_DEPS@
+ 
+ TST_NAME    = fsl_test
+ TST_OBJS    = fsl_test.o
+ 
+ SUBDIRS     = @SUBDIR_L2@ @SUBDIR_CFG@
+ 
+ .SUFFIXES:
+ .SUFFIXES: .c .o .lo
+ 
+ all: _SUBDIRS_all $(LIB_NAME) $(TST_NAME)
+ 
+ .c.o:
+        $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ 
+ .c.lo:
+        @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ 
+ #   convinience 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 -l txt -d libtool VERSION` $(LIBS)
+ 
+ $(TST_NAME): $(TST_OBJS) $(LIB_NAME)
+        @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS)
+ 
+ man: fsl.3
+ fsl.3: fsl.pod
+        V1=`$(SHTOOL) version -l txt -d short VERSION`; \
+        V2=`$(SHTOOL) version -l txt -d long VERSION`; \
+        D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \
+        $(POD2MAN) --quotes=none \
+                   --section=3 --center="Faking Syslog Library" \
+                   --release="$$D" --date="OSSP fsl $$V1" fsl.pod | \
+        sed -e "s;FSL_VERSION_STR;$$V2;" >fsl.3
+ 
+ check: $(TST_NAME)
+        @$(LIBTOOL) --mode=execute ./$(TST_NAME)
+ 
+ install:
+        $(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) -r .libs >/dev/null 2>&1 || $(TRUE)
+        -$(RM) *.o *.lo
+ 
+ distclean: clean
+        @$(MAKE) $(MFLAGS) _SUBDIRS_distclean
+        -$(RM) config.log config.status config.cache
+        -$(RM) Makefile config.h sa-config
+        -$(RM) libtool
+ 
+ realclean: distclean
+        @$(MAKE) $(MFLAGS) _SUBDIRS_realclean
+        -$(RM) fsl.3
+        -$(RM) configure config.h.in
+        -$(RM) shtool
+        -$(RM) ltmain.sh libtool.m4 config.guess config.sub
+ 


ossp-pkg/fsl/README -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,47 ----
+     __     _ 
+    / _|___| |
+   | |_/ __| |
+   |  _\__ \ |
+   |_| |___/_|
+              
+   OSSP fsl - Faking Syslog Library
+   Version 
+ 
+   ABSTRACT
+ 
+   OSSP fsl is ....
+ 
+   COPYRIGHT AND LICENSE
+ 
+   Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+   Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+   Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ 
+   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.
+ 
+   HOME AND DOCUMENTATION
+ 
+   The documentation and latest release can be found on
+ 
+   o http://www.ossp.org/pkg/lib/fsl/
+   o  ftp://ftp.ossp.org/pkg/lib/fsl/
+ 


ossp-pkg/fsl/VERSION -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,6 ----
+ 
+   VERSION -- Version Information for OSSP fsl (syntax: Text)
+   [automatically generated and maintained by GNU shtool]
+ 
+   This is OSSP fsl, Version 0.1.0 (09-Jul-2002)
+ 


ossp-pkg/fsl/aclocal.m4 -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,228 ----
+ dnl ##
+ dnl ##  OSSP fsl - Faking Syslog Library
+ dnl ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP fsl, a syslog(3) API faking library which
+ dnl ##  can be found at http://www.ossp.org/pkg/lib/fsl/.
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  aclocal.m4: GNU Autoconf local macro definitions
+ dnl ##
+ 
+ dnl ##
+ dnl ##  Check whether compiler option works
+ dnl ##
+ dnl ##  configure.in:
+ dnl ##    AC_COMPILER_OPTION(<name>, <display>, <option>,
+ dnl ##                       <action-success>, <action-failure>)
+ dnl ##
+ 
+ AC_DEFUN(AC_COMPILER_OPTION,[dnl
+ AC_MSG_CHECKING(whether compiler option(s) $2 work)
+ AC_CACHE_VAL(ac_cv_compiler_option_$1,[
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $3"
+ AC_TRY_COMPILE([],[], ac_cv_compiler_option_$1=yes, ac_cv_compiler_option_$1=no)
+ CFLAGS="$SAVE_CFLAGS"
+ ])dnl
+ if test ".$ac_cv_compiler_option_$1" = .yes; then
+     ifelse([$4], , :, [$4])
+ else
+     ifelse([$5], , :, [$5])
+ fi
+ AC_MSG_RESULT([$ac_cv_compiler_option_$1])
+ ])dnl
+ 
+ dnl ##
+ dnl ##  Debugging Support
+ dnl ##
+ dnl ##  configure.in:
+ dnl ##    AC_CHECK_DEBUGGING
+ dnl ##
+ 
+ AC_DEFUN(AC_CHECK_DEBUGGING,[dnl
+ AC_ARG_ENABLE(debug,dnl
+ [  --enable-debug          build for debugging (default=no)],
+ [dnl
+ if test ".$ac_cv_prog_gcc" = ".yes"; then
+     case "$CFLAGS" in
+         *-O* ) ;;
+            * ) CFLAGS="$CFLAGS -O2" ;;
+     esac
+     case "$CFLAGS" in
+         *-g* ) ;;
+            * ) CFLAGS="$CFLAGS -g" ;;
+     esac
+     case "$CFLAGS" in
+         *-pipe* ) ;;
+               * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CFLAGS="$CFLAGS -pipe") ;;
+     esac
+     AC_COMPILER_OPTION(defdbg, -DDEBUG, -DDEBUG, CFLAGS="$CFLAGS -DDEBUG")
+     CFLAGS="$CFLAGS -pedantic"
+     CFLAGS="$CFLAGS -Wall"
+     WMORE="-Wshadow -Wpointer-arith -Wcast-align -Winline"
+     WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
+     AC_COMPILER_OPTION(wmore, -W<xxx>, $WMORE, CFLAGS="$CFLAGS $WMORE")
+     AC_COMPILER_OPTION(wnolonglong, -Wno-long-long, -Wno-long-long, CFLAGS="$CFLAGS -Wno-long-long")
+ else
+     case "$CFLAGS" in
+         *-g* ) ;;
+            * ) CFLAGS="$CFLAGS -g" ;;
+     esac
+ fi
+ msg="enabled"
+ ],[
+ if test ".$ac_cv_prog_gcc" = ".yes"; then
+ case "$CFLAGS" in
+     *-pipe* ) ;;
+           * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CFLAGS="$CFLAGS -pipe") ;;
+ esac
+ fi
+ case "$CFLAGS" in
+     *-g* ) CFLAGS=`echo "$CFLAGS" |\
+                    sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
+ esac
+ case "$CXXFLAGS" in
+     *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
+                      sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
+ esac
+ msg=disabled
+ ])dnl
+ AC_MSG_CHECKING(for compilation debug mode)
+ AC_MSG_RESULT([$msg])
+ if test ".$msg" = .enabled; then
+     enable_shared=no
+ fi
+ ])
+ 
+ dnl ##
+ dnl ##  Check for an external/extension library.
+ dnl ##  - is aware of <libname>-config style scripts
+ dnl ##  - searches under standard paths include, lib, etc.
+ dnl ##  - searches under subareas like .libs, etc.
+ dnl ##
+ dnl ##  configure.in:
+ dnl ##      AC_CHECK_EXTLIB(<realname>, <libname>, <func>, <header>,
+ dnl ##                      [<success-action> [, <fail-action>]])
+ dnl ##  Makefile.in:
+ dnl ##      CFLAGS  = @CFLAGS@
+ dnl ##      LDFLAGS = @LDFLAGS@
+ dnl ##      LIBS    = @LIBS@
+ dnl ##  shell:
+ dnl ##      $ ./configure --with-<libname>[=DIR]
+ dnl ##
+ 
+ AC_DEFUN(AC_CHECK_EXTLIB,[dnl
+ AC_ARG_WITH($2, [dnl
+ [  --with-]m4_substr([$2[[=DIR]]                     ], 0, 19)[build with external $1 library (default=no)]], [dnl
+     if test ".$with_$2" = .yes; then
+         #   via config script in PATH
+         $2_version=`($2-config --version) 2>/dev/null`
+         if test ".$$2_version" != .; then
+             CPPFLAGS="$CPPFLAGS `$2-config --cflags`"
+             CFLAGS="$CFLAGS `$2-config --cflags`"
+             LDFLAGS="$LDFLAGS `$2-config --ldflags`"
+         fi
+     else
+         if test -d "$with_$2"; then
+             found=0
+             #   via config script
+             for dir in $with_$2/bin $with_$2; do
+                 if test -f "$dir/$2-config" && test ! -f "$dir/$2-config.in"; then
+                     $2_version=`($dir/$2-config --version) 2>/dev/null`
+                     if test ".$$2_version" != .; then
+                         CPPFLAGS="$CPPFLAGS `$dir/$2-config --cflags`"
+                         CFLAGS="$CFLAGS `$dir/$2-config --cflags`"
+                         LDFLAGS="$LDFLAGS `$dir/$2-config --ldflags`"
+                         found=1
+                         break
+                     fi
+                 fi
+             done
+             #   in standard sub-areas
+             if test ".$found" = .0; then
+                 for dir in $with_$2/include/$2 $with_$2/include $with_$2; do
+                     if test -f "$dir/$4"; then
+                         CPPFLAGS="$CPPFLAGS -I$dir"
+                         CFLAGS="$CFLAGS -I$dir"
+                         found=1
+                         break
+                     fi
+                 done
+                 for dir in $with_$2/lib/$2 $with_$2/lib $with_$2; do
+                     if test -f "$dir/lib$2.la" && test -d "$dir/.libs"; then
+                         LDFLAGS="$LDFLAGS -L$dir -L$dir/.libs"
+                         found=1
+                         break
+                     elif test -f "$dir/lib$2.a" || test -f "$dir/lib$2.so"; then
+                         LDFLAGS="$LDFLAGS -L$dir"
+                         found=1
+                         break
+                     fi
+                 done
+             fi
+             #   in any sub-area
+             if test ".$found" = .0; then
+ changequote(, )dnl
+                 for file in x `find $with_$2 -name "$4" -type f -print`; do
+                     test .$file = .x && continue
+                     dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
+                     CPPFLAGS="$CPPFLAGS -I$dir"
+                     CFLAGS="$CFLAGS -I$dir"
+                 done
+                 for file in x `find $with_$2 -name "lib$2.[aso]" -type f -print`; do
+                     test .$file = .x && continue
+                     dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
+                     LDFLAGS="$LDFLAGS -L$dir"
+                 done
+ changequote([, ])dnl
+             fi
+         fi
+     fi
+     AC_HAVE_HEADERS($4)
+     AC_CHECK_LIB($2, $3)
+     with_$2=yes
+     ac_var="ac_cv_header_`echo $4 | sed 'y%./+-%__p_%'`"
+     eval "ac_val=\$$ac_var"
+     if test ".$ac_val" != .yes; then
+         with_$2=no
+     fi
+     if test ".$ac_cv_lib_$2_$3" != .yes; then
+         with_$2=no
+     fi
+     if test ".$with_$2" = .no; then
+         AC_ERROR([Unable to find $1 library])
+     fi
+     ], [dnl
+ if test ".$with_$2" = .; then
+     with_$2=no
+ fi
+     ])dnl
+ AC_MSG_CHECKING(whether to build against external $1 library)
+ if test ".$with_$2" = .yes; then
+     ifelse([$5], , :, [$5])
+ else
+     ifelse([$6], , :, [$6])
+ fi
+ AC_MSG_RESULT([$with_$2])
+ ])dnl
+ 


ossp-pkg/fsl/configure.ac -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,78 ----
+ dnl ##
+ dnl ##  OSSP fsl - Faking Syslog Library
+ dnl ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP fsl, a syslog(3) API faking library which
+ dnl ##  can be found at http://www.ossp.org/pkg/lib/fsl/.
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  configure.ac: GNU Autoconf source script
+ dnl ##
+ 
+ AC_PREREQ(2.53)
+ AC_INIT
+ FSL_VERSION_STR=`./shtool version -l txt -d long VERSION`
+ ./shtool echo -e "Configuring %BOSSP fsl%b (Faking Syslog Library), version %B${FSL_VERSION_STR}%b"
+ AC_SUBST(FSL_VERSION_STR)
+ 
+ AC_PROG_MAKE_SET
+ AC_PROG_CC
+ AC_CHECK_DEBUGGING
+ 
+ sinclude(libtool.m4)
+ AC_PROG_LIBTOOL
+ 
+ sinclude(fsl.ac)
+ FSL_CHECK_ALL
+ 
+ dnl #   pre-processing for subdirs
+ LIB_DEPS=""
+ 
+ dnl #   check for OSSP l2 library
+ AC_CHECK_EXTLIB([OSSP l2], 
+                 l2, l2_stream_log, l2.h, 
+                 [SUBDIR_L2=""], 
+                 [SUBDIR_L2="lib_l2"
+                  CPPFLAGS="$CPPFLAGS -Ilib_l2"
+                  CFLAGS="$CFLAGS -Ilib_l2"
+                  LIB_DEPS="$LIB_DEPS lib_l2/*.lo"])
+ AC_SUBST(SUBDIR_L2)
+ 
+ dnl #   check for OSSP cfg library
+ AC_CHECK_EXTLIB([OSSP cfg], 
+                 cfg, cfg_syn_import, cfg.h, 
+                 [SUBDIR_CFG=""], 
+                 [SUBDIR_CFG="lib_cfg"
+                  CPPFLAGS="$CPPFLAGS -Ilib_cfg"
+                  CFLAGS="$CFLAGS -Ilib_cfg"
+                  LIB_DEPS="$LIB_DEPS lib_cfg/*.lo"])
+ AC_SUBST(SUBDIR_CFG)
+ 
+ dnl #   post-processing for subdirs
+ AC_SUBST(LIB_DEPS)
+ AC_CONFIG_SUBDIRS([$SUBDIR_L2 $SUBDIR_CFG])
+ 
+ AC_CONFIG_HEADERS(config.h)
+ AC_CONFIG_FILES([Makefile fsl-config])
+ AC_CONFIG_COMMANDS([adjustment], [chmod a+x fsl-config])
+ AC_OUTPUT
+ 


ossp-pkg/fsl/devtool -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,47 ----
+ #!/bin/sh
+ ##
+ ##  devtool -- Development Tool
+ ##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ if [ $# -eq 0 ]; then
+     echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2
+     exit 1
+ fi
+ 
+ cmd="$1"
+ shift
+ 
+ devtoolfunc="./devtool.func"
+ 
+ if [ ! -f devtool.conf ]; then
+     echo "devtool:ERROR: no devtool.conf in current directory" 1>&2
+     exit 1
+ fi
+ 
+ cmdline=`grep "^%$cmd" devtool.conf`
+ if [ ".$cmdline" = . ]; then
+     echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2
+     exit 1
+ fi
+ 
+ if [ ".$TMPDIR" != . ]; then
+     tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
+     tmpdir="$TEMPDIR"
+ else
+     tmpdir="/tmp"
+ fi
+ tmpfile="$tmpdir/rc.$$.tmp"
+ 
+ rm -f $tmpfile
+ touch $tmpfile
+ echo ". $devtoolfunc" >>$tmpfile
+ ( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
+   sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
+ sed -e 's;\([  ]\)@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile
+ 
+ sh $tmpfile "$@"
+ 
+ rm -f $tmpfile >/dev/null 2>&1 || true
+ 


ossp-pkg/fsl/devtool.conf -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,71 ----
+ ##
+ ##  devtool.conf -- Development Tool Configuration
+ ##
+ 
+ %checkout
+     for name in l2 cfg; do
+         echo "===> lib_${name} (cvs co)"
+         cvs co -d lib_${name} ${name}
+         echo "<=== lib_${name}"
+     done
+ 
+ %autogen
+     @autogen shtool   1.6.0 "1.6.*" all
+     @autogen libtool  1.4.2 "1.4*"
+     @autogen autoconf 2.53  "2.5[3-9]*"
+ 
+     for name in l2 cfg; do
+         echo "===> lib_${name} (devtool autogen)"
+         (cd lib_${name} && ./devtool autogen)
+         echo "<=== lib_${name}"
+     done
+ 
+ %autoclean
+     @autoclean shtool
+     @autoclean libtool
+     @autoclean autoconf
+ 
+     for name in l2 cfg; do
+         echo "===> lib_${name} (devtool autogen)"
+         (cd lib_${name} && ./devtool autoclean)
+         echo "<=== lib_${name}"
+     done
+ 
+ %configure
+     ./configure \
+         --prefix=/tmp/fsl \
+         --disable-shared \
+         --enable-maintainer \
+         --enable-debug \
+         "$@"
+ 
+ %version
+     ./shtool version -l txt -n "OSSP fsl" -e VERSION
+     V=`./shtool version -l txt -d long VERSION`
+     sed -e "s/Version .*(.*)/Version $V/g" <README >README.n 
+     mv README.n README
+ 
+ %dist
+     echo "+++ generating"
+     ./devtool autoclean
+     ./devtool autogen
+     echo "+++ configuring"
+     ./configure
+     echo "+++ building"
+     make clean all man
+     echo "+++ cleaning"
+     make distclean
+     echo "+++ fixing"
+     ./shtool fixperm -v .
+     echo "+++ rolling"
+     V=`./shtool version -l txt -d short VERSION`
+     ./shtool tarball -o fsl-${V}.tar.gz -d fsl-${V} -u ossp -g ossp \
+                      -e 'CVS,\.cvsignore,\.[ao],^\.,devtool*,*.tar.gz' -c 'gzip --best' .
+     ls -l fsl-${V}.tar.gz
+     echo "+++ testing"
+     gunzip <fsl-${V}.tar.gz | tar tvf -
+ 
+ %release
+     echo "+++ copying to ftp://ftp.ossp.org/pkg/fsl/"
+     scp fsl-*.tar.gz master.ossp.org:/e/ossp/ftp/pkg/fsl/
+ 


ossp-pkg/fsl/devtool.func -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,73 ----
+ ##
+ ##  devtool.func -- Development Tool Functions
+ ##  Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ devtool_require () {
+     t="$1"; o="$2"; p="$3"; e="$4"; a="$5"
+     v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null`
+     if [ ".$v" = . ]; then
+         echo "devtool:ERROR: unable to determine version of $t" 1>&2
+         exit 1
+     fi
+     case "$v" in
+         $e )
+             ;;
+         $a )
+             echo "devtool:WARNING: $t version $v still accepted, although expected $e." 1>&2
+             ;;
+         * )
+             echo "devtool:ERROR: $t version $e expected, but found $v." 1>&2
+             exit 1
+             ;;
+     esac
+     echo "$v"
+ }
+ 
+ devtool_autogen () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"`
+             echo "generating (GNU Autoconf $autoconf_version): configure config.h.in"
+             autoconf
+             autoheader 2>&1 | grep -v "is unchanged"
+             rm -rf autom4te.cache >/dev/null 2>&1
+             ;;
+         libtool )
+             libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"`
+             echo "generating (GNU Libtool $libtoolize_version): ltmain.sh, libtool.m4, config.guess, config.sub"
+             libtoolize --force --copy >/dev/null 2>&1
+             cp `libtoolize --force --copy --dry-run | grep "add the contents of" |\
+                 sed -e 's;^[^\`]*\`;;' -e "s;'.*;;"` libtool.m4
+             ;;
+         shtool )
+             shtoolize_version=`devtool_require shtoolize -v 3 "$1" "$2"`
+             echo "generating (GNU Shtool $shtoolize_version): shtool"
+             shift
+             shift
+             shtoolize -q "$@"
+             ;;
+     esac
+ }
+ 
+ devtool_autoclean () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             echo "removing: configure config.h.in"
+             rm -f configure config.h.in
+             ;;
+         libtool )
+             echo "removing: ltmain.sh libtool.m4 config.guess config.sub"
+             rm -f ltmain.sh libtool.m4 config.guess config.sub
+             ;;
+         shtool )
+             echo "removing: shtool"
+             rm -f shtool
+             ;;
+     esac
+ }
+ 


ossp-pkg/fsl/fsl-config.in -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,145 ----
+ #!/bin/sh
+ ##
+ ##  OSSP fsl - Faking Syslog Library
+ ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ ##
+ ##  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.
+ ##
+ ##  fsl-config.in: OSSP fsl build utility
+ ##
+ 
+ DIFS='         
+ '
+ 
+ prefix="@prefix@"
+ exec_prefix="@exec_prefix@"
+ 
+ fsl_prefix="$prefix"
+ fsl_exec_prefix="$exec_prefix"
+ fsl_bindir="@bindir@"
+ fsl_libdir="@libdir@"
+ fsl_includedir="@includedir@"
+ fsl_mandir="@mandir@"
+ fsl_datadir="@datadir@"
+ fsl_acdir="@datadir@/aclocal"
+ fsl_cflags="@CFLAGS@"
+ fsl_ldflags="@LDFLAGS@"
+ fsl_libs="@LIBS@"
+ fsl_version="@FSL_VERSION_STR@"
+ 
+ help=no
+ version=no
+ 
+ usage="fsl-config"
+ usage="$usage [--help] [--version] [--all]"
+ usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]"
+ usage="$usage [--cflags] [--ldflags] [--libs]"
+ if [ $# -eq 0 ]; then
+     echo "fsl-config:Error: Invalid option" 1>&2
+     echo "fsl-config:Usage: $usage" 1>&2
+     exit 1
+ fi
+ output=''
+ output_extra=''
+ all=no
+ prev=''
+ OIFS="$IFS" IFS="$DIFS"
+ for option
+ do
+     if [ ".$prev" != . ]; then
+         eval "$prev=\$option"
+         prev=''
+         continue
+     fi
+     case "$option" in
+         -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+            *) optarg='' ;;
+     esac
+     case "$option" in
+         --help|-h)
+             echo "Usage: $usage"
+             exit 0
+             ;;
+         --version|-v)
+             echo "OSSP fsl $fsl_version"
+             exit 0
+             ;;
+         --all)
+             all=yes
+             ;;
+         --prefix)
+             output="$output $fsl_prefix"
+             ;;
+         --exec-prefix)
+             output="$output $fsl_exec_prefix"
+             ;;
+         --bindir)
+             output="$output $fsl_bindir"
+             ;;
+         --libdir)
+             output="$output $fsl_libdir"
+             ;;
+         --includedir)
+             output="$output $fsl_includedir"
+             ;;
+         --mandir)
+             output="$output $fsl_mandir"
+             ;;
+         --datadir)
+             output="$output $fsl_datadir"
+             ;;
+         --acdir)
+             output="$output $fsl_acdir"
+             ;;
+         --cflags)
+             output="$output -I$fsl_includedir"
+             output_extra="$output_extra $fsl_cflags"
+             ;;
+         --ldflags)
+             output="$output -L$fsl_libdir"
+             output_extra="$output_extra $fsl_ldflags"
+             ;;
+         --libs)
+             output="$output -lfsl"
+             output_extra="$output_extra $fsl_libs"
+             ;;
+         * )
+             echo "sa-config:Error: Invalid option" 1>&2
+             echo "sa-config:Usage: $usage" 1>&2
+             exit 1;
+             ;;
+     esac
+ done
+ IFS="$OIFS"
+ if [ ".$prev" != . ]; then
+     echo "fsl-config:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
+     exit 1
+ fi
+ if [ ".$output" != . ]; then
+     if [ ".$all" = .yes ]; then
+         output="$output $output_extra"
+     fi
+     echo $output
+ fi
+ 


ossp-pkg/fsl/fsl.ac -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,38 ----
+ dnl ##
+ dnl ##  OSSP fsl - Faking Syslog Library
+ dnl ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP fsl, a syslog(3) API faking library which
+ dnl ##  can be found at http://www.ossp.org/pkg/lib/fsl/.
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  fsl.ac: OSSP fsl Autoconf checks
+ dnl ##
+ 
+ dnl #   Check for anything OSSP SA wants to know
+ dnl #   configure.in:
+ dnl #     FSL_CHECK_ALL
+ 
+ AC_DEFUN(FSL_CHECK_ALL,[
+     AC_CHECK_HEADERS(syslog.h)
+ ])
+ 


ossp-pkg/fsl/fsl.c -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,241 ----
+ /*
+ **  OSSP fsl - Faking Syslog Library
+ **  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ **  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ **
+ **  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.
+ **
+ **  fsl.c: OSSP fsl library
+ */
+ 
+ /* standard includes we use */
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <time.h>
+ #include <sys/time.h>
+ 
+ /* standard include we re-implement */
+ #include <syslog.h>
+ 
+ /* default for the dedicated logfile */
+ #ifndef LOGFILE
+ #define LOGFILE "/tmp/syslog"
+ #endif
+ 
+ #ifndef LOG_PRIMASK
+ #define LOG_PRIMASK (LOG_EMERG|LOG_ALERT|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_NOTICE|LOG_INFO|LOG_DEBUG)
+ #endif
+ #ifndef LOG_PRI
+ #define LOG_PRI(p) ((p) & LOG_PRIMASK)
+ #endif
+ 
+ /* log level to string mapping */
+ static struct {
+     int level;
+     char *string;
+ } level2string[] = {
+     { LOG_EMERG,   "emerg"    },
+     { LOG_ALERT,   "alert"    },
+     { LOG_CRIT,    "crit"     },
+     { LOG_ERR,     "err"      },
+     { LOG_WARNING, "warning"  },
+     { LOG_NOTICE,  "notice"   },
+     { LOG_INFO,    "info"     },
+     { LOG_DEBUG,   "debug"    },
+     { 0,           NULL       }
+ };
+ 
+ /* internal context structure */
+ static struct {
+     FILE *log;
+     char *logfile;
+     const char *ident;
+     int logopt;
+     int facility;
+     int maskpri;
+ } ctx = { 
+     NULL, LOGFILE, "unknown", 0, LOG_USER, 0xff
+ };
+ 
+ void openlog(const char *ident, int logopt, int facility)
+ {
+     /* remember parameters */
+     ctx.ident    = ident;
+     ctx.logopt   = logopt;
+     ctx.facility = facility;
+ 
+     /* close perhaps still open logfile */
+     if (ctx.log != NULL) {
+         fclose(ctx.log);
+         ctx.log = NULL;
+     }
+ 
+     /* (re-)open new logfile */
+     if (!(ctx.logopt & LOG_NDELAY) && ctx.log == NULL)
+         if ((ctx.log = fopen(ctx.logfile, "a")) == NULL)
+             return;
+     return;
+ }
+ 
+ void closelog(void)
+ {
+     /* close open logfile*/
+     if (ctx.log != NULL) {
+         fclose(ctx.log);
+         ctx.log = NULL;
+     }
+     return;
+ }
+ 
+ int setlogmask(int maskpri)
+ {
+     int omask;
+ 
+     /* remember the logging mask */
+     omask = ctx.maskpri;
+     if (maskpri != 0)
+         ctx.maskpri = maskpri;
+     return omask;
+ }
+ 
+ void syslog(int priority, const char *message, ...)
+ {
+     va_list args;
+ 
+     /* wrap around vsyslog(3) */
+     va_start(args, message);
+     vsyslog(priority, message, args);
+     va_end(args);
+     return;
+ }
+ 
+ #ifdef HAVE_VSYSLOG_USVALIST
+ void vsyslog(int priority, const char *fmt, __va_list args)
+ #else
+ void vsyslog(int priority, const char *fmt, va_list args)
+ #endif
+ {
+     time_t now;
+     int saved_errno;
+     char buf[2048];
+     char *cpBuf;
+     int nBuf;
+     char caMsg[2048];
+     char *cpMsg;
+     char *cpFmt;
+     int i;
+     char *cpTime;
+     char *cpLevel;
+ 
+     /* Check for invalid bits */
+     if (priority & ~(LOG_PRIMASK|LOG_FACMASK))
+         priority &= (LOG_PRIMASK|LOG_FACMASK);
+ 
+     /* stop processing if mask disabled this call */
+     if (!(LOG_MASK(LOG_PRI(priority)) & ctx.maskpri))
+         return;
+ 
+     /* make sure we have a reasonable default for facility */
+     if ((priority & LOG_FACMASK) == 0)
+         priority |= ctx.facility;
+ 
+     /* remember errno for optional %m processing below */
+     saved_errno = errno;
+ 
+     /* open logfile now (if it was delayed) */
+     if (ctx.log == NULL)
+         if ((ctx.log = fopen(ctx.logfile, "a")) == NULL)
+             return;
+ 
+     /* determine current time */
+     time(&now);
+     cpTime = ctime(&now) + 4;
+ 
+     /* determine logging level name */
+     cpLevel = "unknown";
+     for (i = 0; level2string[i].string != NULL; i++) {
+         if (LOG_PRI(priority) == level2string[i].level) {
+             cpLevel = level2string[i].string;
+             break;
+         }
+     }
+     
+     /* start output generation */
+     cpBuf = buf;
+     sprintf(cpBuf, "%.15s <%s> %s", cpTime, cpLevel, ctx.ident);
+     nBuf = strlen(cpBuf);
+ 
+     /* optionally add process id */
+     if (ctx.logopt & LOG_PID) {
+         sprintf(cpBuf+nBuf, "[%d]", getpid());
+         nBuf += strlen(cpBuf+nBuf);
+     }
+ 
+     /* end prefix */
+     strcpy(cpBuf+nBuf, ": ");
+     nBuf += 2;
+ 
+     /* optionally expand %m in format string */
+     cpFmt = (char *)fmt;
+     if (strstr(cpFmt, "%m")) {
+         cpMsg = caMsg;
+         while (cpFmt[0] != '\0') {
+             if (cpFmt[0] == '%' && cpFmt[1] == 'm') {
+                 strcpy(cpMsg, strerror(saved_errno));
+                 cpMsg += strlen(cpMsg);
+                 cpFmt += 2;
+             } else {
+                 *cpMsg++ = *cpFmt++;
+                 *cpMsg = '\0';
+             }
+         }
+         cpFmt = caMsg;
+     }
+ 
+     /* append message to output buffer */
+     vsprintf(cpBuf+nBuf, cpFmt, args);
+     nBuf += strlen(cpBuf+nBuf);
+ 
+     /* append newline if still not present */
+     if (cpBuf[nBuf-1] != '\n') {
+         cpBuf[nBuf++] = '\n';
+         cpBuf[nBuf] = '\0';
+     }
+ 
+     /* now finally write output buffer to logfile */
+     fwrite(cpBuf, nBuf, 1, ctx.log);
+     fflush(ctx.log);
+ 
+ #ifdef LOG_PERROR
+     /* optionally also write output buffer to stderr */
+     if (ctx.logopt & LOG_PERROR)
+         fwrite(cpBuf, nBuf, 1, stderr);
+ #endif
+ 
+     return;
+ }
+ 


ossp-pkg/fsl/fsl.pod -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,110 ----
+ ##
+ ##  OSSP fsl - Faking Syslog Library
+ ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ ##
+ ##  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.
+ ##
+ ##  fsl.pod: OSSP fsl manual page
+ ##
+ 
+ =pod
+ 
+ =head1 NAME
+ 
+ B<OSSP fsl> - Faking Syslog Library
+ 
+ =head1 VERSION
+ 
+ OSSP fsl FSL_VERSION_STR
+ 
+ =head1 SYNOPSIS
+ 
+  LDFLAGS=`fsl-config --ldflags` \
+  LIBS="-lfsl" \
+  ./configure [...]
+ 
+ =head1 DESCRIPTION
+ 
+ B<OSSP fsl> offers the syslog(3) API otherwise provided by the Standard
+ C Library (F<libc>). Instead of writing to the syslogd(8) process, it
+ uses the powerful B<OSSP l2> logging capabilities. It is a drop-in
+ link-time replacement which enables any syslog(3) consumer to take
+ advantage of B<OSSP l2> by just linking this library in before F<libc>.
+ The source code of the program remains unchanged.
+ 
+ =head1 FILES
+ 
+ The B<OSSP l2syslog> library reads configuration sections located in
+ one or more files. The path to the directory containing these file(s)
+ is specified at compile time and is given to the configure script via
+ C<--with-cfgdir=>I<cfgdir>.
+ 
+ =head1 OPERATION
+ 
+ If an application calls openlog(3) it passes an identification string
+ (I<ident>) and a logging facility (I<facility>) along. B<OSSP l2syslog>
+ tries to read the file "C<cfgdir>C</l2.>I<ident>". If the file is not
+ readable, all files matching I<cfgdir>C</l2.*> are read.
+ 
+ In both cases, all data that has been read in is then parsed for
+ configuration sections. These are identified by "C<ident >I<match>"
+ at the beginning of a line. The I<match> argument is a PCRE (Perl
+ Compatible Regular Expression) that is matched against a string
+ concatenated from "I<ident>/I<facility>" given to the openlog(3) call.
+ 
+ The configuration section contains an B<OSSP l2> specification enclosed
+ in curly brackets where the closing bracket must be placed on the
+ beginning of a line and terminated with a semicolon. The B<OSSP l2>
+ specification may contain $1, $2, ... variables which are filled in from
+ the I<match> regex parts enclosed in round brackets.
+ 
+ An B<OSSP l2> channel tree is build from each matching section and all
+ found trees are merged together with a "null" channel to form a single
+ tree. Further calls to syslog(3) will then inject log messages into this
+ channel tree.
+ 
+ =head1 EXAMPLE
+ 
+  ident sendmail/.* {
+    debug:
+      prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> $1 [%%P]: ",
+             timezone=local)
+      -> file(path="sendmail.debug.log", append=0,perm=432)
+  };
+ 
+ 
+ =head1 OPENPKG
+ 
+ OpenPKG RPM packages must require the package "l2" in both C<BuildPreReq> and
+ C<PreReq> and force the packaged application to link against F<libl2syslog.a>.
+ 
+ =head1 SEE ALSO
+ 
+ syslog(3).
+ 
+ =head1 AUTHOR
+ 
+ Thomas Lotterer <thl@ossp.org>
+ 
+ =cut


ossp-pkg/fsl/fsl_test.c -> 1.1

*** /dev/null    Sat Nov 23 00:58:13 2024
--- -    Sat Nov 23 00:58:51 2024
***************
*** 0 ****
--- 1,14 ----
+ 
+ #include <stdio.h>
+ #include <syslog.h>
+ 
+ int main(int argc, char *argv[])
+ {
+     syslog(LOG_INFO, "Connection from host %s", "foo.bar.dom");
+     openlog("mail", LOG_PID|LOG_NDELAY, LOG_FTP);
+     syslog(LOG_ALERT, "who: internal error 23\n");
+     setlogmask(LOG_UPTO(LOG_ERR));
+     syslog(LOG_INFO|LOG_LOCAL2, "foobar error: %m");
+     return 0;
+ }
+ 

CVSTrac 2.0.1