Date: Mon, 2 Mar 1998 02:13:43 -0800 (PST) From: Studded <Studded@dal.net> To: freebsd-questions@FreeBSD.ORG Subject: 980301 in FreeBSD, partial success (fwd) Message-ID: <Pine.BSF.3.96.980302021234.11245A-100000@dt050ndd.san.rr.com>
next in thread | raw e-mail | index | archive | help
Here's what I sent to comp.emulators.ms-windows.wine in case
anyone's interested:
This version is going a little better than the last in the sense
that I can restart it after it crashes, but it's got numerous
incompatabilities with FreeBSD. In fact, I had to apply several patches
to even get it to compile. I have to wonder if there is anyone on the Wine
team who uses freebsd, or if it's basically going to be a linux product.
In any case, here is the diff from stock 980301. Almost all of
these are from the patches in the FreeBSD ports collection. Below is the
trace when I try to start mirc. I get the same result every time right
after I connect to a server.
diff -ur ../wine980301/configure ./configure
--- ../wine980301/configure Sun Mar 1 11:39:00 1998
+++ ./configure Sun Mar 1 23:36:49 1998
@@ -2761,6 +2761,8 @@
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+LDLIBS="$LDLIBS -lxpg4"
+
DEFS=-DHAVE_CONFIG_H
# Without the "./", some shells look in PATH for config.status.
diff -ur ../wine980301/debugger/memory.c ./debugger/memory.c
--- ../wine980301/debugger/memory.c Sun Feb 2 10:57:44 1997
+++ ./debugger/memory.c Sun Mar 1 23:36:49 1998
@@ -19,7 +19,7 @@
* write (rwflag == 0)
************************************************************/
-#ifdef linux
+#if defined(linux) || defined(__FreeBSD__)
BOOL32 DEBUG_checkmap_bad( const char *addr, size_t size, int rwflag)
{
FILE *fp;
@@ -28,6 +28,7 @@
char *start, *end;
int ret = TRUE;
+#ifdef linux
/*
The entries in /proc/self/maps are of the form:
08000000-08002000 r-xp 00000000 03:41 2361
@@ -41,12 +42,34 @@
Only permissions start and end are used here
*/
+#else
+/*
+ % cat /proc/curproc/map
+ start end resident private perm type
+ 0x1000 0xe000 12 0 r-x COW vnode
+ 0xe000 0x10000 2 2 rwx COW vnode
+ 0x10000 0x27000 4 4 rwx default
+ 0x800e000 0x800f000 1 1 rw- default
+ 0xefbde000 0xefbfe000 1 1 rwx default
+
+ COW = "copy on write"
+*/
+#endif
+
+#ifdef linux
if (!(fp = fopen("/proc/self/maps", "r")))
+#else
+ if (!(fp = fopen("/proc/curproc/map", "r")))
+#endif
return FALSE;
while (fgets( buf, 79, fp)) {
+#ifdef linux
sscanf(buf, "%x-%x %3s", (int *) &start, (int *) &end, prot);
+#else
+ sscanf(buf, "%x %x %*d %*d %3s", (int *) &start, (int *) &end, prot);
+#endif
if ( end < addr)
continue;
if (start <= addr && addr+size < end) {
diff -ur ../wine980301/debugger/stabs.c ./debugger/stabs.c
--- ../wine980301/debugger/stabs.c Sun Feb 1 10:17:43 1998
+++ ./debugger/stabs.c Sun Mar 1 23:36:47 1998
@@ -5,6 +5,7 @@
*/
#include <sys/types.h>
+#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
diff -ur ../wine980301/memory/selector.c ./memory/selector.c
--- ../wine980301/memory/selector.c Sun Mar 1 11:39:09 1998
+++ ./memory/selector.c Sun Mar 1 23:36:48 1998
@@ -13,7 +13,16 @@
#include "debug.h"
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#if __FreeBSD_version < 220000
#define FIRST_LDT_ENTRY_TO_ALLOC 17
+#else
+#define FIRST_LDT_ENTRY_TO_ALLOC 17
+#endif
+#else
+#define FIRST_LDT_ENTRY_TO_ALLOC 6
+#endif
/***********************************************************************
diff -ur ../wine980301/memory/virtual.c ./memory/virtual.c
--- ../wine980301/memory/virtual.c Sun Mar 1 11:39:10 1998
+++ ./memory/virtual.c Sun Mar 1 23:36:48 1998
@@ -1097,6 +1097,9 @@
{
SetLastError( ERROR_INVALID_PARAMETER );
goto error;
+#ifndef MS_SYNC
+#define MS_SYNC 0
+#endif MS_SYNC
}
flags = MAP_SHARED;
/* fall through */
diff -ur ../wine980301/multimedia/midi.c ./multimedia/midi.c
--- ../wine980301/multimedia/midi.c Sun Mar 1 11:39:13 1998
+++ ./multimedia/midi.c Sun Mar 1 23:36:48 1998
@@ -11,6 +11,10 @@
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
+#ifdef __FreeBSD__
+#include <string.h>
+#include <sys/errno.h>
+#endif
#include <sys/ioctl.h>
#include "windows.h"
#include "ldt.h"
diff -ur ../wine980301/win32/init.c ./win32/init.c
--- ../wine980301/win32/init.c Sun Mar 1 11:39:23 1998
+++ ./win32/init.c Mon Mar 2 01:19:48 1998
@@ -82,7 +82,7 @@
char *name;
name=getlogin();
- if (!name) name=cuserid(NULL);
+ if (!name) name='U';
len = name ? strlen(name) : 0;
if (!len || !lpSize || len > *lpSize) {
if (lpszName) *lpszName = 0;
diff -ur ../wine980301/windows/dialog.c ./windows/dialog.c
--- ../wine980301/windows/dialog.c Sun Mar 1 11:39:26 1998
+++ ./windows/dialog.c Sun Mar 1 23:36:47 1998
@@ -9,6 +9,9 @@
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
+#ifdef __FreeBSD__
+#include <sys/errno.h>
+#endif
#include <string.h>
#include <errno.h>
#include "windows.h"
23# wine -winver win31 mirc.exe
Could not stat /mnt/cdrom, ignoring drive D:
Warning: profile file C:\WINAPPS\MIRC\WINE\mirclink.ini not found
edit: EM_FMTLINES: message not implemented
Segmentation fault in 32-bit code (0x000ca1e4).
Loading symbols: Reading symbols from file /usr/local/wine/wine.sym
CTL3DV2 WIN87EM SHELL MMSYSTEM DDEML KEYBOARD COMMDLG WINSOCK mIRC
WINDEBUG WPROCS SYSTEM GDI USER KERNEL
<I think this "32 bit mode" is odd given the -winver flag above and the
fact that I'm running 16bit mirc>
In 32 bit mode.
Register dump:
CS:001f SS:0027 DS:0027 ES:0027 FS:0a17 GS:0027
EIP:000ca1e4 ESP:208d1000 EBP:208d1004 EFLAGS:00010246
EAX:00000174 EBX:206a0ac2 ECX:00091cc4 EDX:209c0bfa
ESI:0009274f EDI:209cfe4c
Stack dump:
0x208d1000 (_end+0x20689e28): *** Invalid address 0x208d1000
(_end+0x20689e28)
Backtrace:
=>0 0x000ca1e4 (_WSACancelAsyncRequest16+0x8)
1 0x000ca1e9 (_WSACancelAsyncRequest16+0xd)
2 0x000ca1e9 (_WSACancelAsyncRequest16+0xd)
3 0x000ca1e9 (_WSACancelAsyncRequest16+0xd)
4 0x000ca1e9 (_WSACancelAsyncRequest16+0xd)
5 0x000ca1e9 (_WSACancelAsyncRequest16+0xd)
... and as many of these as I let go till I hit ^C.
I'll be happy to work with anyone interested in providing patches,
etc.
Thanks,
Doug
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980302021234.11245A-100000>
