This function exists on OS X and allows you to pass custom local to the function. setlocale is not thread-safe, and passing locale as parameter is.
If there is no equivalent, any way of locale-independent printf, or printf just for doubles (%g) will be ok.