Rob Shearman : winebuild: Declare fatal_error and fatal_perror as non-returning functions.

Alexandre Julliard julliard at winehq.org
Tue Sep 30 11:16:43 CDT 2008


Module: wine
Branch: master
Commit: 8a6f1655d83b63b13a652b5b5075d74408a092b3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a6f1655d83b63b13a652b5b5075d74408a092b3

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Tue Sep 30 13:54:32 2008 +0100

winebuild: Declare fatal_error and fatal_perror as non-returning functions.

---

 tools/winebuild/build.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index b13b994..326a838 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -143,14 +143,22 @@ extern enum target_platform target_platform;
 #define __attribute__(X)
 #endif
 
+#ifndef DECLSPEC_NORETURN
+# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS)
+#  define DECLSPEC_NORETURN __declspec(noreturn)
+# else
+#  define DECLSPEC_NORETURN __attribute__((noreturn))
+# endif
+#endif
+
 extern void *xmalloc (size_t size);
 extern void *xrealloc (void *ptr, size_t size);
 extern char *xstrdup( const char *str );
 extern char *strupper(char *s);
 extern int strendswith(const char* str, const char* end);
-extern void fatal_error( const char *msg, ... )
+extern DECLSPEC_NORETURN void fatal_error( const char *msg, ... )
    __attribute__ ((__format__ (__printf__, 1, 2)));
-extern void fatal_perror( const char *msg, ... )
+extern DECLSPEC_NORETURN void fatal_perror( const char *msg, ... )
    __attribute__ ((__format__ (__printf__, 1, 2)));
 extern void error( const char *msg, ... )
    __attribute__ ((__format__ (__printf__, 1, 2)));




More information about the wine-cvs mailing list