]> git.mxchange.org Git - simgear.git/commit
Thread-safe alternative to strerror()
authorFlorent Rougon <f.rougon@free.fr>
Sun, 8 May 2016 19:45:01 +0000 (21:45 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
commit7be3f4c53b5d872641568a16269c9914e8518db7
tree94c00df46f0b92e561bd50d8ce1a71a3933ddfd2
parentce358e2313a23002b546955e334db2a0bf507e7f
Thread-safe alternative to strerror()

Uses:
  - strerror_s() on Windows;
  - the GNU strerror_r() on non-Windows systems where _GNU_SOURCE is
    defined (which is currently the case when the GNU libstdc++ is used,
    even if one doesn't explicitely define _GNU_SOURCE, cf.
    <https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined>);
  - the XSI-compliant strerror_r() on other systems, as long as
    _POSIX_C_SOURCE >= 200112L (otherwise, the compilation will abort
    due to a #error preprocessor instruction).
simgear/misc/strutils.cxx
simgear/misc/strutils.hxx
simgear/misc/strutils_test.cxx