Hello,

On Sunday 29 October 2006 14:43, [EMAIL PROTECTED] wrote:
> On Sun, Oct 29, 2006 at 02:51:12AM +0200, Samuel Thibault wrote:
> > Barry deFreese, le Sat 28 Oct 2006 20:48:17 -0400, a écrit :
> > > The %p one is even a bit of a question.  I believe %p is correct
> > > but I also dropped the 0x and maybe I shouldn't have?
> >
> > You shouldn't indeed.  Some tools may depend on being able to parse
> > this.
>
> The glibc version of printf automatically adds 0x (for non-zero
> values) when using %p. (i.e. it is equivalent to %#x.) Stesie's

Concerning glibc you're right.  However Linux's printk, which in turn 
uses vsnprintf from lib/vsnprintf.c, doesn't automatically prepend the 
`0x'.  Furthermore all users of `%p' format below linux/ in GNU Mach's 
source tree have (well, had) the `0x' prepended.

> version doesn't seem to follow that, if I'm reading the code
> correctly... An issue that should be fixed, IMHO.

I don't think it's a good idea to remove all the `0x' just to be 
compatible with glibc's vsnprintf function and breaking with Linux on 
the other hand, thus making it harder to pull in further source files 
from there.

Therefore I vote to not change this.

cheers,
  stesie


_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to