9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] atol() bug
Date: Mon, 11 Mar 2013 19:55:53 -0400	[thread overview]
Message-ID: <71d5bd1d0ba63c9e3643e932561e1a69@ladd.quanstro.net> (raw)
In-Reply-To: <20130311225516.2EF5CB82A@mail.bitblocks.com>

On Mon Mar 11 18:56:04 EDT 2013, bakul@bitblocks.com wrote:
> On Mon, 11 Mar 2013 15:44:05 PDT Steven Stallion <sstallion@gmail.com> wrote:
> > from atof(2):
> >
> >      BUGS
> >           Atoi, atol, and atoll accept octal and hexadecimal numbers
> >           in the style of C, contrary to the ANSI specification.
>
> This BUG is obviously very easy to fix but it hasn't been....
> Any good reason for this or just laziness?  Anyway, more cruft
> to remember (and debug when porting software).

there is a deep-seated assumption on the system that strtou?ll? accept
hex and octal.  the fact that it's in the BUG section rather than fixed
means there are good reasons for not fixing it.

if you were to make this change, i would be surprised if you could
boot your kernel.

- erik



  reply	other threads:[~2013-03-11 23:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 22:09 Bakul Shah
2013-03-11 22:44 ` Steven Stallion
2013-03-11 22:55   ` Bakul Shah
2013-03-11 23:55     ` erik quanstrom [this message]
2013-03-12  0:25       ` Kurt H Maier
2013-03-12  0:40       ` Bakul Shah
2013-03-12 21:05         ` a

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=71d5bd1d0ba63c9e3643e932561e1a69@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).