The following change to include/winsock.h
revision 1.59 date: 2003/06/04 20:15:39; author: julliard; state: Exp; lines: +1 -0 Yorick Hardy yh@metroweb.co.za Include sys/time.h for struct timeval definition.
causes compilation failure of programs/notepad:
/sw/gcc-3.2.2/bin/gcc -c -I. -I. -I../../include -I../../include -I../../include/msvcrt -D_REENTRANT -fPIC -DNO_LIBWINE_PORT -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o License_En.o License_En.c In file included from ../../include/winsock.h:68, from ../../include/winsock2.h:47, from ../../include/windows.h:62, from License_En.c:1: /usr/include/sys/time.h:135: parse error before "__P" /usr/include/sys/time.h:136: parse error before "__P" /usr/include/sys/time.h:140: parse error before "timecounter_get_t"
The problem is that by virtue of -I../../include/msvcrt in programs/notepad/Makefile, the statement #include <sys/types.h> in line 67 of include/winsock.h actually includes the file include/msvcrt/sys/types.h, which does not to define __P which the FreeBSD system header which then gets pulled in by means of #include <sys/time.h> in line 68 of include/winsock.h.
So, with this nice analysis ;-), is anybody going to fix this?
Gerald
Gerald,
I guess I broke it, so I should fix it :-). I cannot see that it would work, but would you mind first trying to include <time.h> instead of <sys/time.h> as pointed out by
http://www.winehq.org/hypermail/wine-devel/2003/05/0732.html
I will try to figure out another solution, but nothing comes to mind immediately.
Best regards,
Yorick.
On Sat, Jun 07, 2003 at 12:05:09AM +0200, Gerald Pfeifer wrote:
The following change to include/winsock.h
revision 1.59 date: 2003/06/04 20:15:39; author: julliard; state: Exp; lines: +1 -0 Yorick Hardy yh@metroweb.co.za Include sys/time.h for struct timeval definition.
causes compilation failure of programs/notepad:
/sw/gcc-3.2.2/bin/gcc -c -I. -I. -I../../include -I../../include -I../../include/msvcrt -D_REENTRANT -fPIC -DNO_LIBWINE_PORT -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o License_En.o License_En.c In file included from ../../include/winsock.h:68, from ../../include/winsock2.h:47, from ../../include/windows.h:62, from License_En.c:1: /usr/include/sys/time.h:135: parse error before "__P" /usr/include/sys/time.h:136: parse error before "__P" /usr/include/sys/time.h:140: parse error before "timecounter_get_t"
The problem is that by virtue of -I../../include/msvcrt in programs/notepad/Makefile, the statement #include <sys/types.h> in line 67 of include/winsock.h actually includes the file include/msvcrt/sys/types.h, which does not to define __P which the FreeBSD system header which then gets pulled in by means of #include <sys/time.h> in line 68 of include/winsock.h.
So, with this nice analysis ;-), is anybody going to fix this?
Gerald
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.pfeifer.com/gerald/
On Sat, 7 Jun 2003, Yorick Hardy wrote:
I guess I broke it, so I should fix it :-). I cannot see that it would work, but would you mind first trying to include <time.h> instead of <sys/time.h> as pointed out by
http://www.winehq.org/hypermail/wine-devel/2003/05/0732.html
Both including <time.h> and simple removing that #include statement from include/winsock.h solve this problem for me (on FreeBSD 4.8).
I will try to figure out another solution, but nothing comes to mind immediately.
My intuition is that either the addition of #include <sys/time.h> needs to reverted or a dummy include/msvcrt/sys/time.h needs to be added, as these are the only two ways of avoiding mixture of the MSVCRT sys/types.h with the native systems sys/time.h.
(Or -I../../include/msvcrt should be removed when compiling programs/notepad, but I'm afraid that's not right either.)
Gerald
On Sat, Jun 07, 2003 at 02:39:57PM +0200, Gerald Pfeifer wrote: Gerald,
Then I think we should use <time.h> - removing the include statement altogether will break compiling on NetBSD again.
(Unless of course someone else suggests a better solution)
Best regards,