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 1sbKEx-00FkZU-UX for pgsql-general@arkaria.postgresql.org; Tue, 06 Aug 2024 13:28:39 +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 1sbKEw-00HWDd-Bk for pgsql-general@arkaria.postgresql.org; Tue, 06 Aug 2024 13:28:38 +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 1sbKEw-00HWDV-0Q for pgsql-general@lists.postgresql.org; Tue, 06 Aug 2024 13:28:38 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sbKEt-003T4d-BV for pgsql-general@lists.postgresql.org; Tue, 06 Aug 2024 13:28:37 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-260e6298635so2920486fac.1 for ; Tue, 06 Aug 2024 06:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722950913; x=1723555713; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=NXoa/z8GNG6FCNeMJTTCIozw2yKMzeHCxZMhrmaurBA=; b=HzQJuwiijXeCtPKLJkKnBbnqGu5WVkZaLrGNdmc91K142fSfLZ+/eacfZsATAf83Wn 6igGIPECQ5j7tZalsrhZlWsDid+tdDAaApRxSkpCIRRxqpA497et8jB4WidMx/wNF5fh Cm+BtYqT+4Qz7ltnUBIghy8wCZFMKyUrG3OWqHLe8rZpygYWO7GA2EuRs2gOoI5xeUGY Mbk1RlwEDCdPFp9cFgGIH3cIUZXwUo3EyGateYRJ7+4UBybLmN7o2ZutHDO9HLM5IC2l B9p+rb3Akk21RsgnIG8RlsHftFgE/o9Tqml0/sGvzrfkJLqUZ1qfuLBEXlU5GLnlVxYK i5rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722950913; x=1723555713; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NXoa/z8GNG6FCNeMJTTCIozw2yKMzeHCxZMhrmaurBA=; b=LTPPuFvg0N7mBNu+3YyYlOiiVFdemDnesMxoCQgKi65f3fdIZ05ICDJYbL/CJrYnb3 cSvSxVJgazFgcLsDRNbUPKwIeM2LsW5ZThl+LaUiQEAtxiLsS7JOcJYcnx5gYZzKKdN1 Z14TGc9C++UOnw446HR7q/V85EvE0M7xqhq7ppEolKUIXySQJ09XiBZWPJczuMgWjQ8G ZdOHwIv7Y83p6KTBE5UYdsBpudKGZc9q6uUyjj2Bgh7ADrHG7uhsJrC44wBe92c9uS8b Kz428yZ35EaCBZMqwODStMssX72v3B9rQxN5fQFRN7gc1HP78Zr4MpZgtM3Rct91ueme nMsA== X-Gm-Message-State: AOJu0YyKyZROeGS8N61NjHls/Yu4o02Ocr8P1U0OtYrQITzeri7kQsn6 BZ7D8E86jGZUQZaM7yPyPFXHnrtcUqP251kqJvVM7Y2h7EOD6mJSlNPtZCGt2EumkmtqLM8/cjB hrhZVYgYDVNBIFqw9sbdc90kyb2WNLbbd X-Google-Smtp-Source: AGHT+IGBEnQ8FACFruRer3i05i7IxdW6OoNwfjwnoQeg7i7ir+qgZ5CY6orlcWOkIiNefL4SjMnQiON60t+48YpB4c8= X-Received: by 2002:a05:6870:65a2:b0:261:900:b222 with SMTP id 586e51a60fabf-2688792f532mr8045807fac.20.1722950913324; Tue, 06 Aug 2024 06:28:33 -0700 (PDT) MIME-Version: 1.0 From: Dominique Devienne Date: Tue, 6 Aug 2024 15:28:21 +0200 Message-ID: Subject: libpq version macro to use or not PQsocketPoll To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi. Now that v17beta2 is part of my dev-env, I'm trying out the new API. And I discover there's no version macro for conditional compilation in LIBPQ... I found https://www.postgresql.org/message-id/968815.1623936849%40sss.pgh.pa.us where Tom thinks that a horrible idea, and instead proposes a new _HAS_ flag instead. Except of course there's on such flag for the new PQsocketPoll in beta2... I see only 3 such _HAS_ flags. I'm not sure what's so wrong with version macro as such. - GCC has one. - [SQLite has one][1]. - Why can't LIBPQ have one? That's exactly the kind of issues they are designed to solve for code that needs to be portable across versions. What am I missing? Thanks, --DD [1]: https://www.sqlite.org/c3ref/c_source_id.html