On OSF, apparently fseek() works in some on-demand way, so the fseek

Thu Sep 20 17:22:48 2001  Owen Taylor  <otaylor@redhat.com>

	* io-tiff.c (gdk_pixbuf__tiff_image_load): On OSF, apparently fseek()
	works in some on-demand way, so the fseek gdk_pixbuf_new_from_file() doesn't
	work here since we are using the raw file descriptor. So, we call lseek()
	on the fileno(f) before using it. (#60840).
This commit is contained in:
Owen Taylor 2001-09-20 21:24:19 +00:00 committed by Owen Taylor
parent 0989d8ed83
commit 405c3b090f
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Thu Sep 20 17:22:48 2001 Owen Taylor <otaylor@redhat.com>
* io-tiff.c (gdk_pixbuf__tiff_image_load): On OSF, apparently fseek()
works in some on-demand way, so the fseek gdk_pixbuf_new_from_file() doesn't
work here since we are using the raw file descriptor. So, we call lseek()
on the fileno(f) before using it. (#60840).
2001-09-20 James Henstridge <james@daa.com.au>
* Makefile.am (gdk-pixbuf-enum-types.c): same change as in pango,

View File

@ -255,6 +255,13 @@ gdk_pixbuf__tiff_image_load (FILE *f, GError **error)
tiff_push_handlers ();
fd = fileno (f);
/* On OSF, apparently fseek() works in some on-demand way, so
* the fseek gdk_pixbuf_new_from_file() doesn't work here
* since we are using the raw file descriptor. So, we call lseek() on the fd
* before using it. (#60840)
*/
lseek (fd, 0, SEEK_SET);
tiff = TIFFFdOpen (fd, "libpixbuf-tiff", "r");
if (!tiff || global_error) {