Fwd: [PATCH] variable number of arguments in macro
__ONLY_IN_WINELIB()
Vijay Kiran Kamuju
infyquest at gmail.com
Tue Nov 8 09:26:52 CST 2005
Send patches to wine-patches list as well.
---------- Forwarded message ----------
From: Berend Reitsma <breitsma at gmail.com>
Date: Nov 8, 2005 8:02 PM
Subject: [PATCH] variable number of arguments in macro __ONLY_IN_WINELIB()
To: wine-devel at winehq.org
Hi,
With gcc 2.95.4 I am getting a compile error when compiling
dlls/mapi32/tests/prop.c because of the use of the FAR keyword:
gcc -c -I. -I. -I../../../include -I../../../include -D_REENTRANT
-fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing
-gstabs+ -Wpointer-arith -g -O2 -o prop.o prop.c
prop.c:54: macro `__ONLY_IN_WINELIB' used without args
prop.c:55: macro `__ONLY_IN_WINELIB' used without args
prop.c:1158: macro `__ONLY_IN_WINELIB' used without args
prop.c:1158: macro `__ONLY_IN_WINELIB' used without args
prop.c:1159: macro `__ONLY_IN_WINELIB' used without args
make: *** [prop.o] Error 1
In include/windef.h the definition of FAR is a call to the macro
__ONLY_IN_WINELIB with no arguments.
The attached patch changes the definition of the macro to use
variable arguments
According to some documentation I found on the web this version with
__VA_ARGS__ should be compatible with other compilers as well...
Regards,
Berend Reitsma.
-------------- next part --------------
Index: include/windef.h
===================================================================
RCS file: /home/wine/wine/include/windef.h,v
retrieving revision 1.100
diff -u -r1.100 windef.h
--- include/windef.h 4 Oct 2005 11:30:27 -0000 1.100
+++ include/windef.h 8 Nov 2005 14:26:02 -0000
@@ -72,9 +72,9 @@
#endif /* __cdecl */
#ifdef __WINESRC__
-#define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine
+#define __ONLY_IN_WINELIB(...) do_not_use_this_in_wine
#else
-#define __ONLY_IN_WINELIB(x) x
+#define __ONLY_IN_WINELIB(...) __VA_ARGS__
#endif
#ifndef pascal
More information about the wine-patches
mailing list