This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Kevin,
I wrote:
> ... I'm testing a fix that doesn't require the user to know
> know whether a file is classic or 64-bit offset variant, but preserves
> whatever variant the file had when opened. It won't hurt to OR in the
> NC_64BIT_OFFSET on open, but it won't be required.
My test seemed to work fine. Here's a context diff for the fix,
just adding the line
fSet(ncp->flags, NC_64BIT_OFFSET);
after line 1319 of libsrc/v1hpg.c, so in context it now reads:
if (magic[sizeof(ncmagic)-1] == 0x1) {
gs.version = 1;
} else if (magic[sizeof(ncmagic)-1] == 0x2) {
gs.version = 2;
fSet(ncp->flags, NC_64BIT_OFFSET);
If it's convenient, I'd appreciate your testing this instead of your
patch, to see if it works for you without the necessity of adding
NC_64BIT_OFFSET to your open calls. Thanks!
--Russ