This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
help - Cygwin, gcc, newlib and using printf to output unsigned long long int
- From: Eryk Furman <ekfcipher at yahoo dot com>
- To: newlib at sources dot redhat dot com
- Date: Wed, 9 Jun 2004 07:20:56 -0700 (PDT)
- Subject: help - Cygwin, gcc, newlib and using printf to output unsigned long long int
Hello all! Can any one answer this mystery? I am using cygwin, gcc, g++ to compile in a dos
window in WinXP pro. I am working with an existing GNU project that has a bunch of Makefiles. I
added a little code using ?unsigned long long int? right now I?m simply declaring a constant ull
and using printf to output it. Well it always gets shushed into a long. I have searched and
searched the net and read this and that about the printf in newlib not supporting this. The
kicker is when I create a file ?test.c? and do ?gcc test.c?
test.c
//////////////////////////////////////////////////////////
#include <stdio.h>
#include <string.h>
int putitout () {
unsigned long long int test = 9888994872930475ull;
printf("%llu", test);
return 0;
}
int main () {
putitout();
return 0;
}
////////////////////////////////////////////////////////////////
and run a.exe it prints perfectly. So my thinking is that somewhere in the makefiles of the
project the ability for printf to format long long is turned off. Does this make sense. What
command would do this? What should I look for? Does any one have any thoughts on this?
I am completely lost here.
Any and all help is much apprecieated.
Thank you all in advance.
-Eryk
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/