While porting the MTEX package (http://code.google.com/p/mtex/) I came
across another issue that I've been working around, but on reflection
should probably be treated in Octave itself. Matlab defines the macros
for use in mex-files, however these values depend on the type used for
the mwsize and mwindex types, although the *_MIN macros are always zero.
I can't use std::numeric_limits<mwsize>::max() to get this value as
mex.h is generally included in C programs and so I have to think of
another way of getting this values. This is complicated by the variable
substitution used to create mxarray.h from mxarray.h.in. What I was
thinking of doing is adding
just below the typedefs for mwsize and mwindex, then also substitute
USE_64_BIT_IDX_T when creating mxarray.h from mxarray.h.in. I could
probably use the values from limits.h directly, though using the numeric
values seems safer to me.
Any objections from making this change in the stable branch?