From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Autoconf, libpq and replacement function |
Date: | 2008-11-20 21:09:47 |
Message-ID: | 4925D21B.3050903@hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Tom Lane wrote:
>>> Since fnmatch and the #define's are supposed to be provided by
>>> <fnmatch.h>, I think you should probably put the substitute definitions
>>> in a substitute fnmatch.h, not port.h, to avoid that risk.
>
>> Do we have an example where we do that before? I assume there is some
>> autoconfy way to make that include file only "appear" in the include
>> path if the system one doesn't exist or is broken?
>
> Not really. I'd suggest making the callers do something like
>
> #ifdef HAVE_FNMATCH
> #include <fnmatch.h>
> #else
> #include "port/pg_fnmatch.h"
> #endif
How's that actually different from the
#ifdef HAVE_FNMATCH
#include <fnmatch.h> <-- happens in fe-secure.c
#else
#define .... <-- happens in port.h
#endif
If HAVE_FNMATCH isn't set, we still have the same problem, no?
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-11-20 21:11:50 | Re: array_agg and array_accum (patch) |
Previous Message | Bruce Momjian | 2008-11-20 21:06:49 | Re: [GENERAL] db_user_namespace, md5 and changing passwords |