yozh Posted December 3, 2005 Share Posted December 3, 2005 If any one could compile Darwine for the 10.4.3 it would be great As much as it worked in 10.4.1 it was great. SO please please someone compile it Link to comment Share on other sites More sharing options...
unixguru Posted February 9, 2006 Share Posted February 9, 2006 One of the recent patches requires user_ldt.h. The functions this file calls are not in 10.4.3 (libSystem.. So I'm not sure what could be done. I was thinking it'd probably have to wait for 10.4.4. Link to comment Share on other sites More sharing options...
klaus41542 Posted February 9, 2006 Share Posted February 9, 2006 If any one could compile Darwine for the 10.4.3 it would be great As much as it worked in 10.4.1 it was great. SO please please someone compile it 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 More sharing options...
Templeton Peck Posted February 9, 2006 Share Posted February 9, 2006 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? Comment it out and see what happens. Have to go now, I'll mess around with it later. Link to comment Share on other sites More sharing options...
zfire89 Posted February 10, 2006 Share Posted February 10, 2006 has anyone got this working for 10.4.3, if not what are the complications. Link to comment Share on other sites More sharing options...
unixguru Posted February 11, 2006 Share Posted February 11, 2006 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 More sharing options...
karosa Posted March 9, 2006 Share Posted March 9, 2006 Only place I found user_ldt is in the XNU sources.. they're not in XCode 2.2 either, could you tell me which xcode package they should be in? Link to comment Share on other sites More sharing options...
Recommended Posts