A couple of messages back I wrote:

  | But it is obvious that at least the NetBSD sh, bash, bosh, zsh,
  | and ksh93 have a builtin printf (the error messages differ...)

I should have included dash and yash in that list - their error messages
are very similar to what /usr/bin/printf on NetBSD prints (and the NetBSD sh,
which uses the same source code for its builtin printf), but when I looked
closer, I can see they are not actually the same - so those clearly have
a builtin printf as well (they behave the same way as bash, the NetBSD sh
and bosh).

It might be useful to know what the printf utility (the one
from the filesystem) outputs for
        /path/to/printf '%d\n' 0xffffc00000000000
on Solaris, AIX, HPUX, Linux, MacOS, and anything else
similar anyone can test that on.   If you get
        18446673704965373952
and no error message, then please try with more 0's appended
to actually force overflow to happen.

kre

ps: the FreeBSD sh may have its own builtin printf when running on FreeBSD,
but the version I have either seems not to have printf built in, or built
in the NetBSD printf (or happens to have something that acts identically).
I could check the sources, and the way I built it, but it isn't really 
important.

  • printf (the utility)... Robert Elz via austin-group-l at The Open Group
    • Re: printf (the... Robert Elz via austin-group-l at The Open Group
      • Re: printf ... Alan Coopersmith via austin-group-l at The Open Group
      • Re: printf ... Joerg Schilling via austin-group-l at The Open Group
        • Mantis ... Mark Brown via austin-group-l at The Open Group
          • Re:... Andrew Josey via austin-group-l at The Open Group
      • Re: printf ... Robert Elz via austin-group-l at The Open Group
        • Re: pri... Robert Elz via austin-group-l at The Open Group
        • Re: pri... Joerg Schilling via austin-group-l at The Open Group
    • Re: printf (the... Geoff Clare via austin-group-l at The Open Group
    • RE: printf (the... shwaresyst via austin-group-l at The Open Group

Reply via email to