Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from mailgate215.isp.belgacom.be ([195.238.22.47])
          by mailfep027.skynet.be
          (InterMail vM.8.04.03.28.4 201-2389-100-182-103-20180124)
          with ESMTP
          id <20210118151013.VXP11449.mailfep027.skynet.be@mailgate215.isp.belgacom.be>
          for <chris.lindelaan@skynet.be>; Mon, 18 Jan 2021 16:10:13 +0100
Authentication-Results: mx201.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 (mx201.skynet.be: no sender authenticity
  information available from domain of
  tiff-bounces@lists.osgeo.org) identity=pra;
  client-ip=140.211.15.3; receiver=mx201.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx201.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=mx201.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 (mx201.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=mx201.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: s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COAUCAx8BBm2BBwE?=
 =?us-ascii?q?BAQEBAQEBAQEBAQEBAQEBAQEWAg1UaQECAwEBASAjCh4LAwMBAgYBAQoYHAY?=
 =?us-ascii?q?EBAICAwEjAS8GEwWDIQGDBgQBCq8uAoEyhVmDMIE9BoE4hnaGQUGBQT+BOBy?=
 =?us-ascii?q?CVj6CXQEEhHU0giwEg1ArLyw8A2dCj1GHToR9DZwjgwGJL4dDhACGeR+iap8?=
 =?us-ascii?q?3kX0BRYQZgW2BezMaCCYKOyoBgj4+DwECAQINAgECAQIBAgICAQECAgEBAow?=
 =?us-ascii?q?uinWFREIBMTcCBgEJAQEDCVgjijSBbQEB?=
X-IPAS-Result: =?us-ascii?q?A0ECAQDNowVghwMP04xiHAEBAQEBAQcBARIBAQQEAQFAg?=
 =?us-ascii?q?U+BI4EBGAFkWQEeAwc3hD+JBIhLA4N9g3CURxQBAQIBAQEBAQkYAQoKAgQBA?=
 =?us-ascii?q?QEBgVOCcgGBdh8GAQQ0EwIDAQEBAwIFAQEBBAEBAQIBAQIDAgIBAQIQAQEBA?=
 =?us-ascii?q?Q0LCQgpLAZlWwRiBlsEgXEHAwMGJwyCOAUCAx8BBm2BBwEBAQEBAQEBAQEBA?=
 =?us-ascii?q?QEBAQEBAQEWAg1UaQECAwEBASAjCh4LAwMBAgYBAQoYHAYEBAICAwEjAS8GE?=
 =?us-ascii?q?wWDIQGDBgQBCq8uAoEyhVmDMIE9BoE4hnaGQUGBQT+BOByCVj6CXQEEhHU0g?=
 =?us-ascii?q?iwEg1ArLyw8A2dCj1GHToR9DZwjgwGJL4dDhACGeR+iap83kX0BRYQZgW2Be?=
 =?us-ascii?q?zMaCCYKOyoBgj4+DwECAQINAgECAQIBAgICAQECAgEBAowuinWFREIBMTcCB?=
 =?us-ascii?q?gEJAQEDCVgjijSBbQEB?=
X-MGA-submission: =?us-ascii?q?MDGfNmiFze2BYGtUDWRTDbcpbdwR2u2ebjaNye?=
 =?us-ascii?q?WTCzY893soJ2qMjSqWVpF40mXYMFexZsXJEcnBd0GnsGq+XcDg0WsVCa?=
 =?us-ascii?q?OK4sL200V5+PZP6db3JrSfMwf52Hl8mG5suEA=3D?=
Received: from osgeo6.osgeo.osuosl.org (HELO lists.osgeo.org) ([140.211.15.3])
  by mx201.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 18 Jan 2021 16:10:12 +0100
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id BBAB261449B9;
	Mon, 18 Jan 2021 07:10:07 -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 D318961449AB
 for <tiff@lists.osgeo.org>; Mon, 18 Jan 2021 07:10:05 -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 1l1WAO-0002xl-F5; Mon, 18 Jan 2021 15:10:04 +0000
From: Roger Leigh <rleigh@codelibre.net>
Message-Id: <3C7F62D0-F964-413E-9E28-D6B5D90DB5AF@codelibre.net>
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Date: Mon, 18 Jan 2021 15:10:00 +0000
In-Reply-To: <CAEZ8u0nCJ8QCW4Rv38yE+6KKPAFvqo89awvUk5snJeCwV9qu7w@mail.gmail.com>
Cc: Tiff List <tiff@lists.osgeo.org>
To: Edward Lam <edward@sidefx.com>
References: <34EDACC0-70BC-4550-BB95-E5CCACA60A59@codelibre.net>
 <CAEZ8u0nCJ8QCW4Rv38yE+6KKPAFvqo89awvUk5snJeCwV9qu7w@mail.gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Subject: Re: [Tiff] C99, part 2
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>
Content-Type: multipart/mixed; boundary="===============5129934825540876361=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>


--===============5129934825540876361==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_3611F236-B667-4745-8A2B-302F86E23846"


--Apple-Mail=_3611F236-B667-4745-8A2B-302F86E23846
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

On 18 Jan 2021, at 14:44, Edward Lam <edward@sidefx.com> wrote:
>=20
> On Sat, Jan 16, 2021 at 4:13 PM Roger Leigh wrote:
> Add legacy-types option to Autoconf and CMake, and TIFF_LEGACY_TYPES =
macro to the public headers. This can be used to build older software =
against the C99 interfaces. By default the legacy types are not =
available, but they can be made available globally at configure time =
(recommendation will be to avoid this for distributions), or on a =
per-package basis with -DTIFF_LEGACY_TYPES=3D1
> Use standard PRI format macros for formatting standard sized types
> Are these PRI format macros leaked outside of libtiff? I don't think =
these were available prior to C99? If so, does this mean that pre-C99 =
users of libtiff will need to do more than just define TIFF_LEGACY_TYPES =
to use the library?

Hi Edward,


The PRI macros are used only in the C files, and not in the public =
headers.

However, when it comes to =E2=80=9Cpre-C99=E2=80=9D users, let me =
describe the compatibility situation:

* The original merge request (part 1) made optional use of C99 types if =
they were available; there was no compatibility break
* This merge request makes the use of C99 types unconditionally =
required; you can compile pre-C99 code but you must use a C99 compiler =
and standard library to do so since stdint.h and inttypes.h are used =
directly in the public headers

The =E2=80=9CTIFF_LEGACY_TYPES=E2=80=9D macro is orthogonal to the C99 =
requirements.  It is solely to do with exposing the legacy (and now =
unused) typedef names.  In this merge request, the legacy typedef names =
are unavailable by default, but can be enabled if requested explicitly.  =
However, the actual types used by the typedefs are all C99 integer =
types:

// For backward-compatibility only; do not use.
#ifdef TIFF_LEGACY_TYPES
typedef int8_t   int8;
typedef uint8_t  uint8;

typedef int16_t  int16;
typedef uint16_t uint16;

typedef int32_t  int32;
typedef uint32_t uint32;

typedef int64_t  int64;
typedef uint64_t uint64;
#endif
As such, the =E2=80=9Clegacy-types=E2=80=9D option is primarily =
concerned with forward compatibility, being able to compile old code =
with a new libtiff using those typedefs, rather than backward =
compatibility with C89.  The overall intent of this merge request (part =
2) is to move up to C99 by making it a requirement.


Kind regards,
Roger


--Apple-Mail=_3611F236-B667-4745-8A2B-302F86E23846
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"">On =
18 Jan 2021, at 14:44, Edward Lam &lt;<a href=3D"mailto:edward@sidefx.com"=
 class=3D"">edward@sidefx.com</a>&gt; wrote:<br =
class=3D""><div><blockquote type=3D"cite" class=3D""><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D""><div dir=3D"ltr" class=3D"">On Sat, Jan 16, 2021 at 4:13 PM =
Roger Leigh wrote:<br class=3D""></div><div =
class=3D"gmail_quote"><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex"><div style=3D"overflow-wrap: =
break-word;" class=3D""><div class=3D""><ul dir=3D"auto" class=3D""><li =
class=3D"">Add&nbsp;<code class=3D"">legacy-types</code>&nbsp;option to =
Autoconf and CMake, and&nbsp;<code =
class=3D"">TIFF_LEGACY_TYPES</code>&nbsp;macro to the public headers. =
This can be used to build older software against the C99 interfaces. By =
default the legacy types are not available, but they can be made =
available globally at configure time (recommendation will be to avoid =
this for distributions), or on a per-package basis with&nbsp;<code =
class=3D"">-DTIFF_LEGACY_TYPES=3D1</code></li><li class=3D"">Use =
standard&nbsp;<code class=3D"">PRI</code>&nbsp;format macros for =
formatting standard sized types</li></ul></div></div></blockquote><div =
class=3D"">Are these PRI format macros leaked outside of libtiff? I =
don't think these were available prior to C99? If so, does this =
mean&nbsp;that pre-C99 users of libtiff will need to do more than just =
define TIFF_LEGACY_TYPES to use the library?</div></div></div>
</div></blockquote><br class=3D""></div><div>Hi Edward,</div><div><br =
class=3D""></div><div><br class=3D""></div><div>The PRI macros are used =
only in the C files, and not in the public headers.</div><div><br =
class=3D""></div><div>However, when it comes to =E2=80=9Cpre-C99=E2=80=9D =
users, let me describe the compatibility situation:</div><div><br =
class=3D""></div><div>* The original merge request (part 1) made =
optional use of C99 types if they were available; there was no =
compatibility break</div><div>* This merge request makes the use of C99 =
types unconditionally required; you can compile pre-C99 <i =
class=3D"">code</i> but you must use a C99 compiler and standard library =
to do so since <i class=3D"">stdint.h</i> and <i class=3D"">inttypes.h</i>=
 are used directly in the public headers</div><div><br =
class=3D""></div><div>The =E2=80=9CTIFF_LEGACY_TYPES=E2=80=9D macro is =
orthogonal to the C99 requirements. &nbsp;It is solely to do with =
exposing the legacy (and now unused) typedef names. &nbsp;In this merge =
request, the legacy typedef names are unavailable by default, but can be =
enabled if requested explicitly. &nbsp;However, the actual types used by =
the typedefs are all C99 integer types:</div><div><span style=3D"color: =
rgb(140, 140, 140); font-style: italic; font-family: &quot;JetBrains =
Mono&quot;, monospace; font-size: 9.8pt; background-color: rgb(255, 255, =
255);" class=3D""><br class=3D""></span></div><div><span style=3D"color: =
rgb(140, 140, 140); font-style: italic; font-family: &quot;JetBrains =
Mono&quot;, monospace; font-size: 9.8pt; background-color: rgb(255, 255, =
255);" class=3D"">// For backward-compatibility only; do not =
use.</span></div><div><pre =
style=3D"background-color:#ffffff;color:#080808;font-family:'JetBrains =
Mono',monospace;font-size:9.8pt;" class=3D""><span =
style=3D"color:#9e880d;" class=3D"">#ifdef </span><span =
style=3D"color:#1f542e;font-weight:bold;" class=3D"">TIFF_LEGACY_TYPES<br =
class=3D""></span><span style=3D"color:#38492e;" class=3D"">typedef =
int8_t   int8;<br class=3D""></span><span style=3D"color:#38492e;" =
class=3D"">typedef uint8_t  uint8;<br class=3D""></span><span =
style=3D"color:#38492e;" class=3D""><br class=3D""></span><span =
style=3D"color:#38492e;" class=3D"">typedef int16_t  int16;<br =
class=3D""></span><span style=3D"color:#38492e;" class=3D"">typedef =
uint16_t uint16;<br class=3D""></span><span style=3D"color:#38492e;" =
class=3D""><br class=3D""></span><span style=3D"color:#38492e;" =
class=3D"">typedef int32_t  int32;<br class=3D""></span><span =
style=3D"color:#38492e;" class=3D"">typedef uint32_t uint32;<br =
class=3D""></span><span style=3D"color:#38492e;" class=3D""><br =
class=3D""></span><span style=3D"color:#38492e;" class=3D"">typedef =
int64_t  int64;<br class=3D""></span><span style=3D"color:#38492e;" =
class=3D"">typedef uint64_t uint64;<br class=3D""></span><span =
style=3D"color:#9e880d;" class=3D"">#endif</span></pre><div class=3D"">As =
such, the =E2=80=9Clegacy-types=E2=80=9D option is primarily concerned =
with forward compatibility, being able to compile old code with a new =
libtiff using those typedefs, rather than backward compatibility with =
C89. &nbsp;The overall intent of this merge request (part 2) is to move =
up to C99 by making it a requirement.</div><div class=3D""><br =
class=3D""></div><div class=3D""><br class=3D""></div><div class=3D"">Kind=
 regards,</div><div class=3D"">Roger</div></div><br =
class=3D""></body></html>=

--Apple-Mail=_3611F236-B667-4745-8A2B-302F86E23846--

--===============5129934825540876361==
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

--===============5129934825540876361==--
