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.
John, I can't reproduce the problem you are seeing with the patches. Using version 2.1, which is the latest version of patch from the GNU archives that I just built, everything succeeds, as the appended patch output shows. It's hard to believe that this might be OS-dependent, but I ran the above on a SPARCstation 10/Solaris 2.3 platform. To get around this problem with patch, I've just made the patched and compressed tar file available as ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-232pl4.tar.Z Please let me know if this works better. --Russ buddy% /usr/local/gnu/bin/patch --version Patch version 2.1 buddy% /usr/local/gnu/bin/patch < ~ftp/pub/netcdf/2.3.2-patch3 Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |This is a patch for the experimental C++ interface to netCDF in version |2.3.2pl2 (April 1994). | |This patch accomplishes the following: | |BUG FIXES | | A bug in netcdf.h that prevented correct compilation of the experimental | C++ interface is fixed by removing typedefs for ncchar, ncbyte, ncshort, | ncfloat, and ncdouble. | | Fixed off-by-one problem with strings reported by Tom Lefebvre. | | Minor changes to work with g++. | | Added put and get functions for ncbyte arrays. | | Fixed a bug in NcVar::get_att(NcToken) member, to make it return 0 for | attributes that don't exist. | | NcAtt::is_valid() had been returning FALSE for global attributes, but this | fix makes it return TRUE when appropriate. | |This patch-file is designed to be applied from the top-level netcdf source |directory via Larry Wall's patch(1) utility, e.g. | | $ cd /usr/local/src/netcdf-2.3.2 | $ patch < this_file | |After applying this patch, you *must* remake the netCDF library from scratch |(from the `configure' step), because the libsrc/netcdf.h file is regenerated |by the `configure' script from one of the files changed by this patch. | |=================================================================== |diff -c1 -r libsrc/netcdf.h.in |*** oldlibsrc/netcdf.h.in Tue Jun 8 13:20:36 1993 |--- libsrc/netcdf.h.in Wed Jul 21 12:36:23 1993 -------------------------- Patching file libsrc/netcdf.h.in using Plan A... Hunk #1 succeeded at 16. Hunk #2 succeeded at 278. Hunk #3 succeeded at 288. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |diff -c1 -r c++/ncvalues.cc |*** oldc++/ncvalues.cc Thu Apr 15 15:41:03 1993 |--- c++/ncvalues.cc Fri Aug 6 11:13:55 1993 -------------------------- Patching file c++/ncvalues.cc using Plan A... Hunk #1 succeeded at 6. Hunk #2 succeeded at 156. Hunk #3 succeeded at 164. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |diff -c1 -r c++/netcdf.cc |*** oldc++/netcdf.cc Sun Apr 25 10:23:53 1993 |--- c++/netcdf.cc Tue Feb 22 11:09:42 1994 -------------------------- Patching file c++/netcdf.cc using Plan A... Hunk #1 succeeded at 6. Hunk #2 succeeded at 208. Hunk #3 succeeded at 493. Hunk #4 succeeded at 566. Hunk #5 succeeded at 587. Hunk #6 succeeded at 627. Hunk #7 succeeded at 648. Hunk #8 succeeded at 680. Hunk #9 succeeded at 858. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |diff -c1 -r c++/netcdf.hh |*** oldc++/netcdf.hh Sun Apr 25 10:23:11 1993 |--- c++/netcdf.hh Tue Dec 7 09:17:48 1993 -------------------------- Patching file c++/netcdf.hh using Plan A... Hunk #1 succeeded at 6. Hunk #2 succeeded at 243. Hunk #3 succeeded at 260. Hunk #4 succeeded at 272. Hunk #5 succeeded at 289. done buddy% /usr/local/gnu/bin/patch < ~ftp/pub/netcdf/2.3.2-patch4 Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |This is a patch number 4 for netCDF version 2.3.2. It updates the software |to version 2.3.2pl4. Before applying this patch, you should first apply |patch 3, available from | | ftp://ftp.unidata.ucar.edu/pub/netcdf/2.3.2-patch3 | |Patches 3 and 4 only correct problems in the experimental netCDF C++ |interface; they are not needed if you are not using the C++ interface. | |Note that after applying patch3, you *must* remake the netCDF library from |scratch (from the `configure' step), because the libsrc/netcdf.h file is |regenerated by the `configure' script from one of the files changed by this |patch. | |This patch accomplishes the following: | |BUG FIXES | | Fixed bug reported by Tom Glaess (and others) with NcVar::set_cur() not | incrementing the record dimension properly. | | Minor changes to make the software compile with g++. | | Made virtual destructor for NcFile protected instead of =0 since it's | not really pure. | | Revised the Makefile to create a library, not just an object file. | | Changed the type of the last argument in the interface of | NcFile::add_var(), so an array of dimensions could be used when a | variable has more than five dimensions. | | Fixed a memory leak in the NcFile::sync() member function. | | Changed NcVar::edges() to return a non-const, since it's sometimes | useful to be able to modify the returned array for later use. | |This patch-file is designed to be applied from the top-level netcdf source |directory via Larry Wall's patch(1) utility. So, after you have applied |patch 3, for example, use something like the following: | | $ cd /usr/local/src/netcdf-2.3.2 | $ patch < this_file | |=================================================================== |diff -c1 -r oldc++/Makefile c++/Makefile |*** oldc++/Makefile Sun Apr 25 10:17:39 1993 |--- c++/Makefile Tue Jan 31 16:23:38 1995 -------------------------- Patching file c++/Makefile using Plan A... Hunk #1 succeeded at 1. Hunk #2 succeeded at 5. Hunk #3 succeeded at 15. Hunk #4 succeeded at 56. Hunk #5 succeeded at 60. Hunk #6 succeeded at 69. Hunk #7 succeeded at 73. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |diff -c1 -r oldc++/netcdf.cc c++/netcdf.cc |*** oldc++/netcdf.cc Tue Jan 31 14:08:35 1995 |--- c++/netcdf.cc Tue Jan 31 12:48:59 1995 -------------------------- Patching file c++/netcdf.cc using Plan A... Hunk #1 succeeded at 6. Hunk #2 succeeded at 162. Hunk #3 succeeded at 168. Hunk #4 succeeded at 220. Hunk #5 succeeded at 469. Hunk #6 succeeded at 573. Hunk #7 succeeded at 634. Hunk #8 succeeded at 669. Hunk #9 succeeded at 684. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |diff -c1 -r oldc++/netcdf.hh c++/netcdf.hh |*** oldc++/netcdf.hh Tue Jan 31 14:08:35 1995 |--- c++/netcdf.hh Tue Jan 31 12:48:59 1995 -------------------------- Patching file c++/netcdf.hh using Plan A... Hunk #1 succeeded at 6. Hunk #2 succeeded at 12. Hunk #3 succeeded at 35. Hunk #4 succeeded at 62. Hunk #5 succeeded at 97. Hunk #6 succeeded at 234. Hunk #7 succeeded at 337. Hunk #8 succeeded at 347. Hunk #9 succeeded at 378. done