-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathzhparser.h
More file actions
32 lines (27 loc) · 849 Bytes
/
Copy pathzhparser.h
File metadata and controls
32 lines (27 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef ZHPARSER_H
#define ZHPARSER_H
/*
* SCWS prior to 1.2.3 declared a function named `pstrdup` in scws.h, which
* collides with PostgreSQL's pstrdup() macro. Rather than #define-shadowing
* it (which is fragile if SCWS later inlines or changes the signature), we
* isolate the rename to this header only.
*
* Build systems linking against SCWS >= 1.2.3 can pass
* -DZHPARSER_SCWS_HAS_NO_PSTRDUP_CONFLICT to skip this entirely.
*/
#ifndef ZHPARSER_SCWS_HAS_NO_PSTRDUP_CONFLICT
# ifdef pstrdup
# define ZHPARSER_SAVED_PSTRDUP pstrdup
# undef pstrdup
# endif
# define pstrdup scws_pstrdup
#endif
#include "scws.h"
#ifndef ZHPARSER_SCWS_HAS_NO_PSTRDUP_CONFLICT
# undef pstrdup
# ifdef ZHPARSER_SAVED_PSTRDUP
# define pstrdup ZHPARSER_SAVED_PSTRDUP
# undef ZHPARSER_SAVED_PSTRDUP
# endif
#endif
#endif /* ZHPARSER_H */