X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Victor Paesa Subject: Re: llrint implementation in Cygwin Date: Sat, 27 Oct 2007 10:10:41 +0000 (UTC) Lines: 55 Message-ID: References: <46F6C151 DOT 3070301 AT computer DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes 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 Hi, Tim Prince computer.org> writes: > > Diego Biurrun wrote: > > Hi! > > > > I have noticed that Cygwin does not implement llrint. However, llrint > > is part of C99 and not having it available makes some applications (for > > example MPlayer and FFmpeg) fail to compile. > > > > Are there any plans to implement llrint (in the near future)? > > > > Perhaps if you would submit a patch to newlib, something may happen. > It's not difficult to back-port stand-alone from recent gcc if you don't > want to wait for cygwin to include a gcc upgrade, about which there have > been plenty of threads here. You could include it in a > of your choice. > http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01970.html > http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01973.html > shows that it has been available for 2.5 years. I downloaded the gcc-3.4.4 Cygwin source package, and I found that (apparently) gcc 3.4.4 already had llrint built-in: $ fgrep -ri llrint gcc-3.4.4 gcc-3.4.4/gcc/builtins.c: CASE_MATHFN (BUILT_IN_LLRINT) gcc-3.4.4/gcc/builtins.def:DEF_C99_BUILTIN (BUILT_IN_LLRINT, "llrint", BT_FN_LONGLONG_DOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO) [more lines matched] Then I tried to compile a test: $ cat llrint_test.c #include int main(int argc, char **argv) { long long ll; ll = __builtin_llrint(2.34); } But the compilation failed: $ gcc llrint_test.c /cygdrive/c/DOCUME~1/Inma/LOCALS~1/Temp/ccyDtvBd.o:llrint_test.c:(.text+0x34): undefined reference to `_llrint' collect2: ld returned 1 exit status Are built-ins disabled in gcc-3.4.4 for Cygwin? Could that be fixed by adding/removing flags to the configure line used to build gcc 3.4.4 in Cygwin? Thanks in advance for your answers, Victor Paesa -- 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/