From 405c3b090f5bf6ba0007327b50e20439095568fd Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 20 Sep 2001 21:24:19 +0000 Subject: [PATCH] On OSF, apparently fseek() works in some on-demand way, so the fseek Thu Sep 20 17:22:48 2001 Owen Taylor * 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). --- gdk-pixbuf/ChangeLog | 7 +++++++ gdk-pixbuf/io-tiff.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index d4cae50b55..7e08be5036 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,10 @@ +Thu Sep 20 17:22:48 2001 Owen Taylor + + * 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 * Makefile.am (gdk-pixbuf-enum-types.c): same change as in pango, diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c index d8b799344b..874a8a73d0 100644 --- a/gdk-pixbuf/io-tiff.c +++ b/gdk-pixbuf/io-tiff.c @@ -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) {