public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: hpa@zytor.com (H. Peter Anvin)
To: linux-kernel@vger.kernel.org
Subject: Re: printk and long long
Date: Wed, 11 Feb 2004 19:41:15 +0000 (UTC)	[thread overview]
Message-ID: <c0e0gr$mcv$1@terminus.zytor.com> (raw)
In-Reply-To: Pine.LNX.4.44.0402111655170.17933-100000@gaia.cela.pl

Followup to:  <Pine.LNX.4.44.0402111655170.17933-100000@gaia.cela.pl>
By author:    Maciej Zenczykowski <maze@cela.pl>
In newsgroup: linux.dev.kernel
>
> On Wed, 11 Feb 2004, vda wrote:
> 
> > The character L specifying that a following e, E, f, g, or G
> > conversion corresponds to a long double argument, or a following
> > d, i, o, u, x, or X conversion corresponds to a long long argument.
> > Note that long long is not specified in ANSI C and therefore
> > not portable to all architectures.
> 
> [ personally I'd say screw the un-portable architectures ;) ]
> Long long is here to stay.

long long is C99, so it's *definitely* here to say.  The conversion specifier
is "ll" not "L", however.

> Besides if a linux architecture utilises long long in the kernel and 
> doesn't support it in printf via %lld then it's horked.
> printf/libc should be fixed instead.
> Maybe that's the problem - the libc support fragment in the kernel tree is 
> not up to date on that architecture - maybe the fixes should applied there 
> instead - instead of trying to work around the problem, fix the cause.

Indeed.  Feel free to steal the code from klibc :)

	-hpa
-- 
PGP public key available - finger hpa@zytor.com
Key fingerprint: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
Just Say No to Morden * The Shadows were defeated -- Babylon 5 is renewed!!

  reply	other threads:[~2004-02-11 19:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-11 12:49 printk and long long sting sting
2004-02-11 13:35 ` wdebruij
2004-02-11 13:48   ` Maciej Zenczykowski
2004-02-11 14:04     ` vda
2004-02-11 15:58       ` Maciej Zenczykowski
2004-02-11 19:41         ` H. Peter Anvin [this message]
2004-02-11 20:32           ` Måns Rullgård
2004-02-11 21:46             ` Chris Friesen
2004-02-11 22:38               ` Timothy Miller
2004-02-11 22:23             ` Andreas Schwab
2004-02-11 23:11               ` Måns Rullgård
2004-02-11 23:53                 ` H. Peter Anvin
2004-02-11 16:59       ` Dick Streefland
2004-02-11 14:03   ` Måns Rullgård
2004-02-11 14:15     ` wdebruij
2004-02-11 15:23   ` Richard B. Johnson
2004-02-13  0:26     ` Peter Chubb
  -- strict thread matches above, loose matches on Subject: below --
2004-02-11 13:54 Bart Hartgers
2004-02-11 14:04 ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-11 14:13 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='c0e0gr$mcv$1@terminus.zytor.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox