bug-coreutils
[Top][All Lists]
Advanced

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

Re: printf failure on HP/UX 10.20 with 6.9.92


From: Jim Meyering
Subject: Re: printf failure on HP/UX 10.20 with 6.9.92
Date: Thu, 31 Jan 2008 20:03:29 +0100

Peter Fales <address@hidden> wrote:
> I'm trying to port coreutils-6.9.92 to HP/UX 10.20 and getting a test
> failure...
>
> With the command
>
>       printf  '1 %*sy\n' -3 x
>
> the expected result (and the result from 6.8+) is:
>
>       1 x  y
>
> But with 6.9.92, I'm getting:
>
>       1   xy
>
> Any ideas where to look?

Maybe that system has a *printf function that
misinterprets a negative field width?
It's suspicious that your result is what this prints:
(i.e., same command but using a width of 3, rather than -3)

        printf  '1 %*sy\n' 3 x

Just in case something changed between 6.9.92 and 6.10,
it'd be better if you would test the latter stable release.

To figure out which function is at fault, the easiest might
be to use a debugger.  Set breakpoints at xprintf,
rpl_vfprintf, and vfprintf for starters.  From there,
single step until you hit a function with no symbols
(then maybe blame HP's C library), or until you see that
some of the replacement machinery from gnulib is misbehaving.

Just knowing whether you're using the replacement vfprintf
function would be nice.  Here's what I see on a system where
rpl_vfprintf is used:

  $ grep VFPRINT config.status
  S["GNULIB_VFPRINTF_POSIX"]="1"
  S["REPLACE_VFPRINTF"]="1"




reply via email to

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