Re: Autoconf, libpq and replacement function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Autoconf, libpq and replacement function
Дата
Msg-id 7321.1227212581@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Autoconf, libpq and replacement function  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Autoconf, libpq and replacement function  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> *** a/src/include/port.h
> --- b/src/include/port.h
> ***************
> *** 393,398 **** extern void unsetenv(const char *name);
> --- 393,409 ----
>   extern void srandom(unsigned int seed);
>   #endif 
> + #ifdef HAVE_FNMATCH
> + extern int fnmatch(const char *, const char *, int);
> + #define FNM_NOMATCH        1        /* Match failed. */
> + #define FNM_NOSYS        2        /* Function not implemented. */
> + #define FNM_NOESCAPE    0x01    /* Disable backslash escaping. */
> + #define FNM_PATHNAME    0x02    /* Slash must be matched by slash. */
> + #define FNM_PERIOD        0x04    /* Period must be matched by period. */
> + #define FNM_CASEFOLD    0x08    /* Pattern is matched case-insensitive */
> + #define FNM_LEADING_DIR    0x10    /* Ignore /<tail> after Imatch. */
> + #endif
> + 

Surely we must *not* be providing our own definitions of these symbols
when using a system version of fnmatch.

Also, judging from the comments in the autoconf manual, you'd better
use AC_FUNC_FNMATCH not just test whether the function exists.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_upgrade: How to deal with toast
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Autoconf, libpq and replacement function