At least in RedHat 9 system the fseek() and ftell() functions are defined as follows:
extern int fseek (FILE *__stream, long int __off, int __whence) __THROW; extern long int ftell (FILE *__stream) __THROW; and fseeko()/ftello() extern int fseeko (FILE *__stream, __off_t __off, int __whence) __THROW; extern __off_t ftello (FILE *__stream) __THROW; (one can expect that when LARGEFILE etc. are defined, off_t is 64bit type) (RH8 should be similar, the experiences that follows are done on RH8 system) In short, if one wants to seek (absolute or relative) more than 2GB, one must use fseeko() (at least in my system); seeks shorter than that can be done using fseek(). I don't remember what ftell() returns when offset is >2GB (either -1, or 32 low bits of the actual position). Finally, in my experience, I've used dvb-mplex to re-multiplex > 5GB file and lve to edit > 5GB files on my system. Both used to have issues with largefile support; dvb-mplex had one Makefile issue and lve changed fseek()s and ftell()s to fseeko() and ftello() in the beginning of this year. If there still is fseek()/ftell()s in dvb-mplex those should be carefully examined (if not done already). Tomi Monday Jun 2 13:04:45 +0200 2003 Matthias Schniedermeyer <[EMAIL PROTECTED]> wrote: > On Mon, Jun 02, 2003 at 11:17:43AM +0200, Marcus Metzler wrote: > > Laurence Culhane writes: > > > Hi, > > > > > > I recently upgraded one machine and found that dvb-mplex failed on large > > > files with an EOVERFLOW resulting from an ftell call in inptstrn.cpp. > > > The problem is that ftell doesn't handle LARGEFILES I think. A quick > > > search through include files and the net seems to indicate that ftell > > > and fseek should be replaced throughout by ftello and fseeko. > > > > > > These functions are correctly redeclared in the headers to ftello64 and > > > fseeko64 when using large files. > > > > > > Apologies if I'm behind lagging behind - the problem may lie elsewhere - > > > like with the Mandrake 9.1 I put on the offending machine. > > > > > > Laurence > > > > Do you have a specific example of the failure? > > A version compiled on SuSE (8.1 & 8.2) works. On Debian SID it doesn't. > > Even when you copy the binary from the SuSE-System i won't work on > Debian SID. > > Otherwise i don't have any LFS problems. > e.g. i createing DVD-Images burning them (up to 4489MB) works flawlessly > > > > > Bis denn > > -- > Real Programmers consider "what you see is what you get" to be just as > bad a concept in Text Editors as it is in women. No, the Real Programmer > wants a "you asked for it, you got it" text editor -- complicated, > cryptic, powerful, unforgiving, dangerous. > > > > -- > Info: > To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as > subject. -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
