Patches for FreeBSD 5.x compilation

Steve Kargl sgk at troutmask.apl.washington.edu
Mon Nov 19 13:42:47 CST 2001


On Mon, Nov 19, 2001 at 10:52:24AM -0800, Alexandre Julliard wrote:
> Steve Kargl <sgk at troutmask.apl.washington.edu> writes:
> 
> > FreeBSD isn't polluting the namespace.  <sys/user.h> is a
> > a non-standard header file.
> 
> It's still made available to applications, and there is really no
> reason for exporting internal kernel names this way. At least it could
> be renamed or put inside #ifdef _KERNEL.
> 
> The alternative is of course to avoid sys/user.h, or play with
> #defines on the Wine side; but prefixing our structures with wine_ is
> not a solution.
> 

What does wine need from <sys/user.h>?  I've deleted inclusion
of that header in server/context_i386.c, and wine builds and runs
on FreeBSD 5.x.  I haven't tested this on earlier versions of
FreeBSD, and of course, I haven't tested this on other OS's.

I recall that you're not fond of OS specific #ifdefs.

#ifdef HAVE_SYS_USER_H
# ifndef __FreeBSD__
#  include <sys/user.h>
# endif 
#endif

Note, I've also posted to the FreeBSD-current mailing list about
this conflict.  Some developers have suggested the #ifdef _KERNEL
protection you mention, and I suspect that this will be 
implemented at some point in the future.  The stumbling block
is that certain system utilities (gdb, ps, ptrace, etc.) need
access to struct proc, which uses struct thread.  Until these
utilities are updated, I doubt the #ifdef _KERNEL will be
used.

I suspect that most people build wine from the FreeBSD Ports
Collection.  Perhaps, it is best to let the FreeBSD porters
worry about this problem until FreeBSD 5.x settles down.

-- 
Steve




More information about the wine-devel mailing list