Subject: winex/miscemu main.c,1.6,1.7 preloader.c,1.13,1.14Update of /var/lib/cvsd/cvsroot/winex/miscemu
In directory agravaine:/tmp/cvs-serv4404/miscemu
Modified Files:
main.c preloader.c
Log Message:
Merge branch into mainline.
Index: main.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/miscemu/main.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- main.c 5 Mar 2005 00:39:55 -0000 1.6
+++ main.c 30 Mar 2007 18:27:30 -0000 1.7
@@ -18,11 +18,36 @@
#include "wine/main.h"
#include "wine/server.h"
+#ifdef __APPLE__
+/* define to help out debugging MacOSX libraries
+#define DEBUG_MACOSX_LIBRARIES
+*/
+
+/* Deal with preloader equivalent stuff on the Mac. This has to be done in conjunction with some
+small magic in the linker line for the main wine executable to create the reserved area at load time */
+asm("\t.zerofill WINE, WINE_RESERVED, _wine_reserved_area, 0x10000000\n");
+
+#define SHMSERVER_ADDR 0xB0000000
+#define SHMSERVER_SIZE (1024 * 1024 * 10)
+
+static struct wine_preload_info preload_info[] =
+{
+ { (void *)0x00000000, 0x00110000, 0 }, /* DOS area */
+ { (void *)0x80000000, 0x01000000, 0 }, /* shared heap */
+ { (void *)0x00110000, 0x0fef0000, 0 }, /* default PE exe range (note, WINEPRELOADRESERVE env var not supported on the Mac) */
+ { (void *)SHMSERVER_ADDR, SHMSERVER_SIZE, PRELOAD_INFO_SERVERADDR }, /* shared memory server */
+ { 0, 0, PRELOAD_INFO_NULL } /* end of list */
+};
+const struct wine_preload_info *wine_main_preload_info = preload_info;
+
+#else
/* this symbol is exported.
* The preloader will locate it and set it to point to
* a NULL terminated list of mmap reserved areas.
*/
const struct wine_preload_info *wine_main_preload_info = NULL;
+#endif
+
static char main_exe_name[MAX_PATH];
static HANDLE main_exe_file;
@@ -91,12 +116,24 @@
ExitProcess( 0 );
}
+#ifdef DEBUG_MACOSX_LIBRARIES
+/* Helpful for debugging Mac OS X library issues */
+void addimage_func(const struct mach_header *mh, unsigned long vmaddr_slide)
+{
+ fprintf(stderr, "addimage_func> image %p loaded\n", mh);
+}
+#endif
+
#define SYSCALL_RET(ret) (((ret) < 0 && (ret) > -4096) ? -1 : (ret))
/**********************************************************************
* main
*/
+#if defined ( USE_ALTERNATE_MAIN_FOR_SDLDRV )
+int normal_main( int argc, char *argv[] )
+#else
int main( int argc, char *argv[] )
+#endif
{
if (wine_main_preload_info)
{
Index: preloader.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/miscemu/preloader.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- preloader.c 27 Mar 2007 20:26:31 -0000 1.13
+++ preloader.c 30 Mar 2007 18:27:30 -0000 1.14
@@ -120,7 +120,12 @@
#define MAP_NORESERVE 0
#endif
+#ifdef __APPLE__
+#define SHMSERVER_ADDR 0xB0000000
+#else
#define SHMSERVER_ADDR 0x90000000
+#endif
+
#define SHMSERVER_SIZE (1024 * 1024 * 10)
/* even though we default to reserving 10mb, not all will be (necessary) used...
* and the reserve will be deleted just before allocation.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.