Index: ossp-pkg/l2/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/l2/ChangeLog,v rcsdiff -q -kk '-r1.25' '-r1.26' -u '/v/ossp/cvs/ossp-pkg/l2/ChangeLog,v' 2>/dev/null --- ChangeLog 2005/02/03 09:46:58 1.25 +++ ChangeLog 2005/02/03 09:48:52 1.26 @@ -11,6 +11,10 @@ Changes between 0.9.9 and 0.9.10 (01-Feb-2005 to 03-Feb-2005) + *) Synchronize l2_ut_format.[ch] with OSSP cfg and especially + now use va_copy for va_list copying for better portability. + [Ralf S. Engelschall ] + *) Resolve trunc symbol conflict; make sure configure checks for isnan and isinf and l2_ut_format picks up the results' [Thomas Lotterer ] Index: ossp-pkg/l2/l2_ut_format.c RCS File: /v/ossp/cvs/ossp-pkg/l2/l2_ut_format.c,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/l2/l2_ut_format.c,v' 2>/dev/null --- l2_ut_format.c 2005/02/03 09:45:37 1.11 +++ l2_ut_format.c 2005/02/03 09:48:52 1.12 @@ -1,8 +1,8 @@ /* ** OSSP l2 - Flexible Logging -** Copyright (c) 2001-2004 Cable & Wireless -** Copyright (c) 2001-2004 The OSSP Project -** Copyright (c) 2001-2004 Ralf S. Engelschall +** Copyright (c) 2001-2005 Cable & Wireless +** Copyright (c) 2001-2005 The OSSP Project +** Copyright (c) 2001-2005 Ralf S. Engelschall ** ** This file is part of OSSP l2, a flexible logging library which ** can be found at http://www.ossp.org/pkg/lib/l2/. @@ -40,7 +40,7 @@ * Especially any Apache and network specific kludges were removed again * and instead the formatting engine now can be extended by the caller * on-the-fly. It was then finally adjusted to be stand-alone for use - * inside OSSP l2. + * inside OSSP. */ /* @@ -96,7 +96,6 @@ #include #include #include -#include #include "l2_config.h" #include "l2_ut_format.h" @@ -379,7 +378,7 @@ #define PAD(width, len, ch) \ do { \ INS_CHAR(ch, sp, bep, cc); \ - width-- ; \ + width--; \ } while (width > len) /* @@ -645,7 +644,7 @@ register char *sp; register char *bep; register int cc = 0; - register int i; + register unsigned int i; char *s = NULL; char *q; @@ -1153,12 +1152,12 @@ char *s; int rv; - apbak = ap; + va_copy(apbak, ap); if ((rv = l2_util_vsprintf(NULL, -1, fmt, ap)) == -1) return NULL; if ((s = malloc(rv+1)) == NULL) return NULL; - ap = apbak; + va_copy(ap, apbak); if ((rv = l2_util_vsprintf(s, rv+1, fmt, ap)) == -1) { free(s); return NULL;