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 - [Patch] [stdlib] Add SDL_log10
Summary: [Patch] [stdlib] Add SDL_log10
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-17 16:58 UTC by Ethan Lee
Modified: 2018-02-08 20:53 UTC (History)
2 users (show)

See Also:


Attachments
Adds SDL_log10 and SDL_log10f functions (12.54 KB, patch)
2018-01-17 16:58 UTC, Ethan Lee
Details | Diff
add SDL_log10 and SDL_log10f to include and dynapi (1.80 KB, patch)
2018-02-08 14:11 UTC, Ozkan Sezer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.