Patches for FreeBSD 5.x compilation

Francois Gouget fgouget at free.fr
Sun Nov 18 15:40:17 CST 2001


On Sun, 18 Nov 2001, Steve Kargl wrote:

> The following patches are required to compile
> the latest wine sources on FreeBSD 5.x.

   Note, I have a patch that I think should fix this compilation
problem. I sent it on the 15th but it got loast without a trace so I
resent it today (search for 'Solaris and FreeBSD compilation fixes
(fwd)').


> Index: wine/dlls/wsock32/socket.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/wsock32/socket.c,v
> retrieving revision 1.16
> diff -u -r1.16 socket.c
> --- wine/dlls/wsock32/socket.c	2001/11/14 21:26:23	1.16
> +++ wine/dlls/wsock32/socket.c	2001/11/18 18:42:14
> @@ -42,6 +42,7 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <unistd.h>
> +#include <sys/socket.h>
>  #ifdef HAVE_SYS_SOCKIO_H
>  # include <sys/sockio.h>
>  #endif

   This should have a #ifdef HAVE_SYS_SOCKET_H around it. See my patch.


> Index: wine/include/winsock.h
> ===================================================================
> RCS file: /home/wine/wine/include/winsock.h,v
> retrieving revision 1.37
> diff -u -r1.37 winsock.h
> --- wine/include/winsock.h	2001/11/14 21:26:24	1.37
> +++ wine/include/winsock.h	2001/11/18 18:42:17
> @@ -894,14 +894,10 @@
>  struct WS(servent)* WINAPI WS(getservbyport)(int,const char*);
>  int WINAPI WS(getsockname)(SOCKET,struct WS(sockaddr)*,int*);
>  int WINAPI WS(getsockopt)(SOCKET,int,int,char*,int*);
> -u_long WINAPI WS(htonl)(u_long);
> -u_short WINAPI WS(htons)(u_short);
>  unsigned long WINAPI WS(inet_addr)(const char*);
>  char* WINAPI WS(inet_ntoa)(struct WS(in_addr));
>  int WINAPI WS(ioctlsocket)(SOCKET,long,u_long*);
>  int WINAPI WS(listen)(SOCKET,int);
> -u_long WINAPI WS(ntohl)(u_long);
> -u_short WINAPI WS(ntohs)(u_short);
>  int WINAPI WS(recv)(SOCKET,char*,int,int);
>  int WINAPI WS(recvfrom)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
>  int WINAPI WS(send)(SOCKET,const char*,int,int);

   This will break Winelib. I guess this was to fix the compilation
errors in 'server/trace.c'. In that case I think a better solution is
to not include 'winsock2.h' at all in server/trace.c since it appears to
no longer be needed.


> Index: wine/server/context_i386.c
> ===================================================================
> RCS file: /home/wine/wine/server/context_i386.c,v
> retrieving revision 1.18
> diff -u -r1.18 context_i386.c
> --- wine/server/context_i386.c	2001/07/11 17:30:59	1.18
> +++ wine/server/context_i386.c	2001/11/18 18:42:55
> @@ -20,9 +20,6 @@
>  #ifdef HAVE_SYS_PARAM_H
>  # include <sys/param.h>
>  #endif
> -#ifdef HAVE_SYS_USER_H
> -# include <sys/user.h>
> -#endif


   What is the problem with 'sys/user.h' ?


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
           Demander si un ordinateur peut penser revient à demander
                          si un sous-marin peut nager.





More information about the wine-devel mailing list