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.
> Organization: GM R@D Center > Keywords: 199405051259.AA16838 Hi Dick, > I have been building NetCDF access system to run under MSDOS and > ultimately windows, maybe as a DLL. > > I am early on in this project. Have XDRTEST working. Am trying to get > CDFTEST to function, and having some problems. > > Have noticed two versions of xdrstdio.c, one in the XDR directory and > another located in the libsrc directory. > > The version of xdrstdio.c in the libsrc directory has a non conditional > include of unistd.h -- I am not sure of how that relates to DOS > implementation. > > I may be way off base, or be lacking some information. > > Could you point me to the information source or person who could steer me > in the right direction. The netCDF library was originally layered on top of the stdio library with calls to the functions in xdr/xdrstdio.c, but we later added some netCDF-specific optimizations, creating libsrc/xdrstdio.c to replace xdr/xdrstdio.c. Then we came up with an implementation of this layer that did not use stdio, but instead used the POSIX read() and write() calls and did its own buffereing, resulting in further performance enhancements over the version based on the stdio library. This last implementation is in libsrc/xdrposix.c, and is used by default instead of libsrc/xdrstdio.c to link against. The reason we kept all three files in the distribution was for help in porting to new platforms, such as you are doing. Probably a good way to port to your environment is to ignore the two versions of xdrstdio.c and start with xdrposix.c instead. Replace the POSIX I/O calls with I/O calls specific to your platform. __________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden P.O. Box 3000 (303)497-8645 Boulder, Colorado 80307-3000