| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | RE: problem with strtoimax? |
| Date: | Wed, 6 Jul 2005 10:14:34 +0100 |
| MIME-Version: | 1.0 |
| In-Reply-To: | <070520052151.23268.42CB00CE0002CAE700005AE422007348300A050E040D0C079D0A@comcast.net> |
| Message-ID: | <SERRANOBHsbNTu04Vwn000003c9@SERRANO.CAM.ARTIMI.COM> |
----Original Message----
>From: Eric Blake
>Sent: 05 July 2005 22:51
>>> $ cat > foo.c
>>> #include <stdio.h>
>>> #include <inttypes.h>
>>>
>>> int main(int argc, char**argv)
>>> {
>>> printf("%llx\n", strtoll("1", NULL, 10));
>>> return 0;
>>> }
>>> $ gcc -o foo foo.c
>>> $ ./foo
>>> a00000001
>>
>> This, I can confirm. PTC.
>>
>
> No patch necessary (PEBCAK). strtoimax is in inttypes.h, but strtoll
> is in stdlib.h. Compiling with -Wall would have shown my stupidity.
> (Hint - implicit prototypes return int, but strtoll really needs to return
> long long.)
echo >>~/.bashrc alias gcc=\'gcc -W -Wall\' # :)
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |