ntdll: Make all exported wine functions CDECL.
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Tue, 16 Dec 2008 15:37:46 +0000 (16:37 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 17 Dec 2008 14:02:25 +0000 (15:02 +0100)
19 files changed:
dlls/advapi32/service.c
dlls/kernel32/kernel_main.c
dlls/kernel32/locale.c
dlls/kernel32/process.c
dlls/ntdll/directory.c
dlls/ntdll/loader.c
dlls/ntdll/path.c
dlls/ntdll/process.c
dlls/ntdll/rtlstr.c
dlls/ntdll/server.c
dlls/ntdll/signal_i386.c
dlls/ntdll/signal_powerpc.c
dlls/ntdll/signal_sparc.c
dlls/ntdll/signal_x86_64.c
include/wine/server.h
include/winternl.h
programs/rpcss/rpcss_main.c
programs/services/rpc.c
programs/wineboot/wineboot.c

index 0724035b444c144cbce7a5125c89853cbfb4fd85..cf58e2c44d69197d543f6e0a502c438f6ca0d756 100644 (file)
@@ -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
index be1212f2849e8a8e4629ad2f7ca49aade27b1c62..3699ff73be24c6093f75ee93b14076cd71df2961 100644 (file)
@@ -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;
 
index 9874a24e15c4b8486f3ca7914a8b893e5fcb640e..1b994ec9d5357a1ff7b32015fc72bdff552490c7 100644 (file)
@@ -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;
 
index ca941aac81958f40abc49bf3425708fb93ec91b9..918ce3e3a2978104aaa2aa861307e3eb78428485 100644 (file)
@@ -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};
index baff45aa906cf7a77e12a3918253279e9c133825..001c00421946628b176a8ddd08e4ec350c85406d 100644 (file)
@@ -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 };
index 3a2276f28cf5e5cb512a50221198d365545496f6..3bada928eecc62986a384fb95a3cac95723f2500 100644 (file)
@@ -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;
index 6716c6a861b38e4a0177a6716bfef2ef61b2a37f..66d7b7a3d32648329c4507fda6c4fe0dd523ddfd 100644 (file)
@@ -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;
index 46213dae145d277a5e7deeda84b9ca7d935628e4..6ba1433f43bbab1f516d702aeb8281f656d2d550 100644 (file)
@@ -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 )
index 7b9e895e015fd27c83f7b3fa1c285b9c32fbaa6c..14993f2687933aeedc4298b7a42261e0ab2bbffd 100644 (file)
@@ -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;
index 9d169fabc8324cfeca24240fa12b6aea1a922512..fd154ff8f2c620553dcfc6f474050c9f3d08c923 100644 (file)
@@ -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 );
 }
index 6a3a8477703958229f8b72c4aba25d513ac34b3e..bd1e52b4470e4eb59042a2abc586c161f902335f 100644 (file)
@@ -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;
index ecb74e1d4d33ee7ee58c3a03941cd682abcf8529..4fa44e76c3403a5549aeb2afd6534cbc07d8ee12 100644 (file)
@@ -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;
index 657d167790c03184ebb6e318e1b37a151154db74..4c1463399f52f08f3e11fc60ed9c2aee1084208b 100644 (file)
@@ -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;
index 4020be0ea4caa0b579a10a8c0f92f572a4ada37b..35c9f1b6e81b2e545abac167da6f14e93d9789c5 100644 (file)
@@ -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;
index 014885d2f1be0de3ae9d74543f82f1acab9ef98a..3dab6001ececf218e8e4ff2571970a57d0668e5f 100644 (file)
@@ -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 )
index 9ee14b9f7bcf8055ad14926a30e68c2800891526..d0180a545e7adcd8e426a2206be11389ceaa13f9 100644 (file)
@@ -2505,9 +2505,9 @@ NTSYSAPI NTSTATUS  WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_lis
 
 /* 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 );
 
 
 /***********************************************************************
index 5a22b1ccf5eaf592612b7a6d126c8b16aea73f39..661da4a9020072b61ffc28ef69dd233f665467ad 100644 (file)
@@ -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)
 {
index b6ca9f26dcdf31de349050fbbd54b1fd749875c7..830ed9ccc650b5532801921fc2c3a428a4424a9d 100644 (file)
@@ -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);
 
index 2201ed56dc5e1f16f60acd1880edb2ec779563fa..c647fe65499fa227548f193b5fb092749095c14e 100644 (file)
@@ -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 */