gethostname prototypes [was: Re: wine's winhelp doesn't compile]

Francois Gouget fgouget at free.fr
Sun Dec 2 17:09:29 CST 2001


On Sun, 2 Dec 2001, James Juran wrote:
[...]
> We were able to work around this problem in programs/winhelp by not
> including winsock.h, but could this problem crop up anyplace else?  It
> seems that it is currently impossible to include unistd.h and winsock.h
> on a machine with glibc >= 2.2.3.


   The goal of Winelib is to be able to compile Windows application on
Linux to work with Wine. 'unistd.h' does not exist on Windows. Thus
Winelib applications do not use 'unistd.h'. And it follows that the
above problem cannot happen.

   So I think the right thing to do is simply to not use 'unistd.h' in
Winelib applications.
   If you really *must* use 'unistd.h' in a Winelib application then
there are other solutions:
 * define WINE_NOWINSOCK so that winsock2.h is not included by windows.h
 * define USE_WS_PREFIX so that the symbols defined in winsock.h will
not onflict with Unix symbols. Of course, then you may have trouble
calling these functions. But USE_WS_PREFIX is primarily intended for
applications that want to mingle unix socket calls with winsock socket
calls (like Wine) so this is quite normal.


   (Note: my newsgroup access does not work very well currently, feel
free to forward this to the newsgroup if appropriate)

--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                  Hiroshima '45 - Czernobyl '86 - Windows '95





More information about the wine-devel mailing list