[GRASS5] Non-portable code in 5.1 portability test

Eric G. Miller egm2 at jps.net
Sat Mar 1 14:54:50 EST 2003

On Sat, Mar 01, 2003 at 10:26:28AM -0800, cheg01 at attbi.com wrote:
> The file /lib/vector/diglib/test.c fails on Solaris. Under Solaris, you
> cannot perform a write immediately after a on the same file without
> performing fflush(fp) in between or closing and reopening the file.

Theoretically, this is true of any C FILE stream.  If opened for reading
and writing one must at least perform fflush or a file positioning
function (fseek/ftell/rewind/fgetpos/fsetpos) if changing between
reading and writing.  Many systems handle the change transparently,
though they are not required to do so.

echo ">gra.fcw at 2ztr< eryyvZ .T pveR" | rot13 | reverse

More information about the grass-dev mailing list