Patch for netcdf-3.3.1/src/ncgen/ncgen.y ================================== To apply, invoke the following command from the netcdf-3.3.1/src/ncgen/ directory, where you should replace PATCHFILE by the name for this file: patch < PATCHFILE Then rebuild ncgen with "make all". Index: netcdf-3/ncgen/ncgen.y diff -c netcdf-3/ncgen/ncgen.y:1.12 netcdf-3/ncgen/ncgen.y:1.18 *** netcdf-3/ncgen/ncgen.y:1.12 Tue Apr 29 09:48:25 1997 --- netcdf-3/ncgen/ncgen.y Thu Jul 17 16:43:23 1997 *************** *** 271,277 **** /* shrink space down to what was really needed */ att_space = erealloc(att_space, valnum*nctypesize(valtype)); atts[natts].val = att_space; ! if (STREQ(atts[natts].name, _FillValue)) { nc_putfill(atts[natts].type, atts[natts].val, &vars[atts[natts].var].fill_value); --- 275,282 ---- /* shrink space down to what was really needed */ att_space = erealloc(att_space, valnum*nctypesize(valtype)); atts[natts].val = att_space; ! if (STREQ(atts[natts].name, _FillValue) && ! atts[natts].var != NC_GLOBAL) { nc_putfill(atts[natts].type, atts[natts].val, &vars[atts[natts].var].fill_value); *************** *** 286,292 **** att: avar ':' attr | ':' attr { ! varnum = -1; /* handle of "global" attribute */ } ; --- 291,297 ---- att: avar ':' attr | ':' attr { ! varnum = NC_GLOBAL; /* handle of "global" attribute */ } ;