Location to specify C compiler option in C extension

Поиск
Список
Период
Сортировка
От Demitri Muna
Тема Location to specify C compiler option in C extension
Дата
Msg-id 5186A762-290F-42CC-851E-E9D873CE51B0@demitri.com
обсуждение исходный текст
Ответы Re: Location to specify C compiler option in C extension  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

I’m writing a C extension and have successfully based my Makefile on existing templates. This conveniently hides the
detailsof 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
forbidsmixed declarations and code”). These are the variables I currently define: 

EXTENSION
DATA
PGFILEDESC
MODULE_big
PG_CPPFLAGS (this one seemed like the right place)
SHLIB_LINK
OBJS
PG_CONFIG
PGXS

A workaround has been:

OBJS = file1.o file2.o CPPFLAGS+=-Wdeclaration-after-statement

but it’s not exactly the same thing.

Thanks,
Demitri



В списке pgsql-general по дате отправления:

Предыдущее
От: Demitri Muna
Дата:
Сообщение: Re: Getting a primitive numeric value from "DatumGetNumeric"?
Следующее
От: Keiko Oda
Дата:
Сообщение: Trigger file behavior with the standby