Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
162 user(s) are online (148 user(s) are browsing Forums)

Members: 1
Guests: 161

Skateman, more...

Support us!

Headlines

 
  Register To Post  

Sfs and files +4gig
Home away from home
Home away from home


See User information
To make a program handle such large files,are there any specail commands needed?? Or can you just use standard open and close commands(for files) with standard read and write commands???

X5000
Go to top
Re: Sfs and files +4gig
Just can't stay away
Just can't stay away


See User information
@Antique

An example of problem i get with ctorrent and sfs/02 when downloading a +4gb file.

Ctorrent first makes the file 325mb big and after some DL it frequently puts out the messages

error, failed to seek to 18446744072280801280 on file "xbx.iso": Illegal seek
error, failed to seek to 18446744072280817664 on file "xbx.iso": Illegal seek
error, failed to seek to 18446744072280834048 on file "xbx.iso": Illegal seek
error, failed to seek to 18446744072280850432 on file "xbx.iso": Illegal seek
error, failed to seek to 18446744072280866816 on file "xbx.iso": Illegal seek
error, failed to seek to 18446744072280883200 on file "xbx.iso": Illegal seek
error, failed to seek to 18446744072280899584 on file "xbx.iso": Illegal seek

Go to top
Re: Sfs and files +4gig
Just can't stay away
Just can't stay away


See User information
@Antique

Use ChangeFilePosition(), GetFilePosition(), GetFileSize(), ChangeFileSize() instead of old Seek() function. (Seek() is only 32bit and it's now deprecated. Those others are 64bit.) (Remember to use int64 variables with those.) Open(), Close(), Read() and Write() are still ok. (Well OS4 only. I don't know OS3.x.)

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: Sfs and files +4gig
Just can't stay away
Just can't stay away


See User information
@Antique

Quote:
To make a program handle such large files,are there any specail commands needed?? Or can you just use standard open and close commands(for files) with standard read and write commands???
Open(), Close(), Read() and Write() are still the same, but for example most features of Seek() can't be used and ExAll() can't return file sizes > 4 GB.
Old software which only accesses files sequentially and doesn't check the file size works with large files, but that's not much, everything else has to be changed to use the new 64 bit AmigaOS4 dos.library functions, or the 64 bit C library functions. On AmigaOS 3.x you can use the functions in the dos64 link library from my homepage instead.

Go to top
Re: Sfs and files +4gig
Home away from home
Home away from home


See User information
@joerg

Ok. I'm working on a port to os4. I see it uses fseek and lseek. Seems like standard open close commands for file opening/closing. Not searched all files yet though!

But why can't the original commands be adjusted to work with big files without any changes to the commands itselves? if you understood that? :)

X5000
Go to top
Re: Sfs and files +4gig
Just can't stay away
Just can't stay away


See User information
@Antique

Quote:
Ok. I'm working on a port to os4. I see it uses fseek and lseek.
You have to use fseeko64() and _lseek64() instead, but that requires a new SDK ...

Quote:
But why can't the original commands be adjusted to work with big files without any changes to the commands itselves? if you understood that? :)
Old functions like IDOS->Seek(), the C library fseek(), etc., use 32 bit arguments and return values for the offset, if you would change them to 64 bit you'd break all old software passing 32 bit values to them or expecting 32 bit return values. New functions with 64 bit arguments and/or return values, which are only used by new software, have to be used instead.

Go to top
Re: Sfs and files +4gig
Not too shy to talk
Not too shy to talk


See User information
@joerg

Is it possible to release 'only' a new newlib devkit, it should work with SDK 51.22, or not?

Go to top
Re: Sfs and files +4gig
Just can't stay away
Just can't stay away


See User information
@ZeroG

Quote:
Is it possible to release 'only' a new newlib devkit,
Since newlib is part of AmigaOS4, not just a contribution like for example SFS, only Hyperion can release updates.

Quote:
it should work with SDK 51.22, or not?
Except for the shared object support, which needs GCC 4.0.4 or newer, it should work.

Go to top
Re: Sfs and files +4gig
Home away from home
Home away from home


See User information
@joerg

Do you have any idea when a new update of sdk will come?

X5000
Go to top
Re: Sfs and files +4gig
Not too shy to talk
Not too shy to talk


See User information
@joerg
Ok, I have expected something like that.

EDIT:
Maybe you could create a small link library that contains stubfunctions for the 64 bit filefunktions. Something like your libdos64, but for newlib. Its ugly, but it should help Antique with ctorrent.


Edited by ZeroG on 2008/4/14 21:52:18
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project