On 22 Oct 2011 20:16:33 +0000, Chris Young wrote:
> On Sat, 22 Oct 2011 18:21:40 +0100 (GMT Daylight Time), Jeffrey Lee wrote:
>
> > A copy of the stderr log would be useful. It might also be worth switching
> > the code back to using fseek/ftell instead of the 64bit versions - perhaps
> > the 64bit versions are somehow broken on Amiga.
>
> Woo-hoo! That did it - obviously there is some problem with the
> 64-bit versions. I'll have to see if I can find some sort of test app
> to see what is wrong.
Proper 64-bit fix attached. Might break other platforms!
Chris
--- hostfs64.c 2011-10-22 17:57:28
+++ hostfs.c 2011-10-24 23:05:31
@@ -918,7 +918,7 @@ hostfs_open(ARMul_State *state)
switch (state->Reg[0]) {
case OPEN_MODE_READ:
dbug_hostfs("\tOpen for read\n");
- open_file[idx] = fopen(host_pathname, "rb");
+ open_file[idx] = fopen64(host_pathname, "rb");
state->Reg[0] = FILE_INFO_WORD_READ_OK;
break;
@@ -928,7 +928,7 @@ hostfs_open(ARMul_State *state)
case OPEN_MODE_UPDATE:
dbug_hostfs("\tOpen for update\n");
- open_file[idx] = fopen(host_pathname, "rb+");
+ open_file[idx] = fopen64(host_pathname, "rb+");
state->Reg[0] = (uint32_t) (FILE_INFO_WORD_READ_OK |
FILE_INFO_WORD_WRITE_OK);
break;
}
@@ -1245,7 +1245,7 @@ hostfs_write_file(ARMul_State *state, bo
return;
}
- f = fopen(new_pathname, "wb");
+ f = fopen64(new_pathname, "wb");
if (!f) {
/* TODO handle errors */
fprintf(stderr, "HostFS could not create file \'%s\': %s %d\n",
@@ -1570,7 +1570,7 @@ hostfs_file_255_load_file(ARMul_State *s
state->Reg[5] = object_info.attribs;
state->Reg[6] = 0; /* TODO */
- f = fopen(host_pathname, "rb");
+ f = fopen64(host_pathname, "rb");
if (!f) {
fprintf(stderr, "HostFS could not open file (File_255) \'%s\': %s %d\n",
host_pathname, strerror(errno), errno);
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
--
arcem-devel mailing list
arcem-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/arcem-devel