X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/70ad1dc8a19d6edd9b97aa81f32cfd65758ae97d..refs/heads/master:/libdarwin/h/string.h?ds=sidebyside diff --git a/libdarwin/h/string.h b/libdarwin/h/string.h index 8d16ac1..b4db82e 100644 --- a/libdarwin/h/string.h +++ b/libdarwin/h/string.h @@ -32,6 +32,10 @@ #include #include +#if DARWIN_TAPI +#include "tapi.h" +#endif + __BEGIN_DECLS; /*! @@ -89,10 +93,25 @@ typedef os_flag_t os_flagset_t[OS_FLAGSET_COUNT]; * is given, this is equivalent to a call to strerror(3). */ DARWIN_API_AVAILABLE_20170407 -OS_EXPORT OS_WARN_RESULT OS_PURE +OS_EXPORT OS_COLD OS_WARN_RESULT OS_PURE const char * strerror_np(int code); +/*! + * @function strexit_np + * Returns a human-readable string for the given sysexits(3) code. + * + * @param code + * The exit code for which to obtain the string. + * + * @result + * A human-readable string describing the exit condition. + */ +DARWIN_API_AVAILABLE_20190830 +OS_EXPORT OS_COLD OS_WARN_RESULT OS_PURE +const char * +strexit_np(int code); + /*! * @function symerror_np * Returns the token name of the given {@link errno_t} or POSIX error @@ -106,7 +125,7 @@ strerror_np(int code); * string "EPERM" is returned. */ DARWIN_API_AVAILABLE_20170407 -OS_EXPORT OS_WARN_RESULT OS_PURE +OS_EXPORT OS_COLD OS_WARN_RESULT OS_PURE const char * symerror_np(int code); @@ -124,7 +143,7 @@ symerror_np(int code); * exit code. */ DARWIN_API_AVAILABLE_20170407 -OS_EXPORT OS_WARN_RESULT OS_PURE +OS_EXPORT OS_COLD OS_WARN_RESULT OS_PURE const char * symexit_np(int code);