X-Spam-Check-By: sourceware.org X-YMail-OSG: 5pIKrZYVM1n6HmD34bAwyvjruw_Hcek73LaW8.P2RrqMIOnpR_ZJVbTg7Zr.BK5l2OvB5mPxQQ-- Message-ID: <46A8A7DB.3000100@aol.com> Date: Thu, 26 Jul 2007 06:55:39 -0700 From: Tim Prince Reply-To: tprince AT computer DOT org User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Cygwin Perl and -Duselongdouble References: <46A8939C DOT 340DF017 AT dessent DOT net> <11CF7C4D0D334F4EBC16B015D7CB1993 AT desktop2> In-Reply-To: <11CF7C4D0D334F4EBC16B015D7CB1993@desktop2> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 sisyphus1 AT optusnet DOT com DOT au wrote: > > ----- Original Message ----- From: "Brian Dessent" > To: > Sent: Thursday, July 26, 2007 10:29 PM > Subject: Re: Cygwin Perl and -Duselongdouble > Oh ... it's probably just ignorance on my part. > If I can successfully run 'gcc script.c' (where 'script.c' contains a > call to 'sqrtl') then I'm inclined to say that sqrtl is "available in > the C compiler" (or something like that). If your position is that availability as a built-in should suffice, you may have a long row to hoe. > > I gather from your response (and Corinna's) that there are also a couple > of things called 'newlib' and 'libc' that enter into the equation. gcc itself supports only built-in functions. There are plenty of posts in the archives concerning why cygwin doesn't use glibc rather than newlib. > > I find it all quite confusing. My MinGW version of math.h specifically > prototypes the "long double" version of a number of functions (ceill, > floorl, sqrtl, modfl, ...), yet I can't find any mention of those > functions in any of the gcc headers on Linux or Cygwin. mingw relies on Microsoft library support, where again there is no separate long double. You are free to add prototypes to your cygwin , but you must take the further step of actually supplying a function. It should not be difficult to make one for cygwin which satisfies your purposes, whatever they are. For example, you could build a function which uses the built-in, with its limitations. > /definitely Off Topic > If I call sqrtl on linux I have to link to -lm, on Cygwin I don't. Most compilers on linux also have a built-in sqrtl. If you set the right options in gcc, for example, you should be able to make a simple test which gets by with that. You may have to check for bugs in mathinline.h. Many distros do ugly things which can't be blamed on gcc or glibc maintainers. -- 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/