Darwin and BSD have the printf_l/sprintf_l/vsprintf_l, etc., family of formatted output functions that include an explicit locale (which can be set to the "C" locale to force locale-independent output, such as you would require for portable text output files containing floating point values).
Windows also has the equivalent (same names but preceded by an underscore).
But I can't seem to find the equivalent for Linux/glibc. Is there an alternative? What is the equivalent or preferred way to generate locale-independent formatted output on Linux?