Mail Archives: cygwin/2006/08/08/23:00:36
sorry if I confused readers.
the source gcc downloaded I have is gcc-3.4.4
it seems the library is part of the gcc with cygwin.
and the library I'm referring to is in the libiberty sub-directory.
a config.h file does get generated (configured) in that directory.
The "newlib" you are referring to, I don't see anything referred to as
"newlib" in the cygwin setup???
I understand that 64bit int is not a native word size (for windows & cygwin
I guess - this is not windows 64 bit version)
and comprises of 2 x 32bit ints.
if you do sizeof(long long) you will get 8 for gcc(cygwin)
so I would think when code does a call with a long long arguument, 2 x 32bit
ints get pushed on the stack,
however because _doprint is then only reading off 32bit longs for such a
arg, the position of the args get
incorrect............
----- Original Message -----
From: "Tim Prince" <timothyprince AT sbcglobal DOT net>
To: <cygwin AT cygwin DOT com>
Sent: Wednesday, August 09, 2006 12:10 PM
Subject: Re: Fw: GCC - 64bit long long type, support in lib
> fred wrote:
> >
> >
> > The gcc supports 64bit int it seems, but the library as downloaded does
not,
> > for example try
> >
> > long long ldec = 0x11000000000LL;
> > printf("%s: 0x%Lx,%Ld; %s\n","test",ldec,ldec,"test2");
> >
> > seems the library should support it, look in
> > usr\src\gcc-3.4.4\libiberty\_doprnt.c
> > #if defined(__GNUC__) || defined(HAVE_LONG_LONG)
> > PRINT_TYPE(long long);
> > #else
> > PRINT_TYPE(long); /* Fake it and hope for the best. */
> > #endif
> >
> >
> >
> > anyway, i've not successfully recompiled gcc library for this, and
didn't
> > find any FAQ about it.
> > the above code still crashes/prints wrong value.
> >
> > I think its a problem with configure, I see in configure where test code
is
> > generated for #define HAVE_LONG_LONG 1
> > but what configure file is supposed to get then set with this
> > flag....?config.h ? hmm not happening.
> >
> >
> Maybe others will not find your post as confusing as I did. I agree
> that 64-bit gcc supports 64-bit int, but there is no 64-bit gcc for
> cygwin. long long, on 32-bit platforms like cygwin, is made up from 2
> 32-bit integers. printf(), I believe, is part of newlib. "the library"
> isn't very descriptive, but I would have thought, in this context, it
> might refer to the libraries built by gcc, which doesn't appear to be
> what you mean, even though you say "gcc library." newlib doesn't
> pretend to have as much C99 support as GNU libc.
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -