Skip to content

Commit 3fdd33a

Browse files
committed
Avoid macro-redefinition warnings on Windows, per Andrew Dunstan.
1 parent 380bd04 commit 3fdd33a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

contrib/tsearch2/rewrite.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ clean_NOT_v2(ITEM * ptr, int4 *len)
174174
return plaintree(clean_NOT_intree(root), len);
175175
}
176176

177+
178+
#ifdef V_UNKNOWN /* exists in Windows headers */
179+
#undef V_UNKNOWN
180+
#endif
181+
177182
#define V_UNKNOWN 0
178183
#define V_TRUE 1
179184
#define V_FALSE 2

contrib/tsearch2/wparser_def.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ prsd_end(PG_FUNCTION_ARGS)
7676
#define ENDPUNCTOKEN(x) ( (x)==12 )
7777

7878

79-
#define IDIGNORE(x) ( (x)==13 || (x)==14 || (x)==12 || (x)==23 )
79+
#define TS_IDIGNORE(x) ( (x)==13 || (x)==14 || (x)==12 || (x)==23 )
8080
#define HLIDIGNORE(x) ( (x)==5 || (x)==13 || (x)==15 || (x)==16 || (x)==17 )
8181
#define HTMLHLIDIGNORE(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 )
8282
#define NONWORDTOKEN(x) ( (x)==12 || HLIDIGNORE(x) )
83-
#define NOENDTOKEN(x) ( NONWORDTOKEN(x) || (x)==7 || (x)==8 || (x)==20 || (x)==21 || (x)==22 || IDIGNORE(x) )
83+
#define NOENDTOKEN(x) ( NONWORDTOKEN(x) || (x)==7 || (x)==8 || (x)==20 || (x)==21 || (x)==22 || TS_IDIGNORE(x) )
8484

8585
typedef struct
8686
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy