How to use open (unbuffered I/O) instead of fopen?
To use open instead of fopen in HDF4, you must: • Download and uncompress the HDF source code. • Edit the ./hdf/src/hdfi.h file. • Find the section of code for the platform you are on. For example on Solaris, find this line: #define DF_MT DFMT_SUN Then go down further until you find the section below. • Change the 2nd define in the following lines in that section, from: #ifdef HAVE_FMPOOL #define FILELIB PAGEBUFIO /* enable page buffering */ #else #define FILELIB UNIXBUFIO #endif to: #ifdef HAVE_FMPOOL #define FILELIB PAGEBUFIO /* enable page buffering */ #else #define FILELIB UNIXUNBUFIO #endif This will make HDF use unbuffered I/O.