diff options
author | Frank Warmerdam <warmerdam@pobox.com> | 2005-09-12 16:31:04 +0000 |
---|---|---|
committer | Frank Warmerdam <warmerdam@pobox.com> | 2005-09-12 16:31:04 +0000 |
commit | 00ac9cab12111c55cc56c883a05f749f09e00ac6 (patch) | |
tree | 11a4c30b2a532011b0aa3ce2ff532236c7fceb8a /libtiff/tif_open.c | |
parent | 6293d0cb0955ce9e1b835e1f32672f9676d53041 (diff) | |
download | libtiff-git-00ac9cab12111c55cc56c883a05f749f09e00ac6.tar.gz |
Added FSeek in open to fix issues on Solaris
Diffstat (limited to 'libtiff/tif_open.c')
-rw-r--r-- | libtiff/tif_open.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libtiff/tif_open.c b/libtiff/tif_open.c index 83cfd11e..407a5804 100644 --- a/libtiff/tif_open.c +++ b/libtiff/tif_open.c @@ -1,4 +1,4 @@ -/* $Id: tif_open.c,v 1.26 2005-07-01 12:35:18 dron Exp $ */ +/* $Id: tif_open.c,v 1.27 2005-09-12 16:31:04 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -325,6 +325,16 @@ TIFFClientOpen( TIFFSwabShort(&tif->tif_header.tiff_version); tif->tif_header.tiff_diroff = 0; /* filled in later */ + + /* + * The doc for "fopen" for some STD_C_LIBs says that if you + * open a file for modify ("+"), then you must fseek (or + * fflush?) between any freads and fwrites. This is not + * necessary on most systems, but has been shown to be needed + * on Solaris. + */ + TIFFSeekFile( tif, 0, SEEK_SET ); + if (!WriteOK(tif, &tif->tif_header, sizeof (TIFFHeader))) { TIFFError(name, "Error writing TIFF header"); goto bad; |