Added a GNU C implementation of some of the DECLSPEC_ macros and used
them wherever possible.
This commit is contained in:
parent
e7c82c2711
commit
e29345c3bb
|
@ -26,7 +26,7 @@
|
||||||
extern const char *argv0;
|
extern const char *argv0;
|
||||||
extern const char *full_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[] );
|
extern void OPTIONS_ParseOptions( char *argv[] );
|
||||||
|
|
||||||
#endif /* __WINE_OPTIONS_H */
|
#endif /* __WINE_OPTIONS_H */
|
||||||
|
|
|
@ -145,9 +145,9 @@ extern TEB *THREAD_IdToTEB( DWORD id );
|
||||||
/* scheduler/sysdeps.c */
|
/* scheduler/sysdeps.c */
|
||||||
extern int SYSDEPS_SpawnThread( TEB *teb );
|
extern int SYSDEPS_SpawnThread( TEB *teb );
|
||||||
extern void SYSDEPS_SetCurThread( TEB *teb );
|
extern void SYSDEPS_SetCurThread( TEB *teb );
|
||||||
extern void SYSDEPS_ExitThread( int status ) WINE_NORETURN;
|
extern void DECLSPEC_NORETURN SYSDEPS_ExitThread( int status );
|
||||||
extern void SYSDEPS_AbortThread( int status ) WINE_NORETURN;
|
extern void DECLSPEC_NORETURN SYSDEPS_AbortThread( int status );
|
||||||
extern void SYSDEPS_SwitchToThreadStack( void (*func)(void) ) WINE_NORETURN;
|
extern void DECLSPEC_NORETURN SYSDEPS_SwitchToThreadStack( void (*func)(void) );
|
||||||
|
|
||||||
/* signal handling */
|
/* signal handling */
|
||||||
extern BOOL SIGNAL_Init(void);
|
extern BOOL SIGNAL_Init(void);
|
||||||
|
|
|
@ -1233,8 +1233,8 @@ BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG);
|
||||||
BOOL WINAPI EqualSid(PSID, PSID);
|
BOOL WINAPI EqualSid(PSID, PSID);
|
||||||
BOOL WINAPI EqualPrefixSid(PSID,PSID);
|
BOOL WINAPI EqualPrefixSid(PSID,PSID);
|
||||||
DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
|
DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
|
||||||
VOID WINAPI ExitProcess(DWORD) WINE_NORETURN;
|
VOID DECLSPEC_NORETURN WINAPI ExitProcess(DWORD);
|
||||||
VOID WINAPI ExitThread(DWORD) WINE_NORETURN;
|
VOID DECLSPEC_NORETURN WINAPI ExitThread(DWORD);
|
||||||
DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
|
DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
|
||||||
DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
|
DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
|
||||||
#define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
|
#define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
|
||||||
|
|
|
@ -110,8 +110,8 @@ inline static void wine_server_set_reply( void *req_ptr, void *ptr, unsigned int
|
||||||
|
|
||||||
|
|
||||||
/* non-exported functions */
|
/* non-exported functions */
|
||||||
extern void server_protocol_error( const char *err, ... ) WINE_NORETURN;
|
extern void DECLSPEC_NORETURN server_protocol_error( const char *err, ... );
|
||||||
extern void server_protocol_perror( const char *err ) WINE_NORETURN;
|
extern void DECLSPEC_NORETURN server_protocol_perror( const char *err );
|
||||||
extern void CLIENT_InitServer(void);
|
extern void CLIENT_InitServer(void);
|
||||||
extern void CLIENT_InitThread(void);
|
extern void CLIENT_InitThread(void);
|
||||||
extern void CLIENT_BootDone( int debug_level );
|
extern void CLIENT_BootDone( int debug_level );
|
||||||
|
|
|
@ -130,11 +130,9 @@
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define WINE_PACKED __attribute__((packed))
|
#define WINE_PACKED __attribute__((packed))
|
||||||
#define WINE_UNUSED __attribute__((unused))
|
#define WINE_UNUSED __attribute__((unused))
|
||||||
#define WINE_NORETURN __attribute__((noreturn))
|
|
||||||
#else
|
#else
|
||||||
#define WINE_PACKED /* nothing */
|
#define WINE_PACKED /* nothing */
|
||||||
#define WINE_UNUSED /* nothing */
|
#define WINE_UNUSED /* nothing */
|
||||||
#define WINE_NORETURN /* nothing */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64)) && !defined(MIDL_PASS)
|
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_IA64) || defined(_M_AMD64)) && !defined(MIDL_PASS)
|
||||||
|
@ -146,6 +144,8 @@
|
||||||
#ifndef DECLSPEC_NORETURN
|
#ifndef DECLSPEC_NORETURN
|
||||||
# if (_MSVC_VER >= 1200) && !defined(MIDL_PASS)
|
# if (_MSVC_VER >= 1200) && !defined(MIDL_PASS)
|
||||||
# define DECLSPEC_NORETURN __declspec(noreturn)
|
# define DECLSPEC_NORETURN __declspec(noreturn)
|
||||||
|
# elif defined(__GNUC__)
|
||||||
|
# define DECLSPEC_NORETURN __attribute__((noreturn))
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC_NORETURN
|
# define DECLSPEC_NORETURN
|
||||||
# endif
|
# endif
|
||||||
|
@ -153,7 +153,9 @@
|
||||||
|
|
||||||
#ifndef DECLSPEC_ALIGN
|
#ifndef DECLSPEC_ALIGN
|
||||||
# if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
|
# 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
|
# else
|
||||||
# define DECLSPEC_ALIGN(x)
|
# define DECLSPEC_ALIGN(x)
|
||||||
# endif
|
# endif
|
||||||
|
@ -165,7 +167,7 @@
|
||||||
|
|
||||||
#ifndef DECLSPEC_UUID
|
#ifndef DECLSPEC_UUID
|
||||||
# if (_MSC_VER >= 1100) && defined (__cplusplus)
|
# if (_MSC_VER >= 1100) && defined (__cplusplus)
|
||||||
# define DECLSPEC_UUID(x) __declspec(uuid(x))
|
# define DECLSPEC_UUID(x) __declspec(uuid(x))
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC_UUID(x)
|
# define DECLSPEC_UUID(x)
|
||||||
# endif
|
# endif
|
||||||
|
@ -173,7 +175,7 @@
|
||||||
|
|
||||||
#ifndef DECLSPEC_NOVTABLE
|
#ifndef DECLSPEC_NOVTABLE
|
||||||
# if (_MSC_VER >= 1100) && defined(__cplusplus)
|
# if (_MSC_VER >= 1100) && defined(__cplusplus)
|
||||||
# define DECLSPEC_NOVTABLE __declspec(novtable)
|
# define DECLSPEC_NOVTABLE __declspec(novtable)
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC_NOVTABLE
|
# define DECLSPEC_NOVTABLE
|
||||||
# endif
|
# endif
|
||||||
|
@ -181,7 +183,7 @@
|
||||||
|
|
||||||
#ifndef DECLSPEC_SELECTANY
|
#ifndef DECLSPEC_SELECTANY
|
||||||
#if (_MSC_VER >= 1100)
|
#if (_MSC_VER >= 1100)
|
||||||
#define DECLSPEC_SELECTANY __declspec(selectany)
|
#define DECLSPEC_SELECTANY __declspec(selectany)
|
||||||
#else
|
#else
|
||||||
#define DECLSPEC_SELECTANY
|
#define DECLSPEC_SELECTANY
|
||||||
#endif
|
#endif
|
||||||
|
@ -197,7 +199,7 @@
|
||||||
|
|
||||||
#ifndef DECLSPEC_ADDRSAFE
|
#ifndef DECLSPEC_ADDRSAFE
|
||||||
# if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64))
|
# if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64))
|
||||||
# define DECLSPEC_ADDRSAFE __declspec(address_safe)
|
# define DECLSPEC_ADDRSAFE __declspec(address_safe)
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC_ADDRSAFE
|
# define DECLSPEC_ADDRSAFE
|
||||||
# endif
|
# endif
|
||||||
|
@ -206,14 +208,19 @@
|
||||||
#ifndef FORCEINLINE
|
#ifndef FORCEINLINE
|
||||||
# if (_MSC_VER >= 1200)
|
# if (_MSC_VER >= 1200)
|
||||||
# define FORCEINLINE __forceinline
|
# define FORCEINLINE __forceinline
|
||||||
|
# elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2)))
|
||||||
|
# define FORCEINLINE __attribute__((always_inline))
|
||||||
# else
|
# else
|
||||||
# define FORCEINLINE __inline
|
# define FORCEINLINE inline
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DECLSPEC_DEPRECATED
|
#ifndef DECLSPEC_DEPRECATED
|
||||||
# if (_MSC_VER >= 1300) && !defined(MIDL_PASS)
|
# 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
|
# define DEPRECATE_SUPPORTED
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC_DEPRECATED
|
# define DECLSPEC_DEPRECATED
|
||||||
|
|
|
@ -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 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)
|
static void out_of_memory(void)
|
||||||
{
|
{
|
||||||
MESSAGE( "Virtual memory exhausted\n" );
|
MESSAGE( "Virtual memory exhausted\n" );
|
||||||
|
|
|
@ -35,8 +35,9 @@ static BOOL (WINAPI *pGetMessageA)(LPMSG,HWND,UINT,UINT);
|
||||||
static BOOL (WINAPI *pTranslateMessage)(const MSG*);
|
static BOOL (WINAPI *pTranslateMessage)(const MSG*);
|
||||||
static LONG (WINAPI *pDispatchMessageA)(const MSG*);
|
static LONG (WINAPI *pDispatchMessageA)(const MSG*);
|
||||||
|
|
||||||
extern void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name,
|
extern void DECLSPEC_NORETURN PROCESS_InitWine(
|
||||||
HANDLE *win16_exe_file ) WINE_NORETURN;
|
int argc, char *argv[], LPSTR win16_exe_name,
|
||||||
|
HANDLE *win16_exe_file );
|
||||||
extern HINSTANCE16 NE_StartMain( LPCSTR name, HANDLE file );
|
extern HINSTANCE16 NE_StartMain( LPCSTR name, HANDLE file );
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -233,7 +233,7 @@ int SYSDEPS_SpawnThread( TEB *teb )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SYSDEPS_CallOnStack
|
* 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 __i386__
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__ASM_GLOBAL_FUNC( SYSDEPS_CallOnStack,
|
__ASM_GLOBAL_FUNC( SYSDEPS_CallOnStack,
|
||||||
|
|
Loading…
Reference in New Issue