Subject: Re: Updated Wine pkgsrc entry (finally) available
To: Johnny Lam <jlam@jgrind.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 01/31/2002 10:38:55
On Thu, 31 Jan 2002, Johnny Lam wrote:

> I'm having a new problem.  I can't build "regapi", the registry-editting
> program for Wine that is executed by the wineinstall script.  Running
> "gmake" in ${WRKSRC}/programs/regapi yields (lines wrapped for clarity):
>
> cc -c -I. -I. -I../../include -I../../include
> 	-I/usr/pkgsrc/scratch/wine/work/.buildlink/include -O2
> 	-mcpu=pentiumpro -I/usr/pkg/share/x11-links/include -Wall
> 	-mpreferred-stack-boundary=2 -fPIC -DSTRICT -DNONAMELESSUNION
> 	-DNONAMELESSSTRUCT  -D_REENTRANT -I/usr/pkg/share/x11-links/include
> 	-o regapi.o regapi.c
> In file included from ../../include/winsock2.h:30,
>                  from ../../include/windows.h:39,
>                  from regapi.c:12:
> ../../include/winsock.h:905: parse error before `('
> ../../include/winsock.h:905: parse error before `)'
> ../../include/winsock.h:906: parse error before `('
> ../../include/winsock.h:906: parse error before `)'
> ../../include/winsock.h:911: parse error before `('
> ../../include/winsock.h:911: parse error before `)'
> ../../include/winsock.h:912: parse error before `('
> ../../include/winsock.h:912: parse error before `)'
> gmake: *** [regapi.o] Error 1

I needed the following to build on 1.5.3_ALPHA (among other things):

Index: include/winsock.h
===================================================================
RCS file: /home/wine/wine/include/winsock.h,v
retrieving revision 1.38
diff -u -r1.38 winsock.h
--- include/winsock.h   2001/12/14 22:48:38     1.38
+++ include/winsock.h   2002/01/25 13:50:32
@@ -902,14 +902,18 @@
 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*);
+#if !defined(__NetBSD__) && !defined(__WINE_USE_MSVCRT)
 u_long WINAPI WS(htonl)(u_long);
 u_short WINAPI WS(htons)(u_short);
+#endif
 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);
+#if !defined(__NetBSD__) && !defined(__WINE_USE_MSVCRT)
 u_long WINAPI WS(ntohl)(u_long);
 u_short WINAPI WS(ntohs)(u_short);
+#endif
 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);


Frederick