All of lore.kernel.org
 help / color / mirror / Atom feed
From: hpa@zytor.com (H. Peter Anvin)
To: linux-kernel@vger.kernel.org
Subject: Re: PATCH: stdint constants
Date: Thu, 4 Nov 2004 17:45:58 +0000 (UTC)	[thread overview]
Message-ID: <cmdpsm$45o$1@terminus.zytor.com> (raw)
In-Reply-To: OF1C112AC2.560EA5F6-ONC1256F41.0049C0DE@telemotive.de

Followup to:  <OF1C112AC2.560EA5F6-ONC1256F41.0049C0DE@telemotive.de>
By author:    roman.fietze@telemotive.de
In newsgroup: linux.dev.kernel
>
> Hello,
> 
> First of all: sorry for using Notes MUA, but cannot route to kernel.org 
> due to NJABL.
> 
> Allthough many books recommend using the types uint8_t to uint64_t as
> well as their signed counterparts, I could not find the MIX/MAX values
> for those types in any kernel include file.
> 
> Tested on a 2.4 ARM/PPC/I386 kernel with gcc 3.0.4/3.2.2/3.3.2. Not
> tested on any 64 bit architecture.
> 
> Any comments to this patch?
> 

Yes.  Long long is a ISO C99 type guaranteed to be at least 64 bits.
Thus, 

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

is wrong; it's in fact actively harmful.

Furthermore, this should only be used by the kernel, since this comes
from <stdint.h> in userspace.

<stdint.h> really should be a compiler-provided header file.  Sigh.

	-hpa

      reply	other threads:[~2004-11-04 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03 13:30 PATCH: stdint constants roman.fietze
2004-11-04 17:45 ` H. Peter Anvin [this message]

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='cmdpsm$45o$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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.