[PATCH] ntdll: Make all exported wine functions __cdecl
Maarten Lankhorst
m.b.lankhorst at gmail.com
Tue Dec 16 09:37:46 CST 2008
---
dlls/advapi32/service.c | 2 +-
dlls/kernel32/kernel_main.c | 2 +-
dlls/kernel32/locale.c | 4 ++--
dlls/kernel32/process.c | 2 +-
dlls/ntdll/directory.c | 4 ++--
dlls/ntdll/loader.c | 2 +-
dlls/ntdll/path.c | 2 +-
dlls/ntdll/process.c | 2 +-
dlls/ntdll/rtlstr.c | 4 ++--
dlls/ntdll/server.c | 8 ++++----
dlls/ntdll/signal_i386.c | 2 +-
dlls/ntdll/signal_powerpc.c | 2 +-
dlls/ntdll/signal_sparc.c | 2 +-
dlls/ntdll/signal_x86_64.c | 2 +-
include/wine/server.h | 8 ++++----
include/winternl.h | 6 +++---
programs/rpcss/rpcss_main.c | 2 +-
programs/services/rpc.c | 2 +-
programs/wineboot/wineboot.c | 2 +-
19 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index 0724035..2d78db4 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -102,7 +102,7 @@ static service_data **services;
static unsigned int nb_services;
static HANDLE service_event;
-extern HANDLE __wine_make_process_system(void);
+extern HANDLE __cdecl __wine_make_process_system(void);
/******************************************************************************
* SC_HANDLEs
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index be1212f..3c3d99f 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -43,7 +43,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(process);
-extern int __wine_set_signal_handler(unsigned, int (*)(unsigned));
+extern int __cdecl __wine_set_signal_handler(unsigned, int (*)(unsigned));
static ULONGLONG server_start_time;
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 9874a24..ac1ffc0 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -2857,8 +2857,8 @@ int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
*/
void LOCALE_Init(void)
{
- extern void __wine_init_codepages( const union cptable *ansi_cp, const union cptable *oem_cp,
- const union cptable *unix_cp );
+ extern void __cdecl __wine_init_codepages( const union cptable *ansi_cp, const union cptable *oem_cp,
+ const union cptable *unix_cp );
UINT ansi_cp = 1252, oem_cp = 437, mac_cp = 10000, unix_cp;
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 49ec154..3531f28 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -786,7 +786,7 @@ done:
*/
static void init_windows_dirs(void)
{
- extern void __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir );
+ extern void __cdecl __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir );
static const WCHAR windirW[] = {'w','i','n','d','i','r',0};
static const WCHAR winsysdirW[] = {'w','i','n','s','y','s','d','i','r',0};
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index baff45a..53fb818 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -1919,8 +1919,8 @@ static inline int get_dos_prefix_len( const UNICODE_STRING *name )
* element doesn't have to exist; in that case STATUS_NO_SUCH_FILE is
* returned, but the unix name is still filled in properly.
*/
-NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
- UINT disposition, BOOLEAN check_case )
+NTSTATUS __cdecl wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
+ UINT disposition, BOOLEAN check_case )
{
static const WCHAR unixW[] = {'u','n','i','x'};
static const WCHAR invalid_charsW[] = { INVALID_NT_CHARS, 0 };
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index ed792f2..2fb0dc7 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2612,7 +2612,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
*
* Windows and system dir initialization once kernel32 has been loaded.
*/
-void __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir )
+void __cdecl __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir )
{
PLIST_ENTRY mark, entry;
LPWSTR buffer, p;
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index 6716c6a..c232609 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -1015,7 +1015,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
/******************************************************************
* wine_unix_to_nt_file_name (NTDLL.@) Not a Windows API
*/
-NTSTATUS wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt )
+NTSTATUS __cdecl wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt )
{
static const WCHAR prefixW[] = {'\\','?','?','\\','A',':','\\'};
unsigned int lenW, lenA = name->Length;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 46213da..b7b190b 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -77,7 +77,7 @@ PEB * WINAPI RtlGetCurrentPeb(void)
* Mark the current process as a system process.
* Returns the event that is signaled when all non-system processes have exited.
*/
-HANDLE __wine_make_process_system(void)
+HANDLE __cdecl __wine_make_process_system(void)
{
HANDLE ret = 0;
SERVER_START_REQ( make_process_system )
diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c
index 7b9e895..a132caf 100644
--- a/dlls/ntdll/rtlstr.c
+++ b/dlls/ntdll/rtlstr.c
@@ -54,8 +54,8 @@ static const union cptable* unix_table; /* NULL if UTF8 */
*
* Set the code page once kernel32 is loaded. Should be done differently.
*/
-void __wine_init_codepages( const union cptable *ansi, const union cptable *oem,
- const union cptable *ucp)
+void __cdecl __wine_init_codepages( const union cptable *ansi, const union cptable *oem,
+ const union cptable *ucp)
{
ansi_table = ansi;
oem_table = oem;
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 1f2f4b0..a94a31d 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -358,7 +358,7 @@ void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sig
* RETURNS
* nothing
*/
-void wine_server_send_fd( int fd )
+void __cdecl wine_server_send_fd( int fd )
{
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
struct cmsg_fd cmsg;
@@ -627,7 +627,7 @@ done:
* RETURNS
* NTSTATUS code
*/
-int wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle )
+int __cdecl wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle )
{
int ret;
@@ -660,7 +660,7 @@ int wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attribut
* RETURNS
* NTSTATUS code
*/
-int wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd,
+int __cdecl wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd,
unsigned int *options )
{
int needs_close, ret = server_get_unix_fd( handle, access, unix_fd, &needs_close, NULL, options );
@@ -685,7 +685,7 @@ int wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd,
* RETURNS
* nothing
*/
-void wine_server_release_fd( HANDLE handle, int unix_fd )
+void __cdecl wine_server_release_fd( HANDLE handle, int unix_fd )
{
close( unix_fd );
}
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 6a3a847..841d1b3 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1560,7 +1560,7 @@ size_t get_signal_stack_total_size(void)
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
*/
-int __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
+int __cdecl __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
{
if (sig >= sizeof(handlers) / sizeof(handlers[0])) return -1;
if (handlers[sig] != NULL) return -2;
diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c
index ecb74e1..c24e92c 100644
--- a/dlls/ntdll/signal_powerpc.c
+++ b/dlls/ntdll/signal_powerpc.c
@@ -635,7 +635,7 @@ static int set_handler( int sig, void (*func)() )
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
*/
-int __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
+int __cdecl __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
{
if (sig > sizeof(handlers) / sizeof(handlers[0])) return -1;
if (handlers[sig] != NULL) return -2;
diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c
index 657d167..52add35 100644
--- a/dlls/ntdll/signal_sparc.c
+++ b/dlls/ntdll/signal_sparc.c
@@ -448,7 +448,7 @@ static int set_handler( int sig, void (*func)() )
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
*/
-int __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
+int __cdecl __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
{
if (sig > sizeof(handlers) / sizeof(handlers[0])) return -1;
if (handlers[sig] != NULL) return -2;
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 3dad6e1..1e175e5 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -474,7 +474,7 @@ static int set_handler( int sig, void (*func)() )
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
*/
-int __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
+int __cdecl __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh)
{
if (sig > sizeof(handlers) / sizeof(handlers[0])) return -1;
if (handlers[sig] != NULL) return -2;
diff --git a/include/wine/server.h b/include/wine/server.h
index 014885d..a01703a 100644
--- a/include/wine/server.h
+++ b/include/wine/server.h
@@ -50,10 +50,10 @@ struct __server_request_info
};
extern unsigned int wine_server_call( void *req_ptr );
-extern void wine_server_send_fd( int fd );
-extern int wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle );
-extern int wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd, unsigned int *options );
-extern void wine_server_release_fd( HANDLE handle, int unix_fd );
+extern void __cdecl wine_server_send_fd( int fd );
+extern int __cdecl wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle );
+extern int __cdecl wine_server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd, unsigned int *options );
+extern void __cdecl wine_server_release_fd( HANDLE handle, int unix_fd );
/* do a server call and set the last error code */
static inline unsigned int wine_server_call_err( void *req_ptr )
diff --git a/include/winternl.h b/include/winternl.h
index cd42f88..3631230 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2505,9 +2505,9 @@ NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,ms_va_
/* Wine internal functions */
-NTSYSAPI NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
- UINT disposition, BOOLEAN check_case );
-NTSYSAPI NTSTATUS wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
+NTSYSAPI NTSTATUS __cdecl wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
+ UINT disposition, BOOLEAN check_case );
+NTSYSAPI NTSTATUS __cdecl wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
/***********************************************************************
diff --git a/programs/rpcss/rpcss_main.c b/programs/rpcss/rpcss_main.c
index 5a22b1c..95fd880 100644
--- a/programs/rpcss/rpcss_main.c
+++ b/programs/rpcss/rpcss_main.c
@@ -62,7 +62,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
static HANDLE exit_event;
-extern HANDLE __wine_make_process_system(void);
+extern HANDLE __cdecl __wine_make_process_system(void);
static BOOL RPCSS_Initialize(void)
{
diff --git a/programs/services/rpc.c b/programs/services/rpc.c
index b6ca9f2..147b934 100644
--- a/programs/services/rpc.c
+++ b/programs/services/rpc.c
@@ -34,7 +34,7 @@
#include "services.h"
#include "svcctl.h"
-extern HANDLE __wine_make_process_system(void);
+extern HANDLE __cdecl __wine_make_process_system(void);
WINE_DEFAULT_DEBUG_CHANNEL(service);
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 2201ed5..d847b42 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -815,7 +815,7 @@ static const struct option long_options[] =
int main( int argc, char *argv[] )
{
- extern HANDLE __wine_make_process_system(void);
+ extern HANDLE __cdecl __wine_make_process_system(void);
static const WCHAR wineboot_eventW[] = {'_','_','w','i','n','e','b','o','o','t','_','e','v','e','n','t',0};
/* First, set the current directory to SystemRoot */
--
1.5.6.5
--------------090509000409090008070603--
More information about the wine-patches
mailing list