delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/14/15:26:58

From: stefan DOT briesenick AT csc DOT deutsche-leasing DOT de (Stefan Briesenick)
Subject: Re: printf() in combination with long long
14 Jan 1999 15:26:58 -0800 :
Message-ID: <369DE237.A330EC49.cygnus.gnu-win32@csc.deutsche-leasing.de>
References: <3B4047E8AA18D211BBFA00A024B252C0087671 AT exchange DOT mmp DOT plzen-city DOT cz>
Reply-To: sbriesen AT gmx DOT de
Mime-Version: 1.0
To: Horak Daniel <horak AT mmp DOT plzen-city DOT cz>, cygwin <gnu-win32 AT cygnus DOT com>

Hello!

> > try this:
> >
> > #include <stdlib.h>
> >
> > int main(void)
> > {
> >    unsigned long long var1, var2, var2;
> >
> >    var1 = 12345;
> >    var2 = 54321;
> >    var3 = 98765;
> >
> >    printf("wrong: %Lu - %Lu - %Lu\n",var1,var2,var3);
> 
> I think, that here should be %lld or %q. I have tried the %lld and it works
> in printf.

hmm. On my Linux machine and with emx-os/2, its %Ld (signed long long) and
%Lu (unsigned long long). If I read the manpages right of our HP-UX
machine, it's the same.

cygwin knows %Lu and %Ld. And it works for the defined value range of
64-Bit. But: it has the stack-problem!

Ok, I'll try %lld and %llu. But then it's not compatible to my other
compilers... :-(

> But the newlib C library cannot "read" long long. There is no support in
> vsscanf and strtol. Is anybody working on this?

in emx there's _strtoll and _strtoull. Should be the same then (with
cygwin)...


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019