patch for libs/wine/mmap.c making wine running on FreeBSD 5.x

jean-marc DETREZ jm.detrez at cegetel.net
Thu Jul 28 14:31:39 CDT 2005


Perhaps i found the begin of an explanation, in NetBSD and linux , error
codes for mincore() are :  
     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

     [EINVAL]           len is equal to 0.

     [ENOMEM]           The address range specified is invalid for the
calling process, or one or more of the pages specified in the range are not
mapped                 

So I think that when you call mincore for testing if a page is mapped or not
the result would be -1 and errno set to ENOMEM.


But in FreeBSD a man mincore give this errors conditions:

     [EFAULT]           vec points to an illegal address.

     [EINVAL]           addr is not a multiple of the system page size.

It seems that when a page is not mapped mincore return no error code.


-----Message d'origine-----
De : julliard at wine.dyndns.org [mailto:julliard at wine.dyndns.org] De la part
de Alexandre Julliard
Envoyé : jeudi 28 juillet 2005 11:48
À : jean-marc DETREZ
Cc : wine-devel at winehq.com; emulation at freebsd.org; 'Gerald Pfeifer';
barner at freebsd.org
Objet : Re: patch for libs/wine/mmap.c making wine running on FreeBSD 5.x

"jean-marc DETREZ" <jm.detrez at cegetel.net> writes:

>   I made a little correction of  "try_mmap_fixed" because it's seems to me
> that the function didn't really test the result (vec).

That's the way it should be, we don't care if the page is in core or
not, we only want to know if something is mapped there.

-- 
Alexandre Julliard
julliard at winehq.org






More information about the wine-devel mailing list