Fix build failure with newer ICU
ICU 69 causes compile failures with PostgreSQL 10. ICU 69 has switched to using stdbool.h, which conflicts with the home-made definitions that we used until PostgreSQL 10. Newer PostgreSQL major versions are therefore not affected. (Older PostgreSQL versions don't have ICU support.) The workaround is to undefine "bool" after including ICU headers, similar to the solution already in place for plperl for the same underlying reasons. Discussion: https://www.postgresql.org/message-id/flat/28588e5a-c204-0361-01f1-a1ee1b590233%40enterprisedb.com
This commit is contained in:
parent
d8569db764
commit
e7be25039e
@ -84,6 +84,10 @@
|
||||
|
||||
#ifdef USE_ICU
|
||||
#include <unicode/ustring.h>
|
||||
/* ICU might have a different definition of "bool", don't buy it */
|
||||
#ifdef bool
|
||||
#undef bool
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "catalog/pg_collation.h"
|
||||
|
@ -67,6 +67,10 @@
|
||||
|
||||
#ifdef USE_ICU
|
||||
#include <unicode/ucnv.h>
|
||||
/* ICU might have a different definition of "bool", don't buy it */
|
||||
#ifdef bool
|
||||
#undef bool
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -17,6 +17,10 @@
|
||||
#endif
|
||||
#ifdef USE_ICU
|
||||
#include <unicode/ucol.h>
|
||||
/* ICU might have a different definition of "bool", don't buy it */
|
||||
#ifdef bool
|
||||
#undef bool
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "utils/guc.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user