浏览代码

Solaris 9/x86 seems to have a #define for SP somewhere in the system includes, so replace SP with SPTR

Ralf S. Engelschall 22 年之前
父节点
当前提交
8e3f2770e7
共有 2 个文件被更改,包括 24 次插入1 次删除
  1. 23 0
      unrar/unrar.patch
  2. 1 1
      unrar/unrar.spec

+ 23 - 0
unrar/unrar.patch

@@ -16,3 +16,26 @@
  
  
  
  
  #endif
  #endif
+--- rarvm.cpp.orig	2003-05-15 10:37:58.000000000 +0200
++++ rarvm.cpp	2003-07-28 14:36:01.000000000 +0200
+@@ -376,16 +376,16 @@
+       case VM_PUSHA:
+         {
+           const int RegCount=sizeof(R)/sizeof(R[0]);
+-          for (int I=0,SP=R[7]-4;I<RegCount;I++,SP-=4)
+-            SET_VALUE(false,(uint *)&Mem[SP & VM_MEMMASK],R[I]);
++          for (int I=0,SPTR=R[7]-4;I<RegCount;I++,SPTR-=4)
++            SET_VALUE(false,(uint *)&Mem[SPTR & VM_MEMMASK],R[I]);
+           R[7]-=RegCount*4;
+         }
+         break;
+       case VM_POPA:
+         {
+           const int RegCount=sizeof(R)/sizeof(R[0]);
+-          for (uint I=0,SP=R[7];I<RegCount;I++,SP+=4)
+-            R[7-I]=GET_VALUE(false,(uint *)&Mem[SP & VM_MEMMASK]);
++          for (uint I=0,SPTR=R[7];I<RegCount;I++,SPTR+=4)
++            R[7-I]=GET_VALUE(false,(uint *)&Mem[SPTR & VM_MEMMASK]);
+         }
+         break;
+       case VM_PUSHF:

+ 1 - 1
unrar/unrar.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
 Group:        Archiver
 Group:        Archiver
 License:      freely distributable
 License:      freely distributable
 Version:      3.2.2
 Version:      3.2.2
-Release:      20030612
+Release:      20030728
 
 
 #   list of sources
 #   list of sources
 Source0:      http://files10.rarlab.com/rar/unrarsrc-%{version}.tar.gz
 Source0:      http://files10.rarlab.com/rar/unrarsrc-%{version}.tar.gz