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.
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
When it comes to things that may break code for many users, I suggest that you shouldn't believe any documentation until you actually test and verify the assertions it makes. For all practical purposes, most documentation that you're likely to refer to is like grade school: the art of telling [progressively smaller] lies.
this version with __VA_ARGS__ should be compatible with other compilers as well...
LOL. I suggest you actually try it out with other compilers. I know (BTDT) that __VA_ARGS__ does *not* work with many compilers, some of them relatively popular.
Feel free to test it, and post the list of compilers (including version/build numbers) that you've verified it to work with. Until then, I'd be cautious.
Cheers, Kuba