AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2021.01.15 23:32 "[Tiff] MergeRequest for discussion code style", by Kurt Schwehr
2021.01.16 01:12 "Re: [Tiff] MergeRequest for discussion code style", by Edward Lam
2021.01.16 14:56 "Re: [Tiff] MergeRequest for discussion code style", by Bob Friesenhahn
2021.01.17 06:49 "Re: [Tiff] MergeRequest for discussion code style", by William Bader
2021.01.17 07:33 "Re: [Tiff] MergeRequest for discussion code style", by Tom Lane
2021.01.17 17:43 "Re: [Tiff] MergeRequest for discussion code style", by Kurt Schwehr
2021.01.18 14:32 "Re: [Tiff] MergeRequest for discussion code style", by Edward Lam
2021.01.19 17:21 "Re: [Tiff] MergeRequest for discussion code style", by Kurt Schwehr
2021.01.19 18:57 "Re: [Tiff] MergeRequest for discussion code style", by Bob Friesenhahn
2021.01.20 20:41 "[Tiff] MergeRequest for discussion code style", by Thomas Bernard
2021.01.21 15:01 "[Tiff] MR 151 (was: Re: MergeRequest for discussion code style)", by Edward Lam

2021.01.16 14:56 "Re: [Tiff] MergeRequest for discussion code style", by Bob Friesenhahn

If there is still some interest in portability, then ptrdiff_t is a more portable choice than intptr_t and it should be as available as size_t. The definition of ptrdiff_t is much older than the definition of intptr_t, including Microsoft compilers.

Take care about the POSIX idea of ssize_t because of what it is defined to be. The POSIX definition of ssize_t is that it is the type returned by the read() function. Under 64-bit Windows, this type remains just an 'int' (as returned by _read()) and so it is not actually a signed equivalent of size_t.

It is indeed useful to know the maximum amount of data that read() can return since if one requests more than the maximum allowed value, error checking becomes impossible.

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