PARA_ERROR(NO_AFHI, "audio format handler info required"), \
PARA_ERROR(AFT_SYNTAX, "audio file table syntax error"), \
PARA_ERROR(HASH_MISMATCH, "hash mismatch, consider re-add"), \
+ PARA_ERROR(NO_MATCH, "no matches"), \
#define USER_LIST_ERRORS \
/** Set the osl error bit for the given number. */
#define OSL_ERRNO_TO_PARA_ERROR(num) ((num) | (1 << OSL_ERROR_BIT))
+
+static const char *weak_osl_strerror(int) __attribute__ ((weakref("osl_strerror")));
/**
* Paraslash's version of strerror(3).
*
_static_inline_ const char *para_strerror(int num)
{
assert(num > 0);
-#ifdef _OSL_H
- if (IS_OSL_ERROR(num))
- return osl_strerror(num & ~(1U << OSL_ERROR_BIT));
-#endif
+ if (IS_OSL_ERROR(num)) {
+ assert(weak_osl_strerror);
+ return weak_osl_strerror(num & ~(1U << OSL_ERROR_BIT));
+ }
if (IS_SYSTEM_ERROR(num))
return strerror(num & ~(1U << SYSTEM_ERROR_BIT));
return para_errlist[ERRNUM_TO_SS(num)][ERRNUM_TO_INDEX(num)];