Commit aa6970ef authored by Tom Lane's avatar Tom Lane

Fix some portability problems (get it to compile, at least, on HP's cc)

parent 1e277911
...@@ -95,15 +95,17 @@ static bool is_stopword(char *); ...@@ -95,15 +95,17 @@ static bool is_stopword(char *);
static bool new_tuple = false; static bool new_tuple = false;
#ifdef USE_STOP_WORDS
/* THIS LIST MUST BE IN SORTED ORDER, A BINARY SEARCH IS USED!!!! */ /* THIS LIST MUST BE IN SORTED ORDER, A BINARY SEARCH IS USED!!!! */
char *StopWords[] = { /* list of words to skip in indexing */ char *StopWords[] = { /* list of words to skip in indexing */
#ifdef SAMPLE_STOP_WORDS "no",
"no"
"the", "the",
"yes", "yes"
#endif
}; };
#endif /* USE_STOP_WORDS */
/* stuff for caching query-plans, stolen from contrib/spi/\*.c */ /* stuff for caching query-plans, stolen from contrib/spi/\*.c */
typedef struct typedef struct
{ {
...@@ -385,6 +387,7 @@ breakup(char *string, char *substring) ...@@ -385,6 +387,7 @@ breakup(char *string, char *substring)
static bool static bool
is_stopword(char *text) is_stopword(char *text)
{ {
#ifdef USE_STOP_WORDS
char **StopLow; /* for list of stop-words */ char **StopLow; /* for list of stop-words */
char **StopHigh; char **StopHigh;
char **StopMiddle; char **StopMiddle;
...@@ -406,6 +409,7 @@ is_stopword(char *text) ...@@ -406,6 +409,7 @@ is_stopword(char *text)
else else
StopHigh = StopMiddle; StopHigh = StopMiddle;
} }
#endif /* USE_STOP_WORDS */
return (false); return (false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment