Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from mailgate106.isp.belgacom.be ([195.238.20.38])
          by mailfep003.skynet.be
          (InterMail vM.8.04.03.28.4 201-2389-100-182-103-20180124)
          with ESMTP
          id <20210111132903.OPEJ7220.mailfep003.skynet.be@mailgate106.isp.belgacom.be>
          for <chris.lindelaan@skynet.be>; Mon, 11 Jan 2021 14:29:03 +0100
Authentication-Results: mx101.skynet.be; dkim=none (message not signed) header.i=none; spf=None smtp.pra=tiff-bounces@lists.osgeo.org; spf=Pass smtp.mailfrom=tiff-bounces@lists.osgeo.org; spf=Pass smtp.helo=postmaster@lists.osgeo.org
Received-SPF: None (mx101.skynet.be: no sender authenticity
  information available from domain of
  tiff-bounces@lists.osgeo.org) identity=pra;
  client-ip=140.211.15.3; receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx101.skynet.be: domain of
  tiff-bounces@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=mailfrom; client-ip=140.211.15.3;
  receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
Received-SPF: Pass (mx101.skynet.be: domain of
  postmaster@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=helo; client-ip=140.211.15.3;
  receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="postmaster@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
X-Ironport-Dmarc-Check-Result: validskip
IronPort-SDR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gEBAgYBAQo?=
 =?us-ascii?q?YHAYEBAICAwEjAS8GEwWDIQGCVQMOIAQBCqx+dAKBMoVYgz6BPAaBOIZyhj9?=
 =?us-ascii?q?BgUE/gTgcgiguPoIbQgEEhHQ0giwEgUsaWVwBYCINLDAPKBomkC2LCYEdDZs?=
 =?us-ascii?q?MOViDAYkrh0GDf4FYhR8fgymfN5YZiQ+CeI5hYoQYgW2BezMaCCYKOyoBgj4?=
 =?us-ascii?q?+DwECAQINAgECAQIBAgICAQECAgEBApcjhURCATE3AgYBCQEBAwlYI4oaLC2?=
 =?us-ascii?q?BbQEB?=
X-IPAS-Result: =?us-ascii?q?A0E1AQDvUfxfhwMP04xiHAEBAQEBAQcBARIBAQQEAQFAg?=
 =?us-ascii?q?U+BI4EBGAFkWQEeAwc2hD+JBIg8A4JwgQ2DcIIvkhcUAQECAQEBAQEJGAEKC?=
 =?us-ascii?q?gIEAQEBAYNJgnQfBgEENBMCAwEBAQMCBQEBAQQBAQECAQECAwICAQECEAEBA?=
 =?us-ascii?q?QENCwkIKSwGZVsEYgZbBIFxBwMwDII4BQIDHwEGbYEHAQEBAQEBAQEBAQEBA?=
 =?us-ascii?q?QEBAQEBARYCDVRoAQEBAQIBAQEBICMKHgsDAgEBAgYBAQoYHAYEBAICAwEjA?=
 =?us-ascii?q?S8GEwWDIQGCVQMOIAQBCqx+dAKBMoVYgz6BPAaBOIZyhj9BgUE/gTgcgiguP?=
 =?us-ascii?q?oIbQgEEhHQ0giwEgUsaWVwBYCINLDAPKBomkC2LCYEdDZsMOViDAYkrh0GDf?=
 =?us-ascii?q?4FYhR8fgymfN5YZiQ+CeI5hYoQYgW2BezMaCCYKOyoBgj4+DwECAQINAgECA?=
 =?us-ascii?q?QIBAgICAQECAgEBApcjhURCATE3AgYBCQEBAwlYI4oaLC2BbQEB?=
X-MGA-submission: =?us-ascii?q?MDFbLOtW0nF0noHlVUQPd2strEKezKa7VPaDLw?=
 =?us-ascii?q?iBZrOabML2F6G4KrlXbR5obTbmKxq3uq/CMRtwGSWra3Iw60sjw/CGeb?=
 =?us-ascii?q?wIsoNnRmVImmWvsPQmLyiZ1BwlGloW/ejuU9U=3D?=
Received: from osgeo6.osgeo.osuosl.org (HELO lists.osgeo.org) ([140.211.15.3])
  by mx101.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 11 Jan 2021 14:29:02 +0100
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 205306145903;
	Mon, 11 Jan 2021 05:28:57 -0800 (PST)
Received: from authenticated.a-painless.mh.aa.net.uk
 (authenticated.a-painless.mh.aa.net.uk [90.155.4.48])
 by lists.osgeo.org (Postfix) with ESMTPS id EF3536145959
 for <tiff@lists.osgeo.org>; Mon, 11 Jan 2021 05:28:55 -0800 (PST)
Received: from 182.155.187.81.in-addr.arpa ([81.187.155.182]
 helo=melaidhrin.home) by a-painless.mh.aa.net.uk with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92)
 (envelope-from <rleigh@codelibre.net>)
 id 1kyxFe-0008QL-4f; Mon, 11 Jan 2021 13:28:54 +0000
From: Roger Leigh <rleigh@codelibre.net>
Message-Id: <1E4FE6E9-99F3-43EA-96AE-418599273D39@codelibre.net>
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Date: Mon, 11 Jan 2021 13:28:50 +0000
In-Reply-To: <DB6PR0201MB2471F143384CB0AE7FC709FBC4AB0@DB6PR0201MB2471.eurprd02.prod.outlook.com>
To: William Bader <williambader@hotmail.com>
References: <9052599.rlaer9EI2p@even-i700> <2748399.eaF4TIHlBA@even-i700>
 <alpine.GSO.2.20.2101100826040.17187@scrappy.simplesystems.org>
 <7569910.L6OmBPVM4l@even-i700>
 <DB6PR0201MB2471F143384CB0AE7FC709FBC4AB0@DB6PR0201MB2471.eurprd02.prod.outlook.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Subject: Re: [Tiff] Motions related to C99 use in libtiff
X-BeenThere: tiff@lists.osgeo.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.osgeo.org>
List-Unsubscribe: <https://lists.osgeo.org/mailman/options/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=unsubscribe>
List-Post: <mailto:tiff@lists.osgeo.org>
List-Help: <mailto:tiff-request@lists.osgeo.org?subject=help>
List-Subscribe: <https://lists.osgeo.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=subscribe>
Cc: "tiff@lists.osgeo.org" <tiff@lists.osgeo.org>
Content-Type: multipart/mixed; boundary="===============8844056665972297298=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>


--===============8844056665972297298==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_DC34564D-86A6-43A8-8E9E-BE03C068BE43"


--Apple-Mail=_DC34564D-86A6-43A8-8E9E-BE03C068BE43
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 11 Jan 2021, at 01:03, William Bader <williambader@hotmail.com> =
wrote:
>=20
> >#define TIFF_LEGACY_TYPES
>=20
> Could that (maybe combined with TIFFLIB_VERSION) be made the official =
transition method both for building libtiff and for packages including =
headers that include tiff headers that all need to agree on what to do, =
so a package that wants to update could
> #include <tiffvers.h>
> #if (TIFFLIB_VERSION > 20210101) && !defined(TIFF_LEGACY_TYPES)
> safe to #include headers that conflict with the legacy types
>=20
> Could TIFF_LEGACY_TYPES be 0 or 1 instead of just defined/not defined =
so tiffio.h could temporarily
> #ifndef TIFF_LEGACY_TYPES
> #if defined(_STDINT_H) || (__STDC_VERSION__ >=3D 199901L)
> #define TIFF_LEGACY_TYPES 0
> #else
> #define TIFF_LEGACY_TYPES 1
> =E2=80=A6

Hi William,


Your example above is conflating two different problems/questions:

* Does the standard library support C99 types with stdint.h/inttypes.h?
* Should the legacy typedefs be enabled?

These are two orthogonal problems.

