lkml.org 
[lkml]   [2004]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 1/1] dm: fix printk warnings about whether %lu/%Lu is right for sector_t
Date
On Friday 08 October 2004 22:11, Anton Altaparmakov wrote:
> On Fri, 8 Oct 2004, Andrew Morton wrote:
> > blaisorblade_spam@yahoo.it wrote:


> Actually %Ld is completely wrong. I know in the kernel it makes no
> difference but people see it in the kernel and then go off an use it in
> userspace and it generates junk output on at least some architectures.
Well, gcc does not complain, and the problem is not "kernel is special" or "on
some arch it's different". It's an alias for "ll" for both gcc and glibc; I
checked, in fact, the version below of info pages for glibc:

This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library
Reference Manual', for Version 2.3.x of the GNU C Library.
(I guess the "last update" is botched).

> This is because %L means "long double (floating point)" not "long long
> integer" and when you stuff an integer into it it goes wrong (on some
> architectures)...
I think an all ones, or at least on i386.
> From the printf(3) man page:
Outdated.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.068 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site