pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Demitri Muna <postgresql@demitri.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Location to specify C compiler option in C extension
Date: Fri, 23 Feb 2018 14:09:44 -0500
Message-ID: <15098.1519412984@sss.pgh.pa.us> (raw)
In-Reply-To: <5186A762-290F-42CC-851E-E9D873CE51B0@demitri.com>
References: <5186A762-290F-42CC-851E-E9D873CE51B0@demitri.com>

Demitri Muna <postgresql@demitri.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




view thread (3+ messages)  latest in thread

Message-ID: <15098.1519412984@sss.pgh.pa.us>
Permalink:  ../15098.1519412984@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15098.1519412984@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgresql@demitri.com
  Subject: Re: Location to specify C compiler option in C extension
  In-Reply-To: <15098.1519412984@sss.pgh.pa.us>
  References: <5186A762-290F-42CC-851E-E9D873CE51B0@demitri.com> <15098.1519412984@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox