We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3811

Summary: change HAVE_COPYSIGN to HAVE__COPYSIGN in SDL_config_windows.h
Product: SDL Reporter: Ozkan Sezer <sezeroz>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   

Description Ozkan Sezer 2017-09-10 17:28:11 UTC
The patch below changes HAVE_COPYSIGN macro in SDL_config_windows.h to
HAVE__COPYSIGN, so that _copysign() can be used in SDL_stdlib.h which
is available in many more windows-targeting toolchains such as MinGW,
MSVC >= 6, etc, and not just  MSVC >= 2013. SDL_stdlib.c already has a
specific check for HAVE__COPYSIGN, so I believe this is reasonable.

diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -142,12 +142,12 @@
 #define HAVE_SQRTF 1
 #define HAVE_TAN 1
 #define HAVE_TANF 1
+#define HAVE__COPYSIGN 1
 #if defined(_MSC_VER)
 /* These functions were added with the VC++ 2013 C runtime library */
 #if _MSC_VER >= 1800
 #define HAVE_STRTOLL 1
 #define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
 #define HAVE_SCALBN 1
 #endif
 /* This function is available with at least the VC++ 2008 C runtime library */
Comment 1 Sam Lantinga 2017-09-10 17:30:44 UTC
Added, thanks!
https://hg.libsdl.org/SDL/rev/998f992b03ed