OSSP CVS Repository

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

Check-in Number: 5004
Date: 2005-Feb-03 10:40:34 (local)
2005-Feb-03 09:40:34 (UTC)
User:rse
Branch:
Comment: - Add va_copy() Autoconf checks to make va_list copying portable. - Accept new GNU Bison 2.0
Tickets:
Inspections:
Files:
ossp-pkg/l2/ChangeLog      added-> 1.21
ossp-pkg/l2/aclocal.m4      1.16 -> 1.17     111 inserted, 0 deleted
ossp-pkg/l2/configure.ac      1.28 -> 1.29     4 inserted, 2 deleted

ossp-pkg/l2/ChangeLog -> 1.21

*** /dev/null    Sat Nov 23 00:55:02 2024
--- -    Sat Nov 23 00:55:56 2024
***************
*** 0 ****
--- 1,124 ----
+    _        ___  ____ ____  ____    _ ____
+   |_|_ _   / _ \/ ___/ ___||  _ \  | |___ \
+   _|_||_| | | | \___ \___ \| |_) | | | __) |
+  |_||_|_| | |_| |___) |__) |  __/  | |/ __/
+   |_|_|_|  \___/|____/____/|_|     |_|_____|
+ 
+   OSSP l2 -- Flexible Logging
+ 
+   ChangeLog
+   =========
+ 
+   Changes between 0.9.9 and 0.9.10 (01-Feb-2005 to 03-Feb-2005)
+ 
+     *) Add va_copy() Autoconf checks to make va_list copying portable.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+     *) Accept new GNU Bison 2.0
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between 0.9.8 and 0.9.9 (24-Apr-2004 to 01-Feb-2005)
+   
+     *) Import OSSP sa 1.2.4
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Upgraded build environment to GNU shtool 2.0.1 and
+        GNU libtool 1.5.10.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+     *) Adjust copyright messages for new year 2005.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between 0.9.7 and 0.9.8 (22-Apr-2004 to 22-Apr-2004)
+ 
+     *) Change devtool.conf %import of OSSP sa to inject a faked
+        HAVE_CONFIG_H. This unbreaks preprocessor conditions and fixes
+        building on Solaris 2.6
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+   Changes between 0.9.6 and 0.9.7 (21-Apr-2004 to 22-Apr-2004)
+ 
+     *) Replace modf(3) calls in l2_ut_format.c with a hand-crafted
+        inlined l2_util_modf() function to avoid dependency to external
+        libm on systems where modf(3) is not part of libc, i.e. Tru64 and
+        QNX. Reported by Karl Vogel.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between 0.9.5 and 0.9.6 (10-Nov-2003 to 21-Apr-2004)
+ 
+     *) Create devtool.conf %import and import OSSP sa 1.2.0
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+   Changes between 0.9.4 and 0.9.5 (25-Sep-2003 to 10-Nov-2003)
+ 
+     *) Remove log0...4 macros
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Minor adjustments porting to OpenDarwin 6.6
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Fix Problem where l2 does not terminate a message when it
+        contains a \n so if previous message was longer the part between
+        \n and the end of the previous message is repeated in the current
+        message.
+        http://cvs.ossp.org/tktview?tn=23
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Added bison-locations option to scanner, fixing the missing
+        reentrant yylloc with flex-2.5.31.
+        [Michael Schloh <michael@schloh.com>]
+ 
+   Changes between 0.9.3 and 0.9.4 (15-Sep-2003 to 25-Sep-2003)
+ 
+     *) Change jitter option in file channel from flag to count.
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Add monitor option to file channel.
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+   Changes between 0.9.2 and 0.9.3 (30-Jun-2003 to 15-Sep-2003)
+ 
+     *) Make sure prefix channel does atomar downstream writes
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between 0.9.1 and 0.9.2 (11-Oct-2002 to 30-Jun-2003)
+   
+     *) Introduce "trunc=" option for file channel; keep support for
+        obsolete "append" option.
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Change default mode for file channel to "append".
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Fix array too small by one element bug in fd and file channels.
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Add jitter option to file channel.
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+   Changes between 0.9.0 and 0.9.1 (30-Jul-2002 to 11-Oct-2003)
+ 
+     *) Changed "filedescriptor" to "fs" in file descriptor channel
+        configuration.
+        [Thomas Lotterer <thomas@lotterer.net>]
+ 
+     *) Upgraded to GNU autoconf 2.54.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+     *) Simplify install/uninstall Makefile targets
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+     *) Fixed uname(3) usage in prefix channel.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+     *) Fixed memory leak in l2_util_vasprintf().
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+     *) Upgraded to latest OSSP sa.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 
+   Changes between *GENESIS* and 0.9.0 (30-Jul-2002 to 30-Jul-2002)
+ 
+     *) Initial release.
+        [Ralf S. Engelschall <rse@engelschall.com>]
+ 


ossp-pkg/l2/aclocal.m4 1.16 -> 1.17

--- aclocal.m4   2005/01/24 15:03:17     1.16
+++ aclocal.m4   2005/02/03 09:40:34     1.17
@@ -417,3 +417,114 @@
 fi
 ])
 
+dnl ##
+dnl ##  Check for C99 va_copy() implementation
+dnl ##  (and provide fallback implementation if neccessary)
+dnl ##
+dnl ##  configure.in:
+dnl ##    CHECK_VA_COPY
+dnl ##  foo.c:
+dnl ##    #include "config.h"
+dnl ##    [...]
+dnl ##    va_copy(d,s)
+dnl ##
+dnl ##  This check is rather complex: first because we really have to
+dnl ##  try various possible implementations in sequence and second, we
+dnl ##  cannot define a macro in config.h with parameters directly.
+dnl ##
+
+dnl #   test program for va_copy() implementation
+changequote(<<,>>)
+m4_define(__va_copy_test, <<[
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#define DO_VA_COPY(d, s) $1
+void test(char *str, ...)
+{
+    va_list ap, ap2;
+    int i;
+    va_start(ap, str);
+    DO_VA_COPY(ap2, ap);
+    for (i = 1; i <= 9; i++) {
+        int k = (int)va_arg(ap, int);
+        if (k != i)
+            abort();
+    }
+    DO_VA_COPY(ap, ap2);
+    for (i = 1; i <= 9; i++) {
+        int k = (int)va_arg(ap, int);
+        if (k != i)
+            abort();
+    }
+    va_end(ap);
+}
+int main(int argc, char *argv[])
+{
+    test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
+    exit(0);
+}
+]>>)
+changequote([,])
+
+dnl #   test driver for va_copy() implementation
+m4_define(__va_copy_check, [
+    AH_VERBATIM($1,
+[/* Predefined possible va_copy() implementation (id: $1) */
+#define __VA_COPY_USE_$1(d, s) $2])
+    if test ".$ac_cv_va_copy" = .; then
+        AC_TRY_RUN(__va_copy_test($2), [ac_cv_va_copy="$1"])
+    fi
+])
+
+dnl #   Autoconf check for va_copy() implementation checking
+AC_DEFUN(CHECK_VA_COPY,[
+  dnl #   provide Autoconf display check message
+  AC_MSG_CHECKING(for va_copy() function)
+  dnl #   check for various implementations in priorized sequence   
+  AC_CACHE_VAL(ac_cv_va_copy, [
+    ac_cv_va_copy=""
+    dnl #   1. check for standardized C99 macro
+    __va_copy_check(C99, [va_copy((d), (s))])
+    dnl #   2. check for alternative/deprecated GCC macro
+    __va_copy_check(GCM, [VA_COPY((d), (s))])
+    dnl #   3. check for internal GCC macro (high-level define)
+    __va_copy_check(GCH, [__va_copy((d), (s))])
+    dnl #   4. check for internal GCC macro (built-in function)
+    __va_copy_check(GCB, [__builtin_va_copy((d), (s))])
+    dnl #   5. check for assignment approach (assuming va_list is a struct)
+    __va_copy_check(ASS, [do { (d) = (s); } while (0)])
+    dnl #   6. check for assignment approach (assuming va_list is a pointer)
+    __va_copy_check(ASP, [do { *(d) = *(s); } while (0)])
+    dnl #   7. check for memory copying approach (assuming va_list is a struct)
+    __va_copy_check(CPS, [memcpy((void *)&(d), (void *)&(s)), sizeof((s))])
+    dnl #   8. check for memory copying approach (assuming va_list is a pointer)
+    __va_copy_check(CPP, [memcpy((void *)(d), (void *)(s)), sizeof(*(s))])
+    if test ".$ac_cv_va_copy" = .; then
+        AC_ERROR([no working implementation found])
+    fi
+  ])
+  dnl #   optionally activate the fallback implementation
+  if test ".$ac_cv_va_copy" = ".C99"; then
+      AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy() macro exists (and no fallback implementation is required)])
+  fi
+  dnl #   declare which fallback implementation to actually use
+  AC_DEFINE_UNQUOTED([__VA_COPY_USE], [__VA_COPY_USE_$ac_cv_va_copy],
+      [Define to id of used va_copy() implementation])
+  dnl #   provide activation hook for fallback implementation
+  AH_VERBATIM([__VA_COPY_ACTIVATION],
+[/* Optional va_copy() implementation activation */
+#ifndef HAVE_VA_COPY
+#define va_copy(d, s) __VA_COPY_USE(d, s)
+#endif
+])
+  dnl #   provide Autoconf display result message
+  if test ".$ac_cv_va_copy" = ".C99"; then
+      AC_MSG_RESULT([yes])
+  else
+      AC_MSG_RESULT([no (using fallback implementation)])
+  fi
+  m4_undefine([__va_copy_test])
+  m4_undefine([__va_copy_check])
+])
+


ossp-pkg/l2/configure.ac 1.28 -> 1.29

--- configure.ac 2005/01/24 15:03:17     1.28
+++ configure.ac 2005/02/03 09:40:34     1.29
@@ -46,8 +46,8 @@
 AC_CHECK_MAINTAINER
 AC_CONFIGURE_LIBTOOL
 
-AC_CHECK_BISON(BISON, 1.875, [1.[[8-9]][[0-9]]|1.[[8-9]][[0-9]][[0-9]]])
-AC_CHECK_FLEX(FLEX, 2.5.10, [2.5.1[[0-9]]|2.5.[[2-9]][[0-9]]|2.[[6-9]].*])
+AC_CHECK_BISON(BISON, 1.875d, [1.[[8-9]][[0-9]]|1.[[8-9]][[0-9]][[0-9]]]|[2.[[0-9]]])
+AC_CHECK_FLEX(FLEX, 2.5.31, [2.5.1[[0-9]]|2.5.[[2-9]][[0-9]]|2.[[6-9]].*])
 
 AC_CHECK_LIB(nsl, gethostname)
 if test ".`echo $LIBS | grep nsl`" = . ;then
@@ -59,6 +59,8 @@
 
 AC_CHECK_FUNCS(inet_aton inet_pton inet_ntoa inet_ntop snprintf vsnprintf setitimer)
 
+CHECK_VA_COPY
+
 case $PLATFORM in
     *-*-solaris2.[[6-8]]* )
         AC_DEFINE(HAVE_VSYSLOG_USVALIST, 1, [Define to 1 if vsyslog has underscored va_list])

CVSTrac 2.0.1