Added a GNU C implementation of some of the DECLSPEC_ macros and used
them wherever possible.
diff --git a/include/options.h b/include/options.h
index afc1bda..8e45c2d 100644
--- a/include/options.h
+++ b/include/options.h
@@ -26,7 +26,7 @@
extern const char *argv0;
extern const char *full_argv0;
-extern void OPTIONS_Usage(void) WINE_NORETURN;
+extern void DECLSPEC_NORETURN OPTIONS_Usage(void);
extern void OPTIONS_ParseOptions( char *argv[] );
#endif /* __WINE_OPTIONS_H */
diff --git a/include/thread.h b/include/thread.h
index 12b5ff9..b214065 100644
--- a/include/thread.h
+++ b/include/thread.h
@@ -145,9 +145,9 @@
/* scheduler/sysdeps.c */
extern int SYSDEPS_SpawnThread( TEB *teb );
extern void SYSDEPS_SetCurThread( TEB *teb );
-extern void SYSDEPS_ExitThread( int status ) WINE_NORETURN;
-extern void SYSDEPS_AbortThread( int status ) WINE_NORETURN;
-extern void SYSDEPS_SwitchToThreadStack( void (*func)(void) ) WINE_NORETURN;
+extern void DECLSPEC_NORETURN SYSDEPS_ExitThread( int status );
+extern void DECLSPEC_NORETURN SYSDEPS_AbortThread( int status );
+extern void DECLSPEC_NORETURN SYSDEPS_SwitchToThreadStack( void (*func)(void) );
/* signal handling */
extern BOOL SIGNAL_Init(void);
diff --git a/include/winbase.h b/include/winbase.h
index 95d9782..0aebe0d 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1233,8 +1233,8 @@
BOOL WINAPI EqualSid(PSID, PSID);
BOOL WINAPI EqualPrefixSid(PSID,PSID);
DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
-VOID WINAPI ExitProcess(DWORD) WINE_NORETURN;
-VOID WINAPI ExitThread(DWORD) WINE_NORETURN;
+VOID DECLSPEC_NORETURN WINAPI ExitProcess(DWORD);
+VOID DECLSPEC_NORETURN WINAPI ExitThread(DWORD);
DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
#define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
diff --git a/include/wine/server.h b/include/wine/server.h
index 4a3aec8..931f3f7 100644
--- a/include/wine/server.h
+++ b/include/wine/server.h
@@ -110,8 +110,8 @@
/* non-exported functions */
-extern void server_protocol_error( const char *err, ... ) WINE_NORETURN;
-extern void server_protocol_perror( const char *err ) WINE_NORETURN;
+extern void DECLSPEC_NORETURN server_protocol_error( const char *err, ... );
+extern void DECLSPEC_NORETURN server_protocol_perror( const char *err );
extern void CLIENT_InitServer(void);
extern void CLIENT_InitThread(void);
extern void CLIENT_BootDone( int debug_level );
diff --git a/include/winnt.h b/include/winnt.h
index 5a1cd1a..1af018d 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -130,11 +130,9 @@
#ifdef __GNUC__
#define WINE_PACKED __attribute__((packed))
#define WINE_UNUSED __attribute__((unused))
-#define WINE_NORETURN __attribute__((noreturn))
#else
#define WINE_PACKED /* nothing */
#define WINE_UNUSED /* nothing */
-#define WINE_NORETURN /* nothing */
#endif
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64)) && !defined(MIDL_PASS)
@@ -146,6 +144,8 @@
#ifndef DECLSPEC_NORETURN
# if (_MSVC_VER >= 1200) && !defined(MIDL_PASS)
# define DECLSPEC_NORETURN __declspec(noreturn)
+# elif defined(__GNUC__)
+# define DECLSPEC_NORETURN __attribute__((noreturn))
# else
# define DECLSPEC_NORETURN
# endif
@@ -153,7 +153,9 @@
#ifndef DECLSPEC_ALIGN
# if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
-# define DECLSPEC_ALIGN(x) __declspec(align(x))
+# define DECLSPEC_ALIGN(x) __declspec(align(x))
+# elif defined(__GNUC__)
+# define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
# else
# define DECLSPEC_ALIGN(x)
# endif
@@ -165,7 +167,7 @@
#ifndef DECLSPEC_UUID
# if (_MSC_VER >= 1100) && defined (__cplusplus)
-# define DECLSPEC_UUID(x) __declspec(uuid(x))
+# define DECLSPEC_UUID(x) __declspec(uuid(x))
# else
# define DECLSPEC_UUID(x)
# endif
@@ -173,7 +175,7 @@
#ifndef DECLSPEC_NOVTABLE
# if (_MSC_VER >= 1100) && defined(__cplusplus)
-# define DECLSPEC_NOVTABLE __declspec(novtable)
+# define DECLSPEC_NOVTABLE __declspec(novtable)
# else
# define DECLSPEC_NOVTABLE
# endif
@@ -181,7 +183,7 @@
#ifndef DECLSPEC_SELECTANY
#if (_MSC_VER >= 1100)
-#define DECLSPEC_SELECTANY __declspec(selectany)
+#define DECLSPEC_SELECTANY __declspec(selectany)
#else
#define DECLSPEC_SELECTANY
#endif
@@ -197,7 +199,7 @@
#ifndef DECLSPEC_ADDRSAFE
# if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64))
-# define DECLSPEC_ADDRSAFE __declspec(address_safe)
+# define DECLSPEC_ADDRSAFE __declspec(address_safe)
# else
# define DECLSPEC_ADDRSAFE
# endif
@@ -206,14 +208,19 @@
#ifndef FORCEINLINE
# if (_MSC_VER >= 1200)
# define FORCEINLINE __forceinline
+# elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2)))
+# define FORCEINLINE __attribute__((always_inline))
# else
-# define FORCEINLINE __inline
+# define FORCEINLINE inline
# endif
#endif
#ifndef DECLSPEC_DEPRECATED
# if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
-# define DECLSPEC_DEPRECATED __declspec(deprecated)
+# define DECLSPEC_DEPRECATED __declspec(deprecated)
+# define DEPRECATE_SUPPORTED
+# elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2)))
+# define DECLSPEC_DEPRECATED __attribute__((deprecated))
# define DEPRECATE_SUPPORTED
# else
# define DECLSPEC_DEPRECATED