diff options
author | Max Horn | 2009-11-29 21:56:10 +0000 |
---|---|---|
committer | Max Horn | 2009-11-29 21:56:10 +0000 |
commit | 5b562407c1373913b244991e0580f9c54fd013d9 (patch) | |
tree | d81317643391a83c57cc902b9c25dc72273592ab | |
parent | 798f3ab7959fca35dd52c5715dc68da68fed58c0 (diff) | |
download | scummvm-rg350-5b562407c1373913b244991e0580f9c54fd013d9.tar.gz scummvm-rg350-5b562407c1373913b244991e0580f9c54fd013d9.tar.bz2 scummvm-rg350-5b562407c1373913b244991e0580f9c54fd013d9.zip |
COMMON: Replace NORETURN by NORETURN_PRE & NORETURN_POST
svn-id: r46205
-rw-r--r-- | common/scummsys.h | 14 | ||||
-rw-r--r-- | common/textconsole.cpp | 2 | ||||
-rw-r--r-- | common/textconsole.h | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/common/scummsys.h b/common/scummsys.h index 00d76916aa..aa801afd03 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -187,7 +187,7 @@ #ifndef __GNUC__ #define FORCEINLINE __forceinline - #define NORETURN __declspec(noreturn) + #define NORETURN_PRE __declspec(noreturn) #endif #define PLUGIN_EXPORT __declspec(dllexport) @@ -204,7 +204,7 @@ #define SCUMM_LITTLE_ENDIAN #define FORCEINLINE __forceinline - #define NORETURN __declspec(noreturn) + #define NORETURN_PRE __declspec(noreturn) #define PLUGIN_EXPORT __declspec(dllexport) @@ -350,7 +350,7 @@ // GCC specific stuff // #if defined(__GNUC__) - #define NORETURN __attribute__((__noreturn__)) + #define NORETURN_POST __attribute__((__noreturn__)) #define PACKED_STRUCT __attribute__((__packed__)) #define GCC_PRINTF(x,y) __attribute__((__format__(printf, x, y))) @@ -374,8 +374,12 @@ #define PLUGIN_EXPORT #endif -#ifndef NORETURN -#define NORETURN +#ifndef NORETURN_PRE +#define NORETURN_PRE +#endif + +#ifndef NORETURN_POST +#define NORETURN_POST #endif #ifndef STRINGBUFLEN diff --git a/common/textconsole.cpp b/common/textconsole.cpp index 22e4119084..a74540ea73 100644 --- a/common/textconsole.cpp +++ b/common/textconsole.cpp @@ -73,7 +73,7 @@ void warning(const char *s, ...) { #endif -void NORETURN error(const char *s, ...) { +void NORETURN_PRE error(const char *s, ...) { char buf_input[STRINGBUFLEN]; char buf_output[STRINGBUFLEN]; va_list va; diff --git a/common/textconsole.h b/common/textconsole.h index cff0dad55b..963d674c3b 100644 --- a/common/textconsole.h +++ b/common/textconsole.h @@ -62,11 +62,7 @@ void setErrorHandler(ErrorHandler handler); } // End of namespace Common -#if defined(__GNUC__) -void error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN; -#else -void NORETURN error(const char *s, ...); -#endif +void NORETURN_PRE error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST; #ifdef DISABLE_TEXT_CONSOLE |