Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qRD0G-000uME-Sk for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Aug 2023 14:39:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qRD0E-005cip-St for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Aug 2023 14:39:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qRD0E-005cif-Ge for pgsql-hackers@lists.postgresql.org; Wed, 02 Aug 2023 14:39:06 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qRD0B-0009s1-SX for pgsql-hackers@postgresql.org; Wed, 02 Aug 2023 14:39:06 +0000 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6bc8d1878a0so4180382a34.1 for ; Wed, 02 Aug 2023 07:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon-tech.20221208.gappssmtp.com; s=20221208; t=1690987142; x=1691591942; h=in-reply-to:references:subject:cc:from:to:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FCzLJrkoSdUNWZQSSwzLHK5zeWSyWXzsuDzMWeTeDW8=; b=gU6FDa6858wOiD3/CTGaBx+pPhqzE1Md4eIcf7d87IxGlMe2iwtR1GM95fMH6tCzfw gaFL8q90o9hcWsbPDqZ24n4KpsW75CN2sdDw0t0XNuhTU9Gbt6jkuavTLYkNo+EkG5k0 1mi+sRLn9t7+pOuhSB2mg2M8hNXX9w3BIK7cHWMIj8F16l/UFcuKDwNW9oDPUtmontr5 uX3TNOV+XsV5W700LzgTond9jEiPdkctuCZ6irnVodx4dnqOzPqDG5ExWAkpLdqlF6Wv w+bNStbYh/6UJYxBu22DxGPR5pv9Ls3Um3W2NRLQebwKLSC2NyXCE24feOkFPKUb3MpV DDuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690987142; x=1691591942; h=in-reply-to:references:subject:cc:from:to:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FCzLJrkoSdUNWZQSSwzLHK5zeWSyWXzsuDzMWeTeDW8=; b=AJBxoM1atOHuUER0JAYtssSotjNPYZ4EBdkViCQUNZSCetxjhH3YnvohTiVIRgRrMu WTcEBGHhYR20w0z/upztW5OXEwKJl2sUbSR0ohDYeiA2WH7IpDABTu0kiHk5GwJgudDX y+AnW42eGNTURC/2Rug3scwe62Us8ycIYVD4SwafDDeIBf5YPHuo7uBEF/n41kF3VNCw F48KzfTqEkMRixLHxmV2oizC5xyQBnoWHBqk+BZAWxJIwSgUCmM4IMqRgzrMyhZOJm5X TLkb9R1X3BdGmi04mzKvsJKPVJnnPXfegiEPWN7k+TvIlUOC7hSu1v8ETbTf/72M2rx7 kd+Q== X-Gm-Message-State: ABy/qLavATCHOC232izB579Brh31nVHc5AWDRNHjHA7sT5Nwi26iGwiO s28FV9fXGYaNs/TJjTJM9s8/kKL0NWW0xLLo9qI= X-Google-Smtp-Source: APBJJlFWJIF8EqpERhALNTczLgWwOrS4hEYqSjKYnXjdBfGqXqlGhV/4HVJvgL5NQhUfMURo0vlKZg== X-Received: by 2002:a05:6870:a90d:b0:1bd:f87e:6ad3 with SMTP id eq13-20020a056870a90d00b001bdf87e6ad3mr12847859oab.30.1690987141786; Wed, 02 Aug 2023 07:39:01 -0700 (PDT) Received: from localhost ([2607:fb90:f238:d74d:3996:e070:71ee:42fb]) by smtp.gmail.com with ESMTPSA id dt2-20020a0568705a8200b001b03fbfa0c5sm6509262oab.39.2023.08.02.07.39.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Aug 2023 07:39:01 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Wed, 02 Aug 2023 09:39:00 -0500 Message-Id: To: "Peter Eisentraut" From: "Tristan Partin" Cc: "pgsql-hackers" Subject: Re: Improve const use in zlib-using code X-Mailer: aerc 0.15.2-111-g8803d20ad9e3 References: <33462926-bb1e-7cc9-8d92-d86318e8ed1d@eisentraut.org> In-Reply-To: <33462926-bb1e-7cc9-8d92-d86318e8ed1d@eisentraut.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter, I like the idea. Though the way you have it implemented at the moment=20 seems like a trap in that any time zlib.h is included someone also has=20 to remember to add this define. I would recommend adding the define to=20 the build systems instead. Since you put in the work to find the version of zlib that added this,=20 You might also want to add `required: '>=3D 1.2.5.2'` to the=20 `dependency('zlib')` call in the main meson.build. I am wondering if we=20 could remove the `z_streamp` check too. The version that it was added=20 isn't obvious. --=20 Tristan Partin Neon (https://neon.tech)