Re: Should contrib modules install .h files?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Should contrib modules install .h files?
Дата
Msg-id 1e7bb14a-d537-2c46-1150-5c8f9d4f2a13@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Should contrib modules install .h files?  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
On 01/08/2018 06:17, Andrew Gierth wrote:
> Either way, it's a forced change to the PGXS module's file layout if it
> wants to install headers that work for other people using Tom's
> suggested approach. I'm not on board with this unless there's a better
> solution than I've seen so far.

The problem is that the way we've left it now is so that 50% of the
users will do it wrong.

This reminds me vividly of libxml headers.  For example, on my system
there is a file at

/usr/include/libxml2/libxml/parser.h

How do you use that?

-I/usr/include and #include "libxml2/libxml/parser.h"

or

-I/usr/include/libxml2 and #include "libxml/parser.h"

or

-I/usr/include/libxml2/libxml and #include "parser.h"

Obviously, one can find this out with some experimentation or research,
but in our case there won't be much guidance available.

In the libxml case, the best solution is xml2-config or pkg-config.  I
would like to see something similar here, where users don't have to
fiddle with PG_CPPFLAGS directly.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Paul Guo
Дата:
Сообщение: [Patch] Create a new session in postmaster by calling setsid()
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Alter index rename concurrently to