Re: Location to specify C compiler option in C extension

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Demitri Muna <postgresql(at)demitri(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Location to specify C compiler option in C extension
Date: 2018-02-23 19:09:44
Message-ID: 15098.1519412984@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Demitri Muna <postgresql(at)demitri(dot)com> writes:
> I’m writing a C extension and have successfully based my Makefile on existing templates. This conveniently hides the details of the full Makefile provided by "pg_config --pgxs”. Which variable would be the appropriate one to specify the ‘-std=c99’ compiler flag? I’ve tried many and still get warnings that this flag should suppress (specifically, "ISO C90 forbids mixed declarations and code”). These are the variables I currently define:

PG_CPPFLAGS ought to work. One point is that you need to set that before
including pgxs.mk; maybe it's an ordering problem?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2018-02-23 19:10:00 Re: PQConsumeinput stuck on recv
Previous Message Andre Oliveira Freitas 2018-02-23 18:59:18 Re: PQConsumeinput stuck on recv