]> granicus.if.org Git - postgresql/commitdiff
Avoid macro-redefinition warnings on Windows, per Andrew Dunstan.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 21 Oct 2004 19:49:27 +0000 (19:49 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 21 Oct 2004 19:49:27 +0000 (19:49 +0000)
contrib/tsearch2/rewrite.c
contrib/tsearch2/wparser_def.c

index 4d7294cd74a773d26eb7ee31f02067df5b33673f..e7b5045c9e912ddbfc460d3acd696a9d73b680d1 100644 (file)
@@ -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
index 21b41eef8f6dbc14ad245b702b93d060352f7c26..93368b1e8974ea89b5de8e30c0e92fae81fa6e40 100644 (file)
@@ -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
 {