X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: mwoehlke Subject: Re: Fw: GCC - 64bit long long type, support in lib Date: Wed, 09 Aug 2006 10:42:07 -0500 Lines: 37 Message-ID: References: <019701c6bb49$c9b225a0$26e0110a AT FRED4> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0 In-Reply-To: <019701c6bb49$c9b225a0$26e0110a@FRED4> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Note: not all of us like Asian food (http://cygwin.com/acronyms/#TOFU). Also, http://cygwin.com/acronyms/#PCYMTNQREAIYR. 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"); > > [snip] > > 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. ~$ cat bar.c int main() { long long foo = 0x1100000000000022LL; printf("foo = %lld (0x%016llx)\n",foo,foo); } ~$ gcc -o bar bar.c ~$ ./bar foo = 1224979098644774946 (0x1100000000000022) ~$ cat > bar.out WFM, when I use the *correct* modifier. 'L' applies to floating-point; you want 'll'. Alas, this doesn't seem to be listed in 'man 3 printf'; looks like that should be fixed. (Yes, I know, http://cygwin.com/acronyms/#SHTDI... maybe I will, later. Alternatively, can we use the Linux manpage?) -- Matthew This is not the list you're looking for. -- Perversion of Obi Wan -- 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/