From: craft@alacritech.com (Peter Craft)
Subject: printf/scanf: %Lx format broken?
5 Dec 1997 21:52:35 -0800
Message-ID: <348883B8.5D4F.cygnus.gnu-win32@alacritech.com>
Reply-To: craft@alacritech.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: gnu-win32@cygnus.com

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".
