Brian Silverman | 01be000 | 2014-05-10 15:44:38 -0700 | [diff] [blame^] | 1 | #ifndef AOS_COMMON_UTIL_AOS_STRERROR_H_ |
| 2 | #define AOS_COMMON_UTIL_AOS_STRERROR_H_ |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "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. |
| 15 | char *aos_strerror(int error); |
| 16 | |
| 17 | #ifdef __cplusplus |
| 18 | } |
| 19 | #endif |
| 20 | |
| 21 | #endif // AOS_COMMON_UTIL_AOS_STRERROR_H_ |