> Patrik Stridvall <psÉleissner.se> writes:
> 
> > With mixed mode we link with the Unix C library and hope that the
> > clever header tricks will save us. For some application it will,
> > for some it won't. At least it is better than nothing.
> 
> I don't see why header tricks would be necessary. 

They are not strictly nessary, they are supposed to help porting
if at all possible. Nothing more, nothing less.

> If you use the Unix
> libc you should be able to use the libc includes. The few extensions
> like _fullpath can be put in a separate header, and all you do is add
> a #include in the app; I don't think we need to setup a heavy include
> infrastructure just to ensure that _fullpath is defined in stdlib.h.

Perhaps your are right. However I still think it would be useful for
some applications. As I said earlier most users of WineLib will share
code base with Windows so to have as few #ifdef:s as possible
is preferable.

> And the places where the Wine and Unix headers are really different
> (fd_set, wchar_t etc.) are the things you cannot use anyway.

I say the same thing as Huw said. I'm not sure what you mean.
Obviously we will have to choose one of them and hope that
the application is source compatible enough. If this is not
the case the application must of course be changed, but I
think it will work for at least some applications.

> > With Unix mode, we treat WineLib as any Unix library and calls
> > to Windows extensions like _fullpath are forbidden.
> 
> If you want to treat Winelib as a normal Unix library you need to
> recompile it using libc definitions exclusively, to make it
> binary-compatible with libc (and of course no longer compatible with
> Window binaries).

Obviously we will have to link with a different library depending
on whether we use Windows mode or Unix mode but that is not a big
problem since only a few DLL:s like CRTDLL and WINSOCK will be
"duplicated". The rest will be shared between Windows mode,
Unix mode and the emulator which BTW might link either as Windows
mode or a Unix mode application depending on which is faster.

Reply via email to