Re: Small patch: fix warnings during compilation on FreeBSD

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: Small patch: fix warnings during compilation on FreeBSD
Дата
Msg-id 20160311171317.58ad623d@fujitsu
обсуждение исходный текст
Ответ на Re: Small patch: fix warnings during compilation on FreeBSD  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Small patch: fix warnings during compilation on FreeBSD  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hello, Tom

> I think what we need is configure logic to find out where wcstombs_l()
> is declared, and then #include <xlocale.h> only if it's necessary to
> get that definition.  I haven't experimented but probably you could
> make such a check with nested uses of AC_CHECK_DECL.

Sounds like quite a dirty hack to me. Besides so far we have only two
procedures from xlocale.h and this requires two checks. If we go this
way someday there will be 15 checks for every procedure from xlocale.h
and logic like:

```
#if PROC1_DEFINED_IN_XLOCALE || PROC2_DEFINED_IN_XLOCALE ...
#include <xlocale.h>
#endif
```

Perhaps we could just use __FreeBSD__ macro instead (see attachments)?
Or maybe create our own macro ALWAYS_INCLUDE_XLOCALE in configure
script which currently will depend only on used OS? Naturally this
definition could be changed in the future.

Best regards,
Aleksander


Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: auto_explain sample rate
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: auto_explain sample rate