The first problem, checking for and enabling the use of C99 stdint.h, =
inttypes.h and the C99 integer types is handled entirely by Autoconf or =
CMake.  It checks for their availability and enables them conditionally =
if present, otherwise it falls back to the existing behaviour.  That is =
the std-int-types branch.  It requires no action on the part of client =
code.

The second problem, enabling the legacy types is (in my patchset) =
something which can be done irrespective of whether the C99 types or the =
old C types are in use.  For example, it doesn=E2=80=99t matter if =
"uint16=E2=80=9D is actually =E2=80=9Cunsigned short=E2=80=9D or =
=E2=80=9Cuint16_t=E2=80=9D.  For compatibility, the important factor is =
that the type name exists and that it is a 16-bit unsigned type.  If you =
want to compile code using the legacy typenames, then you=E2=80=99ll =
want to enable the legacy type names irrespective of whether you are =
using a C99 compiler or an older compiler.

In the opposite case, where the client code is already using C99 integer =
types, you can use an old or new libtiff with or without the legacy =
types enabled, without any API compatibility issues.  You don=E2=80=99t =
use the legacy type names so you don=E2=80=99t need to care either way.

I don=E2=80=99t see a situation where you would want to *conditionally* =
use the legacy types.  Your code either needs them, or it doesn=E2=80=99t.=
  You would enable them either directly in the sources or via CFLAGS as =
a transitional mechanism, prior to your code dropping use of them.  And =
then you would disable them once you have done the migration.  If you =
want to build with both old and new versions of libtiff, then you can =
leave them unconditionally enabled as long as you like.

The only exception to this is in the case that you are using another =
library with clashing typedefs.  In this situation, you=E2=80=99re not =
going to be compiling with an older version of libtiff because it is =
broken for this use case.  You=E2=80=99re going to use a new release =
with the legacy types disabled, because that=E2=80=99s the only working =
combination available and there isn=E2=80=99t an alternative.


Kind regards,
Roger=

--Apple-Mail=_DC34564D-86A6-43A8-8E9E-BE03C068BE43
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 11 Jan 2021, at 01:03, William Bader &lt;<a =
href=3D"mailto:williambader@hotmail.com" =
class=3D"">williambader@hotmail.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div =
style=3D"font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; font-family: =
Calibri, Helvetica, sans-serif; font-size: 12pt;" class=3D"">&gt;#define =
TIFF_LEGACY_TYPES<br class=3D""><br class=3D"">Could that (maybe =
combined with TIFFLIB_VERSION) be made the official transition method =
both for building libtiff and for packages including headers that =
include tiff headers that all need to agree on what to do, so a package =
that wants to update could</div><div style=3D"font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; font-family: Calibri, Helvetica, sans-serif; =
font-size: 12pt;" class=3D"">#include &lt;tiffvers.h&gt;</div><div =
style=3D"font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; font-family: =
Calibri, Helvetica, sans-serif; font-size: 12pt;" class=3D"">#if =
(TIFFLIB_VERSION &gt; 20210101) &amp;&amp; =
!defined(TIFF_LEGACY_TYPES)</div><div style=3D"font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; font-family: Calibri, Helvetica, sans-serif; =
font-size: 12pt;" class=3D"">safe to #include headers that conflict with =
the legacy types</div><div style=3D"font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; font-family: Calibri, Helvetica, sans-serif; =
font-size: 12pt;" class=3D""><br class=3D""></div><div =
style=3D"font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; font-family: =
Calibri, Helvetica, sans-serif; font-size: 12pt;" =
class=3D"">Could&nbsp;TIFF_LEGACY_TYPES be 0 or 1 instead of just =
defined/not defined so tiffio.h could temporarily</div><div =
style=3D"font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; font-family: =
Calibri, Helvetica, sans-serif; font-size: 12pt;" =
class=3D"">#ifndef&nbsp;TIFF_LEGACY_TYPES</div><div style=3D"font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; font-family: Calibri, Helvetica, sans-serif; =
font-size: 12pt;" class=3D"">#if defined(_STDINT_H) || (__STDC_VERSION__ =
&gt;=3D 199901L)</div><div style=3D"font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; font-family: Calibri, Helvetica, sans-serif; =
font-size: 12pt;" class=3D"">#define&nbsp;TIFF_LEGACY_TYPES 0</div><div =
style=3D"font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; font-family: =
Calibri, Helvetica, sans-serif; font-size: 12pt;" =
class=3D"">#else</div><div style=3D"font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; font-family: Calibri, Helvetica, sans-serif; =
font-size: 12pt;" class=3D"">#define&nbsp;<span style=3D"font-family: =
Calibri, Helvetica, sans-serif; font-size: 12pt;" =
class=3D"">TIFF_LEGACY_TYPES 1</span></div><div style=3D"caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><div id=3D"appendonsend" =
class=3D""></div><div style=3D"font-family: Calibri, Helvetica, =
sans-serif; font-size: 12pt;" =
class=3D"">=E2=80=A6</div></div></div></blockquote><div><br =
class=3D""></div>Hi William,</div><div><br class=3D""></div><div><br =
class=3D""></div><div>Your example above is conflating two different =
problems/questions:</div><div><br class=3D""></div><div>* Does the =
standard library support C99 types with stdint.h/inttypes.h?</div><div>* =
Should the legacy typedefs be enabled?</div><div><br =
class=3D""></div><div>These are two orthogonal problems.</div><div><br =
class=3D""></div><div>The first problem, checking for and enabling the =
use of C99 stdint.h, inttypes.h and the C99 integer types is handled =
entirely by Autoconf or CMake. &nbsp;It checks for their availability =
and enables them conditionally if present, otherwise it falls back to =
the existing behaviour. &nbsp;That is the std-int-types branch. &nbsp;It =
requires no action on the part of client code.</div><div><br =
class=3D""></div><div>The second problem, enabling the legacy types is =
(in my patchset) something which can be done irrespective of whether the =
C99 types or the old C types are in use. &nbsp;For example, it doesn=E2=80=
=99t matter if "uint16=E2=80=9D is actually =E2=80=9Cunsigned short=E2=80=9D=
 or =E2=80=9Cuint16_t=E2=80=9D. &nbsp;For compatibility, the important =
factor is that the type name exists and that it is a 16-bit unsigned =
type. &nbsp;If you want to compile code using the legacy typenames, then =
you=E2=80=99ll want to enable the legacy type names irrespective of =
whether you are using a C99 compiler or an older compiler.</div><div><br =
class=3D""></div><div>In the opposite case, where the client code is =
already using C99 integer types, you can use an old or new libtiff with =
or without the legacy types enabled, without any API compatibility =
issues. &nbsp;You don=E2=80=99t use the legacy type names so you don=E2=80=
=99t need to care either way.</div><div><br class=3D""></div><div>I =
don=E2=80=99t see a situation where you would want to *conditionally* =
use the legacy types. &nbsp;Your code either needs them, or it =
doesn=E2=80=99t. &nbsp;You would enable them either directly in the =
sources or via CFLAGS as a transitional mechanism, prior to your code =
dropping use of them. &nbsp;And then you would disable them once you =
have done the migration. &nbsp;If you want to build with both old and =
new versions of libtiff, then you can leave them unconditionally enabled =
as long as you like.</div><div><br class=3D""></div><div>The only =
exception to this is in the case that you are using another library with =
clashing typedefs. &nbsp;In this situation, you=E2=80=99re not going to =
be compiling with an older version of libtiff because it is broken for =
this use case. &nbsp;You=E2=80=99re going to use a new release with the =
legacy types disabled, because that=E2=80=99s the only working =
combination available and there isn=E2=80=99t an =
alternative.</div><div><br class=3D""></div><div><br =
class=3D""></div><div>Kind regards,</div><div>Roger</div></body></html>=

--Apple-Mail=_DC34564D-86A6-43A8-8E9E-BE03C068BE43--

--===============8844056665972297298==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff

--===============8844056665972297298==--
