Fixing winebuild to (almost) work on Windows

Steven Edwards Steven_Ed4153 at
Sat Mar 9 13:30:52 CST 2002

I was able to get it to compile but not work on mingw. Did you build
libwine_unicode as a dll for windows? I think it is needed for winebuild
and wrc. How are you working with the resource files under MSVC, does it
support wine resources? Currently windress pukes for me and I've had to
use binary resources in our port. When I get back from wineconf I will
try to put wrc again.


-----Original Message-----
From: wine-patches-admin at
[mailto:wine-patches-admin at] On Behalf Of Patrik Stridvall
Sent: Saturday, March 09, 2002 10:39 AM
To: Wine-Patches (E-mail)
Subject: Fixing winebuild to (almost) work on Windows

[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.

Do You Yahoo!?
Get your free address at

More information about the wine-devel mailing list