Forte C doesn't like .short in asm code

Gregg Mattinson gm138242 at scot.canada.sun.com
Fri Jul 12 09:23:53 CDT 2002


ChangeLog: tools/winebuild/build.h tools/winebuild/spec32.c
 - Replaced .short with .half when Forte C is used.

Gregg Mattinson
Co-op Developer
Sun Microsystems of Canada

-------------- next part --------------
Index: tools/winebuild/build.h
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/build.h,v
retrieving revision 1.2
diff -u -r1.2 build.h
--- /tmp/T0zraOPW	Thu Jul 11 14:24:21 2002
+++ build.h	Thu Jul 11 11:59:31 2002
@@ -43,6 +43,12 @@
 # define STRING ".ascii"
 #endif
 
+#ifdef __SUNPRO_C
+# define SHORT  ".half"
+#else
+# define SHORT  ".short"
+#endif
+
 typedef enum
 {
     TYPE_VARIABLE,     /* variable */
Index: tools/winebuild/spec32.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/spec32.c,v
retrieving revision 1.2
diff -u -r1.2 spec32.c
--- /tmp/T0rMai9W       Fri Jul 12 09:53:18 2002
+++ spec32.c    Fri Jul 12 09:51:20 2002
@@ -208,10 +208,14 @@
 
         /* output the function names */
 
-        fprintf( outfile, "    \"\\t.text 1\\n\"\n" );
+        fprintf( outfile, "    \"\\t.text\\n\"\n" );
         fprintf( outfile, "    \"__wine_spec_exp_names:\\n\"\n" );
         for (i = 0; i < nb_names; i++)
+#ifdef __SUNPRO_C
+            fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\\0\\\"\\n\"\n", Names[i]->name );
+#else
             fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\"\\n\"\n", Names[i]->name );
+#endif
         fprintf( outfile, "    \"\\t.data\\n\"\n" );
 
         /* output the function ordinals */
@@ -219,12 +223,12 @@
         fprintf( outfile, "    \"__wine_spec_exp_ordinals:\\n\"\n" );
         for (i = 0; i < nb_names; i++)
         {
-            fprintf( outfile, "    \"\\t.short %d\\n\"\n", Names[i]->ordinal - Base );
+            fprintf( outfile, "    \"\\t" SHORT " %d\\n\"\n", Names[i]->ordinal - Base );
         }
         total_size += nb_names * sizeof(short);
         if (nb_names % 2)
         {
-            fprintf( outfile, "    \"\\t.short 0\\n\"\n" );
+            fprintf( outfile, "    \"\\t" SHORT " 0\\n\"\n" );
             total_size += sizeof(short);
         }
     }
@@ -238,7 +242,11 @@
         {
             ORDDEF *odp = Ordinals[i];
             if (odp && odp->type == TYPE_FORWARD)
+#ifdef __SUNPRO_C
+                fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\\0\\\"\\n\"\n", odp->link_name );
+#else
                 fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\"\\n\"\n", odp->link_name );
+#endif
         }
         fprintf( outfile, "    \"\\t.align %d\\n\"\n", get_alignment(4) );
         total_size += (fwd_size + 3) & ~3;
@@ -286,7 +294,7 @@
             case TYPE_CDECL:
                 fprintf( outfile, "    \"\\tjmp " PREFIX "%s\\n\"\n", name );
                 fprintf( outfile, "    \"\\tret\\n\"\n" );
-                fprintf( outfile, "    \"\\t.short 0x%04x\\n\"\n", args );
+                fprintf( outfile, "    \"\\t" SHORT " 0x%04x\\n\"\n", args );
                 fprintf( outfile, "    \"\\t.long " PREFIX "%s,0x%08x\\n\"\n", name, mask );
                 break;
             default:


More information about the wine-patches mailing list