CVS: winex/tools/winebuild build.h, 1.8, 1.9 relay.c, 1.11, 1.12 spec32.c, 1.18, 1.19

[email protected]
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/tools/winebuild build.h,1.8,1.9 relay.c,1.11,1.12 spec32.c,1.18,1.19Update of /var/lib/cvsd/cvsroot/winex/tools/winebuild
In directory agravaine:/tmp/cvs-serv22788/tools/winebuild

Modified Files:
	build.h relay.c spec32.c 
Log Message:

- various changes & configure checks to build on Leopard (MacOS X 10.5)


Index: build.h
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/tools/winebuild/build.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- build.h	28 Mar 2007 14:34:37 -0000	1.8
+++ build.h	27 Jun 2007 11:55:47 -0000	1.9
@@ -64,10 +64,12 @@
 # define __ASM_NAME(name) name
 #endif
 
-#ifdef NEED_TYPE_IN_DEF
+#ifdef TYPE_ASM_SUPPORTED
+# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
+#elif defined(NEED_TYPE_IN_DEF)
 # define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
 #else
-# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
+# define __ASM_FUNC(name)
 #endif
 
 #ifdef NEED_UNDERSCORE_PREFIX

Index: relay.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/tools/winebuild/relay.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- relay.c	29 Mar 2007 13:57:19 -0000	1.11
+++ relay.c	27 Jun 2007 11:55:47 -0000	1.12
@@ -25,10 +25,10 @@
 #ifdef USE_STABS
     fprintf( outfile, "\t.stabs \"%s:F1\",36,0,0," PREFIX "%s\n", name, name);
 #endif
-#ifdef NEED_TYPE_IN_DEF
-    fprintf( outfile, "\t.def " PREFIX "%s; .scl 2; .type 32; .endef\n", name );
-#else
+#ifdef TYPE_ASM_SUPPORTED
     fprintf( outfile, "\t.type " PREFIX "%s,@function\n", name );
+#elif defined(NEED_TYPE_IN_DEF)
+    fprintf( outfile, "\t.def " PREFIX "%s; .scl 2; .type 32; .endef\n", name );
 #endif
     fprintf( outfile, "\t.globl " PREFIX "%s\n", name );
     fprintf( outfile, PREFIX "%s:\n", name );

Index: spec32.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/tools/winebuild/spec32.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- spec32.c	30 Mar 2007 20:26:06 -0000	1.18
+++ spec32.c	27 Jun 2007 11:55:47 -0000	1.19
@@ -415,13 +415,19 @@
 #if defined(__APPLE__)
 		 "    \".data\\n\\t\"\n"
 #endif
-                 "    \"" __ASM_FUNC("%s") "\\n\\t\"\n"
+                 "    \"" __ASM_FUNC("%s") "\\n\\t\"\n",
+                 get_alignment(4), name);
+
+        /* This is done as two separate print statements because, on
+           Leopard, __ASM_FUNC() resolves to nothing; thus the
+           %s gets lost and any subsequent parameters would be
+           shifted down by one */
+        fprintf( outfile,
                  "    \"" PREFIX "%s:\\n\\t\"\n"
                  "    \"call " PREFIX "__wine_call_from_32_regs\\n\\t\"\n"
                  "    \".long " PREFIX "%s\\n\\t\"\n"
                  "    \".byte %d,%d\");\n",
-                 get_alignment(4),
-                 name, name, odp->link_name,
+                 name, odp->link_name,
                  strlen(odp->u.func.arg_types) * sizeof(int),
                  (odp->type == TYPE_CDECL) ? 0 : (strlen(odp->u.func.arg_types) * sizeof(int)) );
     }
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.