Updated Branches: refs/heads/chaz_compiler_flags 608794946 -> 8c616631d
Restore lost HAS_BOOL flag, fixing MSVC build. Our core source files don't need -DHAS_BOOL, but files such as perl/xs/Lucy/Document/Doc.c which "fill in" functions left incomplete by the core and pound-include the Perl headers need it. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8c616631 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8c616631 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8c616631 Branch: refs/heads/chaz_compiler_flags Commit: 8c616631d8a286aaaa47326b4f49d4b3c7ce67e2 Parents: 6087949 Author: Marvin Humphrey <[email protected]> Authored: Thu Dec 13 19:39:21 2012 -0800 Committer: Marvin Humphrey <[email protected]> Committed: Thu Dec 13 19:39:21 2012 -0800 ---------------------------------------------------------------------- clownfish/runtime/common/charmonizer.c | 10 ++++++++++ clownfish/runtime/common/charmonizer.main | 10 ++++++++++ common/charmonizer.c | 10 ++++++++++ common/charmonizer.main | 10 ++++++++++ 4 files changed, 40 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/8c616631/clownfish/runtime/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c index 8e23906..8aeb8b5 100644 --- a/clownfish/runtime/common/charmonizer.c +++ b/clownfish/runtime/common/charmonizer.c @@ -4798,6 +4798,16 @@ S_add_compiler_flags(struct chaz_CLIArgs *args) { /* Redefine 'for' to fix broken 'for' scoping under MSVC6. */ chaz_CC_add_extra_cflags("-Dfor=\"if(0);else for\""); + + /* When compiling for Perl bindings, define HAS_BOOL so that the Perl + * headers don't redefine 'bool' in conflict with C++. + * + * TODO: Compile all files that #include Perl headers separately and + * remove this directive. + */ + if (args->charmony_pm) { + chaz_CC_add_extra_cflags("-DHAS_BOOL"); + } } } http://git-wip-us.apache.org/repos/asf/lucy/blob/8c616631/clownfish/runtime/common/charmonizer.main ---------------------------------------------------------------------- diff --git a/clownfish/runtime/common/charmonizer.main b/clownfish/runtime/common/charmonizer.main index 56c83a0..cb3649c 100644 --- a/clownfish/runtime/common/charmonizer.main +++ b/clownfish/runtime/common/charmonizer.main @@ -66,6 +66,16 @@ S_add_compiler_flags(struct chaz_CLIArgs *args) { /* Redefine 'for' to fix broken 'for' scoping under MSVC6. */ chaz_CC_add_extra_cflags("-Dfor=\"if(0);else for\""); + + /* When compiling for Perl bindings, define HAS_BOOL so that the Perl + * headers don't redefine 'bool' in conflict with C++. + * + * TODO: Compile all files that #include Perl headers separately and + * remove this directive. + */ + if (args->charmony_pm) { + chaz_CC_add_extra_cflags("-DHAS_BOOL"); + } } } http://git-wip-us.apache.org/repos/asf/lucy/blob/8c616631/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/common/charmonizer.c b/common/charmonizer.c index bf84c96..e72b4b4 100644 --- a/common/charmonizer.c +++ b/common/charmonizer.c @@ -4797,6 +4797,16 @@ S_add_compiler_flags(struct chaz_CLIArgs *args) { /* Redefine 'for' to fix broken 'for' scoping under MSVC6. */ chaz_CC_add_extra_cflags("-Dfor=\"if(0);else for\""); + + /* When compiling for Perl bindings, define HAS_BOOL so that the Perl + * headers don't redefine 'bool' in conflict with C++. + * + * TODO: Compile all files that #include Perl headers separately and + * remove this directive. + */ + if (args->charmony_pm) { + chaz_CC_add_extra_cflags("-DHAS_BOOL"); + } } } http://git-wip-us.apache.org/repos/asf/lucy/blob/8c616631/common/charmonizer.main ---------------------------------------------------------------------- diff --git a/common/charmonizer.main b/common/charmonizer.main index c8a6d24..0ce07e7 100644 --- a/common/charmonizer.main +++ b/common/charmonizer.main @@ -65,6 +65,16 @@ S_add_compiler_flags(struct chaz_CLIArgs *args) { /* Redefine 'for' to fix broken 'for' scoping under MSVC6. */ chaz_CC_add_extra_cflags("-Dfor=\"if(0);else for\""); + + /* When compiling for Perl bindings, define HAS_BOOL so that the Perl + * headers don't redefine 'bool' in conflict with C++. + * + * TODO: Compile all files that #include Perl headers separately and + * remove this directive. + */ + if (args->charmony_pm) { + chaz_CC_add_extra_cflags("-DHAS_BOOL"); + } } }
