LWN.net Logo

A turning point for GNU libc

A turning point for GNU libc

Posted Mar 29, 2012 10:37 UTC (Thu) by Richard_J_Neill (subscriber, #23093)
In reply to: A turning point for GNU libc by slashdot
Parent article: A turning point for GNU libc

D'oh! You're quite right about atoi(). I meant strtol(), but wasn't thinking straight. strtol() allows you to optionally specify the base=10, but then won't permit 0x... for hexadecimal.

I agree that we can't change it right away. That's why I suggest adding a new prefix, "0o" to be used in the very rare case where the programmer deliberately intends to use octal. That wouldn't break anything, and over perhaps 5 years, people could migrate.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds