The TPP's version of X!Tandem also uses expat, FYI.

-Natalie

On 4/1/10 2:14 AM, dctrud wrote:
Brian, Matt,

It now works nicely with all offset variables using boost::int64_t
(not unsigned as there is some setting to -1 in the code and within
expat the offsets are signed). Am able to work with files>2GB without
any problems.

Having looked at the expat docs/code though (see expat_external.h),
it's clear that this won't make a difference on 32-bit platforms
unless expat is built with XML_LARGE_SIZE. By default expat is using
'long' for XML_Index (offsets), so this will be 32-bit on 32-bit OS /
64-bit on 64-bit OS. To allow>2Gb on 32-bit OS needs XML_LARGE_SIZE,
which then uses 'long long' or '__int64' if _MSC_EXTENSIONS is
defined, which is default for the MS C++ compiler. Are gcc and MS
Visual C++ the only platforms targeted? If so I suppose that the
Makefile could be changed to build expat with XML_LARGE_SIZE to give
2GB support for 32-bit systems.
I believe (from a quick grep for expat.h) that the only other things
using expat in the TPP are the Algorithm2XML progs via Parsers/
Algorithm2XML/saxhandler.h, and this handler doesn't use any byte
offsets (no calls to XML_GetCurrentByteIndex). Therefore I don't think
anything would be broken by the XML_LARGE_SIZE change to 'long long'
or '__int64' in expat. I can try this on linux x86&  AMD64, but don't
have the ability to build on Windows at the moment.

Should this technical discussion be continued off or on the dev list?

Thanks for your help.

DT

On 1 Apr, 00:29, Brian Pratt<[email protected]>  wrote:
Yes, that's why he shouldn't use it.

"long long" sends many compilers into severe hissy fits.

  boost::uint64_t is a good choice if the code is already using the boost
lib, which I think it is.

Brian

On Wed, Mar 31, 2010 at 3:30 PM, Matthew Chambers<

[email protected]>  wrote:
Also, AFAIK, long int is just a verbose form of long (like int == signed
int), so it will behave the same way. You may be thinking of long long
(which is what uint64_t and maxint_t evaluate to on modern GCCs).
On 3/31/2010 5:23 PM, Matthew Chambers wrote:
You can also use boost::uint64_t or boost::maxint_t. It's probably
unreasonable to get more cross-platform than those.
-Matt
On 3/31/2010 5:08 PM, Brian Pratt wrote:
Yeah, those ought to be off_t instead of int (or even long int).
  Actually use ramp_fileoffset_t if you can, it's set up for crossplatform
compiles.
--
You received this message because you are subscribed to the Google Groups
"spctools-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<spctools-discuss%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/spctools-discuss?hl=en.

--
You received this message because you are subscribed to the Google Groups 
"spctools-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spctools-discuss?hl=en.

Reply via email to