AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2018.12.11 13:36 "[Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
2018.12.11 14:29 "Re: [Tiff] SeekOK and WriteOK", by Nicolas RUFF
2018.12.11 18:54 "Re: [Tiff] SeekOK and WriteOK", by Bob Friesenhahn
2018.12.11 14:09 "Re: [Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
2018.12.11 14:01 "Re: [Tiff] SeekOK and WriteOK", by Bob Friesenhahn
2018.12.11 14:24 "Re: [Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
2018.12.12 08:53 "Re: [Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
2018.12.13 11:04 "Re: [Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
2018.12.13 13:13 "Re: [Tiff] SeekOK and WriteOK", by Paavo Helde

2018.12.11 18:54 "Re: [Tiff] SeekOK and WriteOK", by Bob Friesenhahn

This might be by design of the API :) http://bugzilla.maptools.org/show_bug.cgi?id=2726

lseek() returns -1 in both cases:

You have to clear then check errno to distinguish between cases.

One approach is to call 'lseek(fd,SEEK_CUR)' and verify that the return value is the expected offset.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt