Jump to content

Darwine for 10.4.3


7 posts in this topic

Recommended Posts

  • 2 months later...
If any one could compile Darwine for the 10.4.3 it would be great :happymac:

 

As much as it worked in 10.4.1 it was great.

 

SO please please someone compile it :D:)

I was stop at the same point. Has somebody an idea what the function is for?

 

What happens when it's comment in the source?

Link to comment
Share on other sites

has anyone got this working for 10.4.3, if not what are the complications.

 

Umm... in case you missed my previous post -- one of the patches to darwine that made it work uses calls from user_ldt.h. This requires the most brand-spanking-new Xcode, which is for 8g1165. You can install this xcode on 8f111, but some of the functions are not actually there in the system libraries -- libsystem. B etc. You could probably make it work on 8f1111 by making direct calls to xnu, but those calls aren't guaranteed to be the same between releases of the kernel. In fact, I suspect this is how WINE was made to work on 10.4.1 x86 but did not work on subsequent builds.

 

So the two options are:

1. wait for 10.4.4

2. come up with some patches to substitute for user_ldt functionality by using machdep calls.

 

I personally think (1) is the better option, because (2) will create a version that will probably only work on 10.4.3, whereas the current darwine should work on 10.4.4 and beyond.

 

 

 

Here's the relevant parts of the patch:

 

/*

diff -ru wine-0.9.6/libs/wine/ldt.c wine-0.9.6.gavers/libs/wine/ldt.c

--- wine-0.9.6/libs/wine/ldt.c 2006-01-19 06:14:30.000000000 -0800

+++ wine-0.9.6.gavers/libs/wine/ldt.c 2006-01-22 00:54:29.000000000 -0800

@@ -116,7 +116,12 @@

extern int i386_set_ldt(int, union descriptor *, int);

#endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */

 

+#ifdef __darwin__

+#include <i386/user_ldt.h>

+#endif /* __darwin__ */

+

#ifdef __APPLE__

+#ifndef __darwin__

 

static inline int thread_set_user_ldt( const void *addr, unsigned int size, unsigned int flags )

{

@@ -132,6 +137,7 @@

return ret;

}

 

+#endif /* __darwin__ */

#endif /* __APPLE__ */

 

#endif /* __i386__ */

@@ -217,7 +223,7 @@

if ((ret = modify_ldt(0x11, &ldt_info, sizeof(ldt_info))) < 0)

perror( "modify_ldt" );

}

-#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)

+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__darwin__)

{

LDT_ENTRY entry_copy = *entry;

/* The kernel will only let us set LDTs with user priority level */

@@ -424,9 +430,11 @@

}

else global_fs_sel = (ldt_info.entry_number << 3) | 3;

#elif defined(__APPLE__)

+#ifndef __darwin__

int ret = thread_set_user_ldt( NULL, 0, 0 );

if (ret != -1) global_fs_sel = ret;

else global_fs_sel = 0;

+#endif /* __darwin__ */

#endif /* __APPLE__ */

}

if (global_fs_sel > 0) return global_fs_sel;

@@ -454,9 +462,11 @@

fill_modify_ldt_struct( &ldt_info, entry );

if ((ret = set_thread_area( &ldt_info ) < 0)) perror( "set_thread_area" );

#elif defined(__APPLE__)

+#ifndef __darwin__

int ret = thread_set_user_ldt( wine_ldt_get_base(entry), wine_ldt_get_limit(entry), 0 );

if (ret == -1) perror( "thread_set_user_ldt" );

else assert( ret == global_fs_sel );

+#endif /* __darwin__ */

#endif /* __APPLE__ */

}

else /* LDT selector */

Link to comment
Share on other sites

  • 4 weeks later...
 Share

×
×
  • Create New...