Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buJhJ-00051x-SE for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 13:35:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buJhJ-00075T-Er for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 13:35:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buJfv-0005Uv-Aj for pgsql-hackers@postgresql.org; Wed, 12 Oct 2016 13:34:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buJfr-0002Sl-NC for pgsql-hackers@postgresql.org; Wed, 12 Oct 2016 13:34:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9CDYLHj008028; Wed, 12 Oct 2016 09:34:21 -0400 From: Tom Lane To: Albe Laurenz cc: "pgsql-hackers@postgreSQL.org" Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1 In-reply-to: References: <5586.1476276329@sss.pgh.pa.us> Comments: In-reply-to Albe Laurenz message dated "Wed, 12 Oct 2016 13:22:03 -0000" Date: Wed, 12 Oct 2016 09:34:21 -0400 Message-ID: <8027.1476279261@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Albe Laurenz writes: > Tom Lane wrote: >> The lack of complaints about this suggest that it's not actually necessary >> to do so. So what this makes me wonder is whether we can't drop the >> DLLEXPORT on the finfo function too. I'd rather reduce the number of >> Microsoft-isms in the code, not increase it. > I understand the sentiment. > But it seems to actually cause a problem on Windows, at least there was a > complaint here: http://stackoverflow.com/q/39964233 > Adding PGDLLEXPORT solved the problem there. > I guess that there are not more complaints about that because > few people build C functions on Windows themselves (lack of PGXS) > and those who do are probably knowledgeable enough that they can > fix it themselves by sticking an extra declaration with PGDLLEXPORT > into their source file. > PostgreSQL itself seems to use export files that explicitly declare the > exported symbols, so it gets away without these decorations. Except that we don't. There aren't PGDLLEXPORT markings for any functions exported from contrib modules, and we don't use dlltool on them either. By your argument, none of contrib would work on Windows builds at all, but we have a ton of buildfarm evidence and successful field use to the contrary. How is that all working? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers