From: Cédric Villemain Date: Thu, 1 Dec 2011 11:02:04 +0000 (+0100) Subject: Little fix for 8.3 compat X-Git-Tag: 1.1.1~8 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ee523b505c1752fa3e94e9a85259e5935a03a9b2;p=pgfincore.git Little fix for 8.3 compat USE_POSIX_FADVISE is first define in 8.4 so we need to add the define here. Idea behind is that we can just remove code when 8.3 is EOL. --- diff --git a/pgfincore.c b/pgfincore.c index afcbde8..4e074cd 100644 --- a/pgfincore.c +++ b/pgfincore.c @@ -135,6 +135,9 @@ static int pgfincore_file(char *filename, pgfincoreStruct *pgfncr); * and support 8.3, 8.4 and 9.0 */ #if PG_MAJOR_VERSION == 803 +#if defined(HAVE_DECL_POSIX_FADVISE) +#define USE_POSIX_FADVISE +#endif char *text_to_cstring(const text *t); text *cstring_to_text(const char *s); text *cstring_to_text_with_len(const char *s, int len); @@ -225,7 +228,7 @@ pgsysconf(PG_FUNCTION_ARGS) PG_RETURN_DATUM( HeapTupleGetDatum(tuple) ); } -#ifdef USE_POSIX_FADVISE +#if defined(USE_POSIX_FADVISE) /* * pgfadvise_file */ @@ -478,7 +481,7 @@ pgfadvise(PG_FUNCTION_ARGS) } } -#ifdef USE_POSIX_FADVISE +#if defined(USE_POSIX_FADVISE) /* * pgfadvise_file */