From: Tom Lane Date: Thu, 21 Oct 2004 19:49:27 +0000 (+0000) Subject: Avoid macro-redefinition warnings on Windows, per Andrew Dunstan. X-Git-Tag: REL8_0_0BETA4~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fdd33ab99cf8c6507aa7cabc0f6a9e9dd39d9a7;p=thirdparty%2Fpostgresql.git Avoid macro-redefinition warnings on Windows, per Andrew Dunstan. --- diff --git a/contrib/tsearch2/rewrite.c b/contrib/tsearch2/rewrite.c index 4d7294cd74a..e7b5045c9e9 100644 --- a/contrib/tsearch2/rewrite.c +++ b/contrib/tsearch2/rewrite.c @@ -174,6 +174,11 @@ clean_NOT_v2(ITEM * ptr, int4 *len) return plaintree(clean_NOT_intree(root), len); } + +#ifdef V_UNKNOWN /* exists in Windows headers */ +#undef V_UNKNOWN +#endif + #define V_UNKNOWN 0 #define V_TRUE 1 #define V_FALSE 2 diff --git a/contrib/tsearch2/wparser_def.c b/contrib/tsearch2/wparser_def.c index 21b41eef8f6..93368b1e897 100644 --- a/contrib/tsearch2/wparser_def.c +++ b/contrib/tsearch2/wparser_def.c @@ -76,11 +76,11 @@ prsd_end(PG_FUNCTION_ARGS) #define ENDPUNCTOKEN(x) ( (x)==12 ) -#define IDIGNORE(x) ( (x)==13 || (x)==14 || (x)==12 || (x)==23 ) +#define TS_IDIGNORE(x) ( (x)==13 || (x)==14 || (x)==12 || (x)==23 ) #define HLIDIGNORE(x) ( (x)==5 || (x)==13 || (x)==15 || (x)==16 || (x)==17 ) #define HTMLHLIDIGNORE(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 ) #define NONWORDTOKEN(x) ( (x)==12 || HLIDIGNORE(x) ) -#define NOENDTOKEN(x) ( NONWORDTOKEN(x) || (x)==7 || (x)==8 || (x)==20 || (x)==21 || (x)==22 || IDIGNORE(x) ) +#define NOENDTOKEN(x) ( NONWORDTOKEN(x) || (x)==7 || (x)==8 || (x)==20 || (x)==21 || (x)==22 || TS_IDIGNORE(x) ) typedef struct {