[Wine-patches] Explicitly specify CDECL calling convention on exported functions.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пн Дек 29 18:16:21 MSK 2008


Please use this patch instead of previous.
----------- следующая часть -----------
From 433c81b76b08dbf371c5150633a50371c46320f6 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 29 Dec 2008 18:14:01 +0300
Subject: [PATCH] Explicitly specify CDECL calling convention on exported functions.

---
 dlls/mountmgr.sys/device.c   |    2 +-
 dlls/mountmgr.sys/mountmgr.c |    2 +-
 dlls/ntoskrnl.exe/ntoskrnl.c |   10 +++++-----
 dlls/wineusbhub/wineusbhub.c |   12 ++++++------
 programs/winedevice/device.c |    2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 4e19dfb..466cebc 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -45,7 +45,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(mountmgr);
 
-extern void wine_complete_request( IRP *irp, UCHAR priority_boost );
+extern void CDECL wine_complete_request( IRP *irp, UCHAR priority_boost );
 
 #define MAX_DOS_DRIVES 26
 
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index b18a51b..0e0ac29 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -33,7 +33,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(mountmgr);
 
-extern void wine_complete_request( IRP *irp, UCHAR priority_boost );
+extern void CDECL wine_complete_request( IRP *irp, UCHAR priority_boost );
 
 #define MIN_ID_LEN     4
 
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 125903b..70bc708 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -47,10 +47,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
 WINE_DECLARE_DEBUG_CHANNEL(relay);
 
 
-extern UNICODE_STRING *__wine_usbhub_get_pdo_name();
-extern char *__wine_usbhub_get_instance_id();
-extern USHORT __wine_usbhub_get_vid();
-extern USHORT __wine_usbhub_get_pid();
+extern UNICODE_STRING * CDECL __wine_usbhub_get_pdo_name();
+extern char * CDECL __wine_usbhub_get_instance_id();
+extern USHORT CDECL __wine_usbhub_get_vid();
+extern USHORT CDECL __wine_usbhub_get_pid();
 
 KSYSTEM_TIME KeTickCount = { 0, 0, 0 };
 
@@ -1106,7 +1106,7 @@ NTSTATUS WINAPI IoRegisterShutdownNotification( PDEVICE_OBJECT obj )
 /***********************************************************************
  *           wine_complete_request   (Not a Windows API)
  */
-void wine_complete_request( IRP *irp, UCHAR priority_boost )
+void CDECL wine_complete_request( IRP *irp, UCHAR priority_boost )
 {
     IO_STACK_LOCATION *irpsp;
     PIO_COMPLETION_ROUTINE routine;
diff --git a/dlls/wineusbhub/wineusbhub.c b/dlls/wineusbhub/wineusbhub.c
index 45a4046..8023a91 100644
--- a/dlls/wineusbhub/wineusbhub.c
+++ b/dlls/wineusbhub/wineusbhub.c
@@ -40,7 +40,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(wineusbhub);
 
 #if defined(HAVE_LIBUSB) && defined(HAVE_USB_H)
-extern void wine_complete_request( IRP *irp, UCHAR priority_boost );
+extern void CDECL wine_complete_request( IRP *irp, UCHAR priority_boost );
 
 DRIVER_OBJECT hubdrv;
 DEVICE_OBJECT *usbdev = NULL;      /* USB PDO */
@@ -236,7 +236,7 @@ NTSTATUS WINAPI __wine_usbhub_dispatch_pnp( DEVICE_OBJECT *device, IRP *irp )
 }
 #endif
 
-DEVICE_OBJECT *__wine_usbhub_get_pdo( UCHAR *pdo_info )
+DEVICE_OBJECT * CDECL __wine_usbhub_get_pdo( UCHAR *pdo_info )
 {
 #if defined(HAVE_LIBUSB) && defined(HAVE_USB_H)
     static const WCHAR usbpdoW[] = {'\\','D','e','v','i','c','e','\\',
@@ -269,7 +269,7 @@ DEVICE_OBJECT *__wine_usbhub_get_pdo( UCHAR *pdo_info )
     return NULL;
 }
 
-UNICODE_STRING *__wine_usbhub_get_pdo_name()
+UNICODE_STRING * CDECL __wine_usbhub_get_pdo_name()
 {
 #if defined(HAVE_LIBUSB) && defined(HAVE_USB_H)
     if (pdo_name.Length)
@@ -278,7 +278,7 @@ UNICODE_STRING *__wine_usbhub_get_pdo_name()
     return NULL;
 }
 
-char *__wine_usbhub_get_instance_id()
+char * CDECL __wine_usbhub_get_instance_id()
 {
 #if defined(HAVE_LIBUSB) && defined(HAVE_USB_H)
     if (*instance_id)
@@ -287,7 +287,7 @@ char *__wine_usbhub_get_instance_id()
     return NULL;
 }
 
-USHORT __wine_usbhub_get_vid()
+USHORT CDECL __wine_usbhub_get_vid()
 {
 #if defined(HAVE_LIBUSB) && defined(HAVE_USB_H)
     if (usbdev != NULL)
@@ -296,7 +296,7 @@ USHORT __wine_usbhub_get_vid()
     return 0;
 }
 
-USHORT __wine_usbhub_get_pid()
+USHORT CDECL __wine_usbhub_get_pid()
 {
 #if defined(HAVE_LIBUSB) && defined(HAVE_USB_H)
     if (usbdev != NULL)
diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c
index 0b4f881..ac988e1 100644
--- a/programs/winedevice/device.c
+++ b/programs/winedevice/device.c
@@ -44,7 +44,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(winedevice);
 WINE_DECLARE_DEBUG_CHANNEL(relay);
 
-extern DEVICE_OBJECT *__wine_usbhub_get_pdo( UCHAR *pdo_info );
+extern DEVICE_OBJECT * CDECL __wine_usbhub_get_pdo( UCHAR *pdo_info );
 extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event );
 
 static WCHAR *driver_name;
-- 
1.6.0.2.GIT



Подробная информация о списке рассылки Wine-patches