blob: 2fd68181e08f022a62ca06c2fa14332d1f87f6b8 [file] [log] [blame]
Brian Silverman01be0002014-05-10 15:44:38 -07001#ifndef AOS_COMMON_UTIL_AOS_STRERROR_H_
2#define AOS_COMMON_UTIL_AOS_STRERROR_H_
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8// Thread-safe version of strerror(3) (except it may change errno).
9//
10// Necessary because strerror_r(3) is such a mess (which version you get is
11// determined at compile time by black magic related to feature macro
12// definitions, compiler flags, glibc version, and even whether you're using g++
13// or clang++) and strerror_l(3) might not work if you end up with the magic
14// LC_GLOBAL_LOCALE locale.
15char *aos_strerror(int error);
16
17#ifdef __cplusplus
18}
19#endif
20
21#endif // AOS_COMMON_UTIL_AOS_STRERROR_H_