Added a GNU C implementation of some of the DECLSPEC_ macros and used

them wherever possible.
This commit is contained in:
Patrik Stridvall 2002-10-01 18:07:37 +00:00 committed by Alexandre Julliard
parent e7c82c2711
commit e29345c3bb
8 changed files with 29 additions and 21 deletions

View File

@ -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 */

View File

@ -145,9 +145,9 @@ extern TEB *THREAD_IdToTEB( DWORD id );
/* 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);

View File

@ -1233,8 +1233,8 @@ BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG);
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)

View File

@ -110,8 +110,8 @@ inline static void wine_server_set_reply( void *req_ptr, void *ptr, unsigned int
/* 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 );

View File

@ -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
@ -154,6 +154,8 @@
#ifndef DECLSPEC_ALIGN
# if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
# define DECLSPEC_ALIGN(x) __declspec(align(x))
# elif defined(__GNUC__)
# define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
# else
# define DECLSPEC_ALIGN(x)
# endif
@ -206,8 +208,10 @@
#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
@ -215,6 +219,9 @@
# if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
# 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
# undef DEPRECATE_SUPPORTED

View File

@ -45,7 +45,7 @@ const char *full_argv0; /* the full path of argv[0] (if known) */
static char *inherit_str; /* options to pass to child processes */
static void out_of_memory(void) WINE_NORETURN;
static void DECLSPEC_NORETURN out_of_memory(void);
static void out_of_memory(void)
{
MESSAGE( "Virtual memory exhausted\n" );

View File

@ -35,8 +35,9 @@ static BOOL (WINAPI *pGetMessageA)(LPMSG,HWND,UINT,UINT);
static BOOL (WINAPI *pTranslateMessage)(const MSG*);
static LONG (WINAPI *pDispatchMessageA)(const MSG*);
extern void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name,
HANDLE *win16_exe_file ) WINE_NORETURN;
extern void DECLSPEC_NORETURN PROCESS_InitWine(
int argc, char *argv[], LPSTR win16_exe_name,
HANDLE *win16_exe_file );
extern HINSTANCE16 NE_StartMain( LPCSTR name, HANDLE file );
/***********************************************************************

View File

@ -233,7 +233,7 @@ int SYSDEPS_SpawnThread( TEB *teb )
/***********************************************************************
* SYSDEPS_CallOnStack
*/
void SYSDEPS_CallOnStack( void (*func)(LPVOID), LPVOID arg ) WINE_NORETURN;
void DECLSPEC_NORETURN SYSDEPS_CallOnStack( void (*func)(LPVOID), LPVOID arg );
#ifdef __i386__
#ifdef __GNUC__
__ASM_GLOBAL_FUNC( SYSDEPS_CallOnStack,