From 206473437f7ef62fe9a5077a4f256f2c396ed2e1 Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Mon, 13 Oct 2008 22:47:58 +0000 Subject: [PATCH] Fix MinGW-Bug [2160227]: Eliminate conflicting declarations and implementations of scalb(). --- winsup/mingw/ChangeLog | 9 +++++++++ winsup/mingw/include/math.h | 7 +++++++ winsup/mingw/moldname.def.in | 5 ++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index beb934b18..aa09e8f2f 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,12 @@ +2008-10-13 Keith Marshall + + Fix MinGW-Bug [2160227] + Eliminate conflicting declarations and implementations of scalb(). + + * moldname.def.in (scalb): Comment out of EXPORTS list. + * include/math.h (scalb): Comment out OLDNAMES prototype; it conflicts + with GCC's built-in declaration. + 2008-10-12 Christopher Faylor * Makefile.in: Use a different method to invoke gcc in a cygwin-hosted diff --git a/winsup/mingw/include/math.h b/winsup/mingw/include/math.h index abe899e4a..0577d0cc2 100644 --- a/winsup/mingw/include/math.h +++ b/winsup/mingw/include/math.h @@ -259,7 +259,14 @@ _CRTIMP double __cdecl y1 (double); _CRTIMP double __cdecl yn (int, double); _CRTIMP double __cdecl chgsign (double); +/* + * scalb() is a GCC built-in. + * Exclude this _scalb() stub; the semantics are incompatible + * with the built-in implementation. + * _CRTIMP double __cdecl scalb (double, long); + * + */ _CRTIMP int __cdecl finite (double); _CRTIMP int __cdecl fpclass (double); diff --git a/winsup/mingw/moldname.def.in b/winsup/mingw/moldname.def.in index 9480f6d6d..b8bae6bb0 100644 --- a/winsup/mingw/moldname.def.in +++ b/winsup/mingw/moldname.def.in @@ -141,7 +141,10 @@ y0 y1 yn chgsign -scalb +; omit scalb... +; it would conflict with the GCC built-in, which exhibits +; semantics differing from the MSVCRT implementation. +;scalb finite fpclass ; C99 functions