This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: problem with strtoimax?


----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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]