Re: 64 bit integers in Expat 2.0?
Karl Waclawek <[email protected]>
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
Nick MacDonald wrote:
>I'm guessing that people that need to support huge files (>2GB) generally
>know this. You could add some simple checking in the code.
>
>When the file is first opened, do a stat on it and see if its too huge, and
>large file support not enabled:
>
>#ifndef EXPAT_HUGE_FILE_SUPPORT
>if currentFileSize() >0xffffffff then
>{
> return warningOrErrorCode;
>}
>#endif
>
>
There is just one problem: Expat doesn't know about files.
>
>Otherwise you just make a suitable type and hope that people writing new
>code are willing to adapt:
>
>#ifdef EXPAT_HUGE_FILE_SUPPORT
>typedef uint64 xmlFilePos_t;
>#else
>typedef unit32 xmlFilePos_t;
>#endif
>
>
New code doesn't concern me, backward's compatibility does.
But an option to turn 64 bit values on/off might be reasonable.
Karl