OSSP CVS Repository

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

Check-in Number: 4498
Date: 2004-Apr-05 16:44:21 (local)
2004-Apr-05 14:44:21 (UTC)
User:rse
Branch:
Comment: flush all my pending changes for release of 1.0.4
Tickets:
Inspections:
Files:
ossp-pkg/ex/ChangeLog      1.10 -> 1.11     9 inserted, 0 deleted
ossp-pkg/ex/README      1.13 -> 1.14     1 inserted, 1 deleted
ossp-pkg/ex/VERSION      1.7 -> 1.8     1 inserted, 1 deleted
ossp-pkg/ex/aclocal.m4      1.5 -> 1.6     109 inserted, 0 deleted
ossp-pkg/ex/configure.ac      1.8 -> 1.9     1 inserted, 0 deleted
ossp-pkg/ex/devtool.conf      1.11 -> 1.12     2 inserted, 2 deleted
ossp-pkg/ex/ts.c      1.6 -> 1.7     4 inserted, 4 deleted
ossp-pkg/ex/ts.h      1.4 -> 1.5     3 inserted, 3 deleted

ossp-pkg/ex/ChangeLog 1.10 -> 1.11

--- ChangeLog    2004/04/03 11:52:47     1.10
+++ ChangeLog    2004/04/05 14:44:21     1.11
@@ -11,6 +11,15 @@
 
   This is the list of all changes to the OSSP ex source tree.
 
+  Changes between 1.0.3 and 1.0.4 (03-Apr-2004 to 05-Apr-2004)
+
+   *) Added Autoconf check for va_copy() and use this in 
+      the test suite sub-library in order to fix it.
+      [Ralf S. Engelschall]
+
+   *) Upgrade build environment to GNU libtool 1.5.4
+      [Ralf S. Engelschall]
+
   Changes between 1.0.2 and 1.0.3 (30-Jan-2003 to 03-Apr-2004)
 
    *) Upgrade build environment to GNU autoconf 2.59 and


ossp-pkg/ex/README 1.13 -> 1.14

--- README       2004/04/03 11:52:47     1.13
+++ README       2004/04/05 14:44:21     1.14
@@ -5,7 +5,7 @@
   |_|_|_|  \___/|____/____/|_|     \___/_/\_\
 
   OSSP ex - Exception Handling
-  Version 1.0.3 (03-Apr-2004)
+  Version 1.0.4 (05-Apr-2004)
 
   ABSTRACT
 


ossp-pkg/ex/VERSION 1.7 -> 1.8

--- VERSION      2004/04/03 11:52:47     1.7
+++ VERSION      2004/04/05 14:44:21     1.8
@@ -2,5 +2,5 @@
   VERSION -- Version Information for OSSP ex (syntax: Text)
   [automatically generated and maintained by GNU shtool]
 
-  This is OSSP ex, Version 1.0.3 (03-Apr-2004)
+  This is OSSP ex, Version 1.0.4 (05-Apr-2004)
 


ossp-pkg/ex/aclocal.m4 1.5 -> 1.6

--- aclocal.m4   2004/03/25 19:01:42     1.5
+++ aclocal.m4   2004/04/05 14:44:21     1.6
@@ -115,3 +115,112 @@
 fi
 ])
 
+dnl ##
+dnl ##  Check for C99 va_copy() implementation
+dnl ##  (and provide fallback implementation if neccessary)
+dnl ##
+dnl ##  configure.in:
+dnl ##    AC_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(AC_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
+])
+


ossp-pkg/ex/configure.ac 1.8 -> 1.9

--- configure.ac 2004/03/25 19:01:42     1.8
+++ configure.ac 2004/04/05 14:44:21     1.9
@@ -40,6 +40,7 @@
 AC_CHECK_DEBUGGING
 sinclude(libtool.m4)
 AC_PROG_LIBTOOL
+AC_CHECK_VA_COPY
 
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([Makefile ex-config])


ossp-pkg/ex/devtool.conf 1.11 -> 1.12

--- devtool.conf 2004/03/19 14:55:46     1.11
+++ devtool.conf 2004/04/05 14:44:21     1.12
@@ -4,7 +4,7 @@
 
 %autogen
     @autogen shtool   1.6.2 "1.6.*" all
-    @autogen libtool  1.5.2 "1.5*"
+    @autogen libtool  1.5.4 "1.5*"
     @autogen autoconf 2.59  "2.5[4-9]*"
 
 %autoclean
@@ -40,7 +40,7 @@
     echo "+++ rolling"
     V=`./shtool version -l txt -d short VERSION`
     ./shtool tarball -o ex-${V}.tar.gz -d ex-${V} -u ossp -g ex \
-                     -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz,00TODO' -c 'gzip --best' .
+                     -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz,00TODO,*~' -c 'gzip --best' .
     ls -l ex-${V}.tar.gz
     echo "+++ testing"
     gunzip <ex-${V}.tar.gz | tar tvf -


ossp-pkg/ex/ts.c 1.6 -> 1.7

--- ts.c 2004/03/25 19:01:45     1.6
+++ ts.c 2004/04/05 14:44:21     1.7
@@ -1,11 +1,11 @@
 /*
-**  TS - OSSP Test Suite Library
+**  OSSP ts - Test Suite Library
 **  Copyright (c) 2001-2004 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2001-2004 The OSSP Project <http://www.ossp.org/>
 **  Copyright (c) 2001-2004 Cable & Wireless <http://www.cw.com/>
 **
-**  This file is part of OSSP TS, a small test suite library which
-**  can be found at http://www.ossp.org/pkg/ts/.
+**  This file is part of OSSP ts, a small test suite library which
+**  can be found at http://www.ossp.org/pkg/lib/ts/.
 **
 **  Permission to use, copy, modify, and distribute this software for
 **  any purpose with or without fee is hereby granted, provided that
@@ -206,7 +206,7 @@
 
     if (format == NULL)
         return NULL;
-    ap2 = ap;
+    va_copy(ap2, ap);
     if ((n = ts_suite_mvxprintf(NULL, 0, format, ap)) == -1)
         return NULL;
     if ((buffer = (char *)malloc(n+1)) == NULL)


ossp-pkg/ex/ts.h 1.4 -> 1.5

--- ts.h 2004/03/25 19:01:45     1.4
+++ ts.h 2004/04/05 14:44:21     1.5
@@ -1,11 +1,11 @@
 /*
-**  TS - OSSP Test Suite Library
+**  OSSP ts - Test Suite Library
 **  Copyright (c) 2001-2004 Ralf S. Engelschall <rse@engelschall.com>
 **  Copyright (c) 2001-2004 The OSSP Project <http://www.ossp.org/>
 **  Copyright (c) 2001-2004 Cable & Wireless <http://www.cw.com/>
 **
-**  This file is part of OSSP TS, a small test suite library which
-**  can be found at http://www.ossp.org/pkg/ts/.
+**  This file is part of OSSP ts, a small test suite library which
+**  can be found at http://www.ossp.org/pkg/lib/ts/.
 **
 **  Permission to use, copy, modify, and distribute this software for
 **  any purpose with or without fee is hereby granted, provided that

CVSTrac 2.0.1