<p>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.</p>

<p>If there is no equivalent, any way of locale-independent printf, or printf just for doubles (%g) will be ok.</p>

You might try
```
uselocale
```
, which sets the thread locale (rather than the process locale) before calling
```
printf
```
.