Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit66ee851

Browse files
committed
Further fix interaction of Perl and stdbool.h
In the case that PostgreSQL uses stdbool.h but Perl doesn't, we need toprevent Perl from defining bool, to prevent compiler warnings aboutredefinition.
1 parent4b53872 commit66ee851

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/pl/plperl/plperl.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@
5050
#define__inline__ inline
5151
#endif
5252

53+
/*
54+
* Regarding bool, both PostgreSQL and Perl might use stdbool.h or not,
55+
* depending on configuration. If both agree, things are relatively harmless.
56+
* If not, things get tricky. If PostgreSQL does but Perl does not, define
57+
* HAS_BOOL here so that Perl does not redefine bool; this avoids compiler
58+
* warnings. If PostgreSQL does not but Perl does, we need to undefine bool
59+
* after we include the Perl headers; see below.
60+
*/
61+
#ifdefUSE_STDBOOL
62+
#defineHAS_BOOL 1
63+
#endif
64+
5365

5466
/*
5567
* Get the basic Perl API. We use PERL_NO_GET_CONTEXT mode so that our code

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp