ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/macos_util.cpp
(Generate patch)

Comparing SheepShaver/src/macos_util.cpp (file contents):
Revision 1.7 by gbeauche, 2004-05-10T16:16:26Z vs.
Revision 1.8 by gbeauche, 2004-11-13T14:09:15Z

# Line 42 | Line 42 | static inline long CallUniversal(void *a
42   }
43   typedef int16 (*gsl_ptr)(char *, uint32, uint32, uint32 *, void **, char *);
44   static uint32 gsl_tvect = 0;
45 < static inline int16 GetSharedLibrary(char *arg1, uint32 arg2, uint32 arg3, uint32 *arg4, void **arg5, char *arg6)
45 > static inline int16 GetSharedLibrary(uintptr arg1, uint32 arg2, uint32 arg3, uintptr arg4, uintptr arg5, uintptr arg6)
46   {
47 <        return (int16)CallMacOS6(gsl_ptr, gsl_tvect, arg1, arg2, arg3, arg4, arg5, arg6);
47 >        return (int16)CallMacOS6(gsl_ptr, gsl_tvect, (char *)arg1, arg2, arg3, (uint32 *)arg4, (void **)arg5, (char *)arg6);
48   }
49   typedef int16 (*fs_ptr)(uint32, char *, void **, uint32 *);
50   static uint32 fs_tvect = 0;
51 < static inline int16 FindSymbol(uint32 arg1, char *arg2, void **arg3, uint32 *arg4)
51 > static inline int16 FindSymbol(uint32 arg1, uintptr arg2, uintptr arg3, uintptr arg4)
52   {
53 <        return (int16)CallMacOS4(fs_ptr, fs_tvect, arg1, arg2, arg3, arg4);
53 >        return (int16)CallMacOS4(fs_ptr, fs_tvect, arg1, (char *)arg2, (void **)arg3, (uint32 **)arg4);
54   }
55   typedef int16 (*cc_ptr)(uint32 *);
56   static uint32 cc_tvect = 0;
# Line 198 | Line 198 | void *FindLibSymbol(char *lib_str, char
198                  r.a[1] = conn_id.addr();
199                  r.a[2] = main_addr.addr();
200                  r.a[3] = err.addr();
201 <                Execute68k((uint32)proc1, &r);
201 >                Execute68k(Host2MacAddr((uint8 *)proc1), &r);
202                  D(bug(" GetSharedLibrary: ret %d, connection ID %ld, main %p\n", (int16)r.d[0], conn_id.value(), main_addr.value()));
203                  if (r.d[0])
204                          return NULL;
# Line 219 | Line 219 | void *FindLibSymbol(char *lib_str, char
219                  r.a[0] = sym.addr();
220                  r.a[1] = sym_addr.addr();
221                  r.a[2] = sym_class.addr();
222 <                Execute68k((uint32)proc2, &r);
222 >                Execute68k(Host2MacAddr((uint8 *)proc2), &r);
223                  D(bug(" FindSymbol1: ret %d, sym_addr %p, sym_class %ld\n", (int16)r.d[0], sym_addr.value(), sym_class.value()));
224   //!! CloseConnection()?
225                  if (r.d[0])
# Line 234 | Line 234 | void *FindLibSymbol(char *lib_str, char
234                          return 0;
235                  }
236                  int16 res;
237 <                res = GetSharedLibrary(lib.value(), FOURCC('p','w','p','c'), 1, (uint32 *)conn_id.addr(), (void **)main_addr.addr(), (char *)err.addr());
237 >                res = GetSharedLibrary(lib.addr(), FOURCC('p','w','p','c'), 1, conn_id.addr(), main_addr.addr(), err.addr());
238                  D(bug(" GetSharedLibrary: ret %d, connection ID %ld, main %p\n", res, conn_id.value(), main_addr.value()));
239                  if (res)
240                          return NULL;
241 <                res = FindSymbol(conn_id.value(), sym.value(), (void **)sym_addr.addr(), (uint32 *)sym_class.addr());
241 >                res = FindSymbol(conn_id.value(), sym.addr(), sym_addr.addr(), sym_class.addr());
242                  D(bug(" FindSymbol: ret %d, sym_addr %p, sym_class %ld\n", res, sym_addr.value(), sym_class.value()));
243   //!!??          CloseConnection(&conn_id);
244                  if (res)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines