Closed Bug 1274477 Opened 8 years ago Closed 8 years ago

64-bit filesystem support using fsetpos, fgetpos instead of fseek, ftell

Categories

(Thunderbird :: Untriaged, defect)

38 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: jmichae3, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID: 20160502172042 Steps to reproduce: 64-bit filesystem support using fsetpos, fgetpos instead of fseek, ftell. these functions do have a 64-bit-fs equivalent and still work nice and fast with fopen() and are faster than WIN32 WriteFile() and ReadFile() and are os indepedent, aren't they. fseek and ftell are 32-bit-fs and use an int which is same as int32_t.
Can you show an example in the code where the incorrect functions are used? Or have you noticed improper behaviour on 64bit-fs? Also, what is a 64bit FS in this case? Probably not that just that it allows files larger than 2GB/4GB.
(In reply to :aceman from comment #1) > Can you show an example in the code where the incorrect functions are used? > Or have you noticed improper behaviour on 64bit-fs? Also, what is a 64bit FS > in this case? Probably not that just that it allows files larger than > 2GB/4GB.
Flags: needinfo?(jmichae3)
Whiteboard: [closeme 2016-06-10]
Resolved per whiteboard
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(jmichae3)
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2016-06-10]
just grep -r -l -E "(ftell|fseek)" * I can't get source anymore from ftp area since it seems permanently down. I also just noticed in mingw-w64: fopen64... would sure be useful on tb... well, anyway, end of subject.
See https://dxr.mozilla.org/mozilla-central/search?q=FILE_OFFSET_BITS I think we use the FILE_OFFSET_BITS=64 method so using fopen (without 64) should be fine. We definitely want to support files larger than 4GB (and we do (in the low-level) e.g. for mail folders). So if you can find any real case where we really can't open such files, then we are listening.
now I see in gcc fopen64, fclose64. cannot get source because Anon FTP is down permanently. can't answer your questions on the source.
They may exist in gcc but they are considered non-standard. The FILE_OFFSET_BITS=64 method is supposedly more portable. Try checking the source via https://dxr.mozilla.org/mozilla-central/search
You need to log in before you can comment on or make changes to this bug.