[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reconciliation of libsnprintfv vs. autogen

From: Daniel Jacobowitz
Subject: Re: Reconciliation of libsnprintfv vs. autogen
Date: Sun, 25 Feb 2007 19:29:53 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

On Sun, Feb 25, 2007 at 12:46:05PM -0800, Bruce Korb wrote:
> Hi Daniel,
> I found a number of misuses of casts in the subversion sources.
> Attached are two difference files:   one vs. the libsnv source
> on subversion, the other against my variation in autogen.
> The primary difference (after application of the first patch)
> is that snprintfv.m4 and compat.h are wildly different.
> Since they are not particularly relevant to the gnulib port,
> I see little reason to reconcile them.
> Below are my comments about what I've done to the subversion
> repository.

Thanks.  Unfortunately you've backed two things I've done over the
last several days.

        * snprintfv/custom.c: #include (conditionally) runetype.h
        before wchar.h
        * snprintfv/format.c: ditto

That's handled in compat.h (and we still don't know where it comes
from :-).

        * snprintfv/mem.h (SNV_SCOPE): required for windows

That's from standalone libsnprintfv DLL support, which we're
obsoleting as we fold it into gnulib.  It doesn't work quite right
anyway, since none of the snprintfv interface functions are marked as
dllexport.  Marking some functions disables auto-export of all
functions and you end up with a library that doesn't offer snv_printf.

> #3 This code *IS* broken and must be fixed.  I left the comment in:
> > @@ -224,7 +228,7 @@ call_argtype_function (struct printf_inf
> >      }
> >  
> >  /* FIXME!!! && or || ???? */
> > -  if (!pinfo->dollar && !IS_MODIFIER (spec))
> > +  if (!pinfo->dollar || !IS_MODIFIER (spec))
> >      pinfo->argindex += n;
> >  
> >    return n;
> This is a really obtuse and nasty bug.  Without it you wind
> up with the wrong index and seg faulting in an incomprehensible
> way.  The fix is required.

I don't get it.  Is it fixed now or are both options wrong?  Can't
have it both ways.

 #define PRINTF_ERROR(pi, str) \
-        printf_error(pi, __FILE__, __LINE__, SNV_ASSERT_FMT, str);
+        printf_error(pi, __FILE__, __LINE__, SNV_ASSERT_FCN, str);

That's not defined anywhere.

../../libsnprintfv/snprintfv/printf.c: In function
../../libsnprintfv/snprintfv/printf.c:386: error: 'SNV_ASSERT_FCN'
undeclared (first use in this function)

Daniel Jacobowitz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]