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 4052

Summary: [Patch] [stdlib] Add SDL_log10
Product: SDL Reporter: Ethan Lee <flibitijibibo>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: icculus, sezeroz
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: Adds SDL_log10 and SDL_log10f functions
add SDL_log10 and SDL_log10f to include and dynapi

Description Ethan Lee 2018-01-17 16:58:54 UTC
Created attachment 3145 [details]
Adds SDL_log10 and SDL_log10f functions

Attached is a patch that attempts to add a log10 function to SDL's stdlib. Included is the uClibc equivalent for platforms that do not have log10.

While this is mainly a stdlib improvement I file under 'build' because A: there isn't a stdlib section, and B: Most of what hasn't been tested is each individual platform's build with the new stuff added.

I know for sure that the Xcode/Android projects won't build, but everything else _should_ be okay. That said, I only tested Linux/macOS with ./configure, so testing of all the other targets would be much appreciated!
Comment 1 Sam Lantinga 2018-02-07 23:02:32 UTC
This is confirmed building on Mac OS X, Linux, Android, iOS, Win32, Windows UWP, and Windows Phone.
https://hg.libsdl.org/SDL/rev/c3fc99758ad2

Thanks!
Comment 2 Ozkan Sezer 2018-02-08 14:11:12 UTC
Created attachment 3159 [details]
add SDL_log10 and SDL_log10f to include and dynapi

The new procedures are missing in SDL_stdinc.h and dynapi:
The attached patch does that.
Comment 3 Ethan Lee 2018-02-08 19:53:40 UTC
Definitely my mistake! Reopening this so Sam/Ryan see it...
Comment 4 Ryan C. Gordon 2018-02-08 20:53:32 UTC
This is now https://hg.libsdl.org/SDL/rev/713fd3ac3c9b, thanks!

--ryan.