> I tried to run Borland C++ 5.02 under Wine... some problems with
> installing (had to press Control a couple of times at each dialog box to
> make them show up), but I finally got it in, it started, so I tried to
> compile something... but no go...
>
> "Fatal: Failed to create map file H:/dev/wine/libtest/guitest.ilf (error code 87)"
>
> So I made a relay log, where I found this piece:
>
> Call kernel32.158: CreateFileA(428e5eb8
>"guitest.ilf",c0000000,00000001,00000000,00000004,00000080,00000000) ret=4290f967
>fs=057f
> Ret kernel32.158: CreateFileA() retval=00000134 ret=4290f967 fs=057f
> Call kernel32.333: GetFullPathNameA(428e5eb8
>"guitest.ilf",00000104,428e5558,428e565c) ret=4290fd1b fs=057f
> Ret kernel32.333: GetFullPathNameA() retval=0000001f ret=4290fd1b fs=057f
> Call kernel32.330: GetFileSize(00000134,00000000) ret=4290f943 fs=057f
> Ret kernel32.330: GetFileSize() retval=00000000 ret=4290f943 fs=057f
> Call kernel32.159:
>CreateFileMappingA(00000134,00000000,00000004,00000000,00010000,428e5558
>"H:/dev/wine/libtest/guitest.ilf") ret=4290f9fa fs=057f
> Ret kernel32.159: CreateFileMappingA() retval=00000138 ret=4290f9fa fs=057f
> Call kernel32.526:
>MapViewOfFileEx(00000138,000f001f,00000000,00000000,00010000,d0000000) ret=4290fa2f
>fs=057f
> Ret kernel32.526: MapViewOfFileEx() retval=00000000 ret=4290fa2f fs=057f
> Call kernel32.706: UnmapViewOfFile(00000000) ret=4290fa39 fs=057f
> Ret kernel32.706: UnmapViewOfFile() retval=00000000 ret=4290fa39 fs=057f
> Call kernel32.137: CloseHandle(00000138) ret=4290fa44 fs=057f
> Ret kernel32.137: CloseHandle() retval=00000001 ret=4290fa44 fs=057f
> Call kernel32.340: GetLastError() ret=4290fd64 fs=057f
> Ret kernel32.340: GetLastError() retval=00000057 ret=4290fd64 fs=057f
Some months I've added this snippet to memory/virtual.c:
/* Map the file */
TRACE("handle=%x size=%x offset=%lx\n", handle, size, offset_low );
ptr = (UINT)FILE_dommap( unix_handle, addr, 0, size, 0, offset_low,
VIRTUAL_GetUnixProt( prot ), flags );
if (ptr == (UINT)-1) {
/* KB: Q125713, 25-SEP-1995, "Common File Mapping Problems and
* Platform Differences":
* Windows NT: ERROR_INVALID_PARAMETER
* Windows 95: ERROR_INVALID_ADDRESS.
* FIXME: So should we add a module dependend check here? -MM
*/
if (errno==ENOMEM)
SetLastError( ERROR_OUTOFMEMORY );
else
SetLastError( ERROR_INVALID_PARAMETER );
goto error;
}
You might want to try exchanging _INVALID_PARAMETER by _INVALID_ADDRESS.
Ciao, Marcus