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.96) (envelope-from ) id 1vl9Pj-007m54-1w for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 17:33:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vl9Pi-002iTx-24 for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 17:33:10 +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.96) (envelope-from ) id 1vl9Ph-002iTp-1v for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 17:33:10 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vl9Pe-00000000ubN-3eCu for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 17:33:09 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 765C31D00063; Wed, 28 Jan 2026 12:33:03 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Wed, 28 Jan 2026 12:33:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1769621583; x=1769707983; bh=E8Qbdu/jCoyPgoNq5QA9kjVzgX9ztynTaUxuMVMc+WI=; b= dvfxT3JDFnBm4m/pYcrYm4/zvdn3NcrpSagLngFaSosuOLZzQeSdMygFKeK7nR7f 17VKUZ/XuxpecxlXDsvR0mqWmK3IzIVUIia/UMlpSU/kz5zxtw5vSIO2FtolNHn0 i2egLoBqvtoIzxlhBhX0F58YVOucn4Sbs18E8ZtXHL2dU3iLhsr7VpU2ffbas/va EphaLBCpaLZQ3G7PYCcWx5sYZmL2fIjDRsVdLM7HYXIPfbB1d35/7/8neGQcZHXU rL1KNfSLRRauW44qP1Wmr53PQWvy0S/WEwCbxyG1pG7wgmIPXf+VOmURBFKQ+KjG rcWldqH5DVKzy6GZHeTlGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1769621583; x= 1769707983; bh=E8Qbdu/jCoyPgoNq5QA9kjVzgX9ztynTaUxuMVMc+WI=; b=u DfB1mz/gdFBtzBk2ffWW4uKZlctG+Ma8fnc89GPTYRYYN9wh0nnFklPs/dgALGp1 pjfakjzb6feupoLd3y0kGwbJqgkEyxGt5cWH1dZYwyOgSFU5+vP9hRHSXn2Vy5ka AnXsvG2kJNc7FfBs6f7qE399GQpHomwmOgWnKTh0dfPMZZ0ATcjU2wvosIwl1nUf /ClRYVvwHhravPjEloe5jlbAqcguWAGHHypgnRol0lRDf0/ZblxEQyimPG1omIO7 Glf5gp9aje5DMY8TWaumLTGjXfEyndGMjdUNHnE47Mc6DZbKeFgCHLky8cc8oI/M K2z3s3Ux/smaX9lC5BQUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduieefleefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggugfgjsehtkefstddttdejnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedtleelvdfgjedvffeiueekfeeuleffhfegfffhgfffkeevueehieehhfei gffhvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohepledpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorh hgpdhrtghpthhtoheprhhosggvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgtphht thhopegrughithihrgdrkhgrmhgrthhhudesihgsmhdrtghomhdprhgtphhtthhopehhlh hinhhnrghkrgesihhkihdrfhhipdhrtghpthhtohepshhrihhrrghmrdhrkhesihhnrdhi sghmrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrph hoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepmhhitghhrggvlhesphgrqhhuihgv rhdrgiihiidprhgtphhtthhopehtrhhishhtrghnsehprghrthhinhdrihhopdhrtghpth htohepphhoshhtghhrvghsqdhisghmqdgrihigseiffihpughlrdhvnhgvthdrihgsmhdr tghomh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 28 Jan 2026 12:33:02 -0500 (EST) Date: Wed, 28 Jan 2026 12:33:01 -0500 From: Andres Freund To: Robert Haas , Michael Paquier Cc: Aditya Kamath , Srirama Kucherlapati , "peter@eisentraut.org" , "pgsql-hackers@lists.postgresql.org" , "hlinnaka@iki.fi" , "tristan@partin.io" , "postgres-ibm-aix@wwpdl.vnet.ibm.com" Subject: Re: AIX support Message-ID: References: <61d9ecc8-da4e-487a-9774-838b044cda4d@eisentraut.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-01-28 10:41:52 -0500, Robert Haas wrote: > On Wed, Jan 28, 2026 at 10:20 AM Aditya Kamath wrote: > > But here is the catch. It won’t pick the AIX system float.h. It will pick the Postgres "src/include/utilsfloat.h”. > > PostgreSQL's header should always be included as "utils/float.h" and > the system header should always be included as "float.h" (or, well, > , presumably). So this confusion should not exist unless the > include paths are messed up. It doesn't seem correct to me that the > include path includes src/include/utils rather than just src/include, > but I see the same thing here: I agree that this is wrong. CCing Michael and Bertrand, they added this in fa88928470b5 and 1e68e43d3f0f. > which happens because of: > > wait_event = static_library('wait_event_names', > waitevent_sources, > dependencies: [backend_code], > include_directories: include_directories('../../../include/utils'), > kwargs: internal_lib_args, > ) > > which happens because wait_event_funcs.c contains: > > #include "wait_event_funcs_data.c" > > and for some reason, that file gets placed in src/include/utils. The reason for that is that the same invocation also generates wait_event_types.h, which is included by other headers. > The attached patch, which also adjusts wait_events.c, fixes it for me. Unfortunately I suspect that'll cause issues with make builds, because there the files are generated in a different place (src/backend/activity) and then only wait_event_types.h is copied to src/include. So including the files as utils/ won't work. I'd fix that aspect by doing the same thing in the autoconf build as we do in meson, i.e. keep the file in the include dir. We already do that e.g. for guc_tables.inc.c, see this src/backend/utils/Makefile stanza: # These generated headers must be symlinked into src/include/. # We use header-stamp to record that we've done this because the symlinks # themselves may appear older than fmgr-stamp. $(top_builddir)/src/include/utils/header-stamp: fmgr-stamp errcodes.h probes.h guc_tables.inc.c cd '$(dir $@)' && for file in fmgroids.h fmgrprotos.h errcodes.h probes.h guc_tables.inc.c; do \ rm -f $$file && $(LN_S) "../../../$(subdir)/$$file" . ; \ done touch $@ Alternatively: I'm not a fan of including .c files that are not actually working C. You could just make wait_event_funcs_data.c be a complete C file, defining waitEventData, that is then built as a standalone file. Greetings, Andres Freund