X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=error.h;h=830d0f8d186560522b93dd89d51065ee4d4119e2;hp=379d37326782f308ce6b7e576c25383ea1b7b8c7;hb=7c007561e7031f5e33b91a8baf51bb952693a2d0;hpb=1fd34762208566dfe2d2e07772e4af088f833a2b diff --git a/error.h b/error.h index 379d3732..830d0f8d 100644 --- a/error.h +++ b/error.h @@ -246,7 +246,6 @@ extern const char **para_errlist[]; #define MOOD_ERRORS \ PARA_ERROR(NO_MOOD, "no mood available"), \ - PARA_ERROR(DUMMY_ROW, "attempted to access blob dummy object"), \ #define MM_ERRORS \ @@ -261,6 +260,7 @@ extern const char **para_errlist[]; #define BLOB_ERRORS \ PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \ + PARA_ERROR(DUMMY_ROW, "attempted to access blob dummy object"), \ #define PLAYLIST_ERRORS \ @@ -279,6 +279,7 @@ extern const char **para_errlist[]; 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 \ @@ -395,6 +396,7 @@ extern const char **para_errlist[]; PARA_ERROR(SIZE_PREFIX, "bad size prefix"), \ PARA_ERROR(REGEX, "regular expression error"), \ PARA_ERROR(ARG_NOT_FOUND, "argument not found in arg vector"), \ + PARA_ERROR(BAD_LL, "invalid loglevel"), \ #define EXEC_ERRORS \ @@ -417,7 +419,6 @@ extern const char **para_errlist[]; PARA_ERROR(MP4ASC, "audio spec config error"), \ PARA_ERROR(AAC_AFH_INIT, "failed to init aac decoder"), \ PARA_ERROR(MP4V2, "mp4v2 library error"), \ - PARA_ERROR(NO_AUDIO_TRACK, "file contains no valid audio track"), \ #define AAC_COMMON_ERRORS \ PARA_ERROR(ESDS, "did not find esds atom"), \ @@ -578,6 +579,8 @@ extern const char **para_errlist[]; /** 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). * @@ -588,10 +591,10 @@ extern const char **para_errlist[]; _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)];