| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Date: | Thu, 6 Sep 2001 09:23:21 +0200 |
| From: | Corinna Vinschen <cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Scanf with a long long. |
| Message-ID: | <20010906092321.H18845@cygbert.vinschen.de> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <20010906005413 DOT A758 AT ping DOT be> |
| Mime-Version: | 1.0 |
| User-Agent: | Mutt/1.2.5i |
| In-Reply-To: | <20010906005413.A758@ping.be>; from Q@ping.be on Thu, Sep 06, 2001 at 12:54:13AM +0200 |
On Thu, Sep 06, 2001 at 12:54:13AM +0200, Kurt Roeckx wrote:
> I need use a 64 bit number, and int64_t is defined as a long
> long.
>
> The problem is that scanf doesn't like numbers bigger then
> 0xFFFFFFFF, and always returns that number in that case. printf
> works fine with them.
>
> An example is doing this:
>
> long long int i;
>
> sscanf("123456789", "%Lx", &i);
> printf("%llx\n%llx\n", i, i + 1);
>
> it will print:
>
> ffffffff
> 100000000
>
> This problem seems to be reported once before in 1997, but still
> doesn't seem to be fixed.
> I'm using cygwin 1.3.2 on win98.
It's a newlib problem. Nobody implemented strtoll or strtoull
so far. So scanf can't call them.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |