Fixing winebuild to (almost) work on Windows

Patrik Stridvall ps at
Sat Mar 9 09:39:03 CST 2002

[After a "small" (a few weeks :-) break discussing
licenses, I have started working on compiling Wine
on Windows with MSVC again.

Here comes some of the changes I had to do
that I consider non-controversial.

Note that this patch includes unistd.h as
an optional file. Many functions that
on most Unix dialects are declared in
unistd.h are on Windows declared in 
direct.h and io.h. Some of them
unfortunately have a _ in front on them.
However this is easily fixed as the patch shows.

With this patch winebuild almost work
on Windows. Only a few more minor fixes,
not submitted in this patch, is needed to
get the needed .spec file to .def conversion
working and with a few more change even the
generated .spec.c compile on work on Windows.
But this will come later if you accept this

Since Winebuild doesn't link with the protabillity
library I have copied all needed portabillity stuff
to the Winebuild directory. I have included the
same fixes for the porting library with some other
useful changes so the rest of Winelib can use it as
well. It will be needed especially str{,n}casecmp
which Windows have but under completely different
names (_str{,n}icmp).

settimeofday have been remove from the portabillity layer since
1. It can only run as root so doing SetLastError(ERROR_CALL_NOT_IMPLEMENTED)
   are not likely to hurt very much.
2. The alternative implementation doesn't work.
3. It is only used in dlls/kernel/time.c

The rest of the patch I think speaks for itself.

PS. port.diff and winebuild.diff are independant
of each other but both depend of configure.diff.


*** configure

Added some optional headers and functions
for compiling on Windows with MSVC.

*** port

* dlls/kernel/time.c,
- Better handling when settimeofday is not available
- Adding name translations for p{close,open} and 
  str{,n}casecmp if they exists under other names.

*** winebuild

* tools/winebuild/build.h,
Made winebuild (almost) compile and work on Windows.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winebuild.diff
Type: application/octet-stream
Size: 6469 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.diff
Type: application/octet-stream
Size: 942 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: port.diff
Type: application/octet-stream
Size: 4362 bytes
Desc: not available
Url :

More information about the wine-patches mailing list