Francois Gouget : snmpapi: SnmpUtilDbgPrint()
is a vararg and not an stdcall function.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jan 25 06:12:10 CST 2007
Module: wine
Branch: master
Commit: 618be0874a2fbdda10db8753c8a8371194abaf3a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=618be0874a2fbdda10db8753c8a8371194abaf3a
Author: Francois Gouget <fgouget at free.fr>
Date: Wed Jan 24 15:39:26 2007 +0100
snmpapi: SnmpUtilDbgPrint() is a vararg and not an stdcall function.
---
dlls/snmpapi/main.c | 9 ++++++++-
dlls/snmpapi/snmpapi.spec | 2 +-
include/snmp.h | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/snmpapi/main.c b/dlls/snmpapi/main.c
index 539c8e1..04ec05d 100644
--- a/dlls/snmpapi/main.c
+++ b/dlls/snmpapi/main.c
@@ -136,8 +136,15 @@ BOOL WINAPI DllMain(
/***********************************************************************
* SnmpUtilDbgPrint (SNMPAPI.@)
+ *
+ * NOTES
+ * The Microsoft headers claim this function uses the stdcall calling
+ * convention. But stdcall functions cannot take a variable number of
+ * arguments so this does not make sense. The stdcall specification is
+ * probably ignored by Microsoft's compiler in this case. So declare it
+ * correctly in Wine so it works with all compilers.
*/
-void WINAPI SnmpUtilDbgPrint(INT loglevel, LPSTR format, ...)
+void WINAPIV SnmpUtilDbgPrint(INT loglevel, LPSTR format, ...)
{
FIXME("(%d, %s)\n", loglevel, debugstr_a(format));
}
diff --git a/dlls/snmpapi/snmpapi.spec b/dlls/snmpapi/snmpapi.spec
index 2ada750..385ca8a 100644
--- a/dlls/snmpapi/snmpapi.spec
+++ b/dlls/snmpapi/snmpapi.spec
@@ -20,7 +20,7 @@
@ stub SnmpUtilAnsiToUnicode
@ stdcall SnmpUtilAsnAnyCpy(ptr ptr)
@ stdcall SnmpUtilAsnAnyFree(ptr)
-@ stdcall SnmpUtilDbgPrint(long str)
+@ varargs SnmpUtilDbgPrint(long str)
@ stdcall SnmpUtilIdsToA(ptr long)
@ stdcall SnmpUtilMemAlloc(long)
@ stdcall SnmpUtilMemFree(ptr)
diff --git a/include/snmp.h b/include/snmp.h
index aaece6c..2399d00 100644
--- a/include/snmp.h
+++ b/include/snmp.h
@@ -289,7 +289,7 @@ DWORD WINAPI SnmpSvcGetUptime(void);
void WINAPI SnmpSvcSetLogLevel(int nLogLevel);
void WINAPI SnmpSvcSetLogType(int nLogType);
-void WINAPI SnmpUtilDbgPrint(int nLogLevel, LPSTR szFormat, ...);
+void WINAPIV SnmpUtilDbgPrint(int nLogLevel, LPSTR szFormat, ...);
#ifdef __cplusplus
}
More information about the wine-cvs
mailing list