Compile Bug: dlls/wininet/cookie.c .. and its cause

Ivan Gyurdiev ivg2 at cornell.edu
Sat Nov 22 16:23:51 CST 2003


Macro __WINESRC__ is defined for dlls/wininet/cookie.c in the Makefile.
The file cookie.c includes wine/debug.h.
wine/debug.h includes windef.h.
windef.h defines the macro FAR to __ONLY_IN_WINELIB()
__ONLY_IN_WINELIB() defines to do_not_use_this_in_wine if __WINESRC__

The file dlls/wininet/cookie.c also includes dlls/wininet/internet.h
dlls/wininet/internet.h includes openssl/ssl.h for my machine
openssl/ssl.h includes openssl/kssl.h
openssl/kssl.h has the following code using the FAR macro:

#ifdef KRB5_HEIMDAL
typedef unsigned char krb5_octet;
#endif
#ifndef FAR
#define FAR
#endif

...

Line 136: krb5_octet FAR *key;

This is on a Fedora core system, which applies a patch to openssl that 
changes the original openssl-devel regarding this, but I think the 
issue's with wine, and is still there. The original openssl-devel looks 
like this:

#ifdef KRB5_HEIMDAL
typedef unsigned char krb5_octet;
define FAR
#endif

Either way, the point is the FAR macro is being used in kssl.h,
and it's defined in windef.h, as do_not_use_this_in_wine,
resulting in this:

gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -D_WINX32_ 
-D_REENTRANT -fPIC -Wall -mpreferred-stack-boundary=2 
-fno-strict-aliasing -gstabs+ -Wpointer-arith  -g -O2 -o cookie.o cookie.c
In file included from /usr/include/openssl/ssl.h:179,
                  from internet.h:36,
                  from cookie.c:39:
/usr/include/openssl/kssl.h:136: error: syntax error before '*' token
/usr/include/openssl/kssl.h:149: error: syntax error before '*' token
/usr/include/openssl/kssl.h:150: error: syntax error before '*' token
/usr/include/openssl/kssl.h:151: error: syntax error before '*' token
/usr/include/openssl/kssl.h:151: error: syntax error before '*' token
/usr/include/openssl/kssl.h:152: error: syntax error before '*' token
/usr/include/openssl/kssl.h:153: error: syntax error before '*' token
/usr/include/openssl/kssl.h:155: error: syntax error before '*' token
/usr/include/openssl/kssl.h:157: error: syntax error before '*' token
/usr/include/openssl/kssl.h:159: error: syntax error before '*' token
/usr/include/openssl/kssl.h:167: error: syntax error before '*' token
In file included from internet.h:36,
                  from cookie.c:39:
/usr/include/openssl/ssl.h:909: error: syntax error before "KSSL_CTX"
/usr/include/openssl/ssl.h:931: error: syntax error before '}' token
make[2]: *** [cookie.o] Error 1
make[2]: Leaving directory 
`/home/phantom/tmp/firebird-downloads/wine-20031118/dlls/wininet'
make[1]: *** [wininet] Error 2
make[1]: Leaving directory 
`/home/phantom/tmp/firebird-downloads/wine-20031118/dlls'
make: *** [dlls] Error 2

=====================================================================

I am not subscribed to this list. If you'd like to email back write to
ivg2 at cornell.edu. Also, some unrelated questions:

does anyone know what causes this:

err:module:NE_LoadBuiltinModule loaded .so but dll winealsa.drv still 
not found

(the file is there... oss is there too, and works great)

....or why keyboard focus is always lost (characters appear in the 
console, kb doesn't work in application) when playing most games under a 
window manager like gnome or kde, but not under twm? This bug has been 
there forever and is really annoying.




More information about the wine-devel mailing list