This is the mail archive of the cygwin@sourceware.cygnus.com 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]

printf/scanf: %Lx format broken?


Hi, 

It seems that the long long size modifier (L) is broken
in printf and scanf.  If I compile the following program:

#include <stdio.h>
#include <sys/types.h>

main(argc, argv)
	 int argc;
	 char **argv;
{
	long long 	foo;

	sscanf(argv[1], "%Lx", &foo);
	printf("foo %Lx\n", foo);
}

and run it on my NT system as follows I get:

==> ./foo 0x123456789
foo ffffffff

Whereas the same program on a Solaris system it gives me the proper:

==> ./a 0x123456789
foo 123456789

Am I missing something?  I have also tried %llx instead of %Lx
with the same results.

Thanks.

Pete
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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