Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lz1cy-00026C-Hg for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jul 2021 18:41:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lz1cx-00022d-Hc for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jul 2021 18:41:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lz1cx-00022V-AD for pgsql-hackers@lists.postgresql.org; Thu, 01 Jul 2021 18:41:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lz1cu-0005xG-89 for pgsql-hackers@lists.postgresql.org; Thu, 01 Jul 2021 18:41:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 161If9gL746422; Thu, 1 Jul 2021 14:41:10 -0400 From: Tom Lane To: Fabien COELHO cc: Aleksander Alekseev , PostgreSQL Developers Subject: Re: rand48 replacement In-reply-to: References: <43a6e30b-542f-671a-e7bb-b7f78cf90e8c@enterprisedb.com> <699567.1625156441@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Thu, 01 Jul 2021 18:51:20 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <746420.1625164869.1@sss.pgh.pa.us> Date: Thu, 01 Jul 2021 14:41:09 -0400 Message-ID: <746421.1625164869@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Fabien COELHO writes: >> Although this patch is marked RFC, the cfbot shows it doesn't >> even compile on Windows. I think you missed updating Mkvcbuild.pm. > Indeed. Here is a blind attempt at fixing the build, I'll check later to > see whether it works. It would help me if the cfbot results were > integrated into the cf app. Hmm, not there yet per cfbot, not sure why not. Anyway, after taking a very quick look at the patch itself, I've got just one main objection: I don't approve of putting this in port.h or src/port/. erand48.c is there because we envisioned it originally as an occasionally-used substitute for libc facilities. But this is most certainly not that, so it belongs in src/common/ instead. I'd also be inclined to invent a new single-purpose .h file for it. I see that you probably did that because random.c and srandom.c depend on it, but I wonder why we don't make an effort to flush those altogether. It's surely pretty confusing to newbies that what appears to be a call of the libc primitives is no such thing. regards, tom lane