You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/03/02 21:06:36 UTC
[lucy-commits] [14/15] git commit: refs/heads/c-bindings-wip2 - Regenerate
charmonizer.c
Regenerate charmonizer.c
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/0fc39d5e
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/0fc39d5e
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/0fc39d5e
Branch: refs/heads/c-bindings-wip2
Commit: 0fc39d5ef6350ac337b99428a0cd1c762cedd146
Parents: b1f7137
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Mar 2 17:52:15 2013 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Mar 2 17:52:15 2013 +0100
----------------------------------------------------------------------
clownfish/compiler/common/charmonizer.c | 1 +
clownfish/runtime/common/charmonizer.c | 64 +++++++++++++++++++++++++
common/charmonizer.c | 65 ++++++++++++++++++++++++++
3 files changed, 130 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/0fc39d5e/clownfish/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/common/charmonizer.c b/clownfish/compiler/common/charmonizer.c
index b431d19..2748a35 100644
--- a/clownfish/compiler/common/charmonizer.c
+++ b/clownfish/compiler/common/charmonizer.c
@@ -4064,6 +4064,7 @@ chaz_Headers_probe_posix(void) {
"fcntl.h",
"grp.h",
"pwd.h",
+ "regex.h",
"sys/stat.h",
"sys/times.h",
"sys/types.h",
http://git-wip-us.apache.org/repos/asf/lucy/blob/0fc39d5e/clownfish/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c
index 6401759..1c7c612 100644
--- a/clownfish/runtime/common/charmonizer.c
+++ b/clownfish/runtime/common/charmonizer.c
@@ -1207,6 +1207,24 @@ void chaz_Memory_run(void);
/***************************************************************************/
+#line 21 "src/Charmonizer/Probe/RegularExpressions.h"
+/* Charmonizer/Probe/RegularExpressions.h -- regular expressions.
+ */
+
+#ifndef H_CHAZ_REGULAREXPRESSIONS
+#define H_CHAZ_REGULAREXPRESSIONS
+
+/* Run the RegularExpressions module.
+ */
+void chaz_RegularExpressions_run(void);
+
+#endif /* H_CHAZ_REGULAREXPRESSIONS */
+
+
+
+
+/***************************************************************************/
+
#line 21 "src/Charmonizer/Probe/Strings.h"
/* Charmonizer/Probe/Strings.h
*/
@@ -4615,6 +4633,7 @@ chaz_Headers_probe_posix(void) {
"fcntl.h",
"grp.h",
"pwd.h",
+ "regex.h",
"sys/stat.h",
"sys/times.h",
"sys/types.h",
@@ -5504,6 +5523,51 @@ chaz_Memory_probe_alloca(void) {
/***************************************************************************/
+#line 17 "src/Charmonizer/Probe/RegularExpressions.c"
+/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/ConfWriter.h" */
+/* #include "Charmonizer/Probe/RegularExpressions.h" */
+
+void
+chaz_RegularExpressions_run(void) {
+ int has_regex_h = chaz_HeadCheck_check_header("regex.h");
+ int has_pcre_h = chaz_HeadCheck_check_header("pcre.h");
+ int has_pcreposix_h = chaz_HeadCheck_check_header("pcreposix.h");
+
+ chaz_ConfWriter_start_module("RegularExpressions");
+
+ /* PCRE headers. */
+ if (has_pcre_h) {
+ chaz_ConfWriter_add_def("HAS_PCRE_H", NULL);
+ }
+ if (has_pcreposix_h) {
+ chaz_ConfWriter_add_def("HAS_PCREPOSIX_H", NULL);
+ }
+
+ /* Check for OS X enhanced regexes. */
+ if (has_regex_h) {
+ const char *reg_enhanced_code =
+ CHAZ_QUOTE( #include <regex.h> )
+ CHAZ_QUOTE( int main(int argc, char **argv) { )
+ CHAZ_QUOTE( regex_t re; )
+ CHAZ_QUOTE( if (regcomp(&re, "^", REG_ENHANCED)) { )
+ CHAZ_QUOTE( return 1; )
+ CHAZ_QUOTE( } )
+ CHAZ_QUOTE( return 0; )
+ CHAZ_QUOTE( } );
+
+ if (chaz_CC_test_compile(reg_enhanced_code)) {
+ chaz_ConfWriter_add_def("HAS_REG_ENHANCED", NULL);
+ }
+ }
+
+ chaz_ConfWriter_end_module();
+}
+
+
+
+/***************************************************************************/
+
#line 17 "src/Charmonizer/Probe/Strings.c"
/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
http://git-wip-us.apache.org/repos/asf/lucy/blob/0fc39d5e/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index dd905ea..1229026 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -1207,6 +1207,24 @@ void chaz_Memory_run(void);
/***************************************************************************/
+#line 21 "src/Charmonizer/Probe/RegularExpressions.h"
+/* Charmonizer/Probe/RegularExpressions.h -- regular expressions.
+ */
+
+#ifndef H_CHAZ_REGULAREXPRESSIONS
+#define H_CHAZ_REGULAREXPRESSIONS
+
+/* Run the RegularExpressions module.
+ */
+void chaz_RegularExpressions_run(void);
+
+#endif /* H_CHAZ_REGULAREXPRESSIONS */
+
+
+
+
+/***************************************************************************/
+
#line 21 "src/Charmonizer/Probe/Strings.h"
/* Charmonizer/Probe/Strings.h
*/
@@ -4615,6 +4633,7 @@ chaz_Headers_probe_posix(void) {
"fcntl.h",
"grp.h",
"pwd.h",
+ "regex.h",
"sys/stat.h",
"sys/times.h",
"sys/types.h",
@@ -5504,6 +5523,51 @@ chaz_Memory_probe_alloca(void) {
/***************************************************************************/
+#line 17 "src/Charmonizer/Probe/RegularExpressions.c"
+/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/ConfWriter.h" */
+/* #include "Charmonizer/Probe/RegularExpressions.h" */
+
+void
+chaz_RegularExpressions_run(void) {
+ int has_regex_h = chaz_HeadCheck_check_header("regex.h");
+ int has_pcre_h = chaz_HeadCheck_check_header("pcre.h");
+ int has_pcreposix_h = chaz_HeadCheck_check_header("pcreposix.h");
+
+ chaz_ConfWriter_start_module("RegularExpressions");
+
+ /* PCRE headers. */
+ if (has_pcre_h) {
+ chaz_ConfWriter_add_def("HAS_PCRE_H", NULL);
+ }
+ if (has_pcreposix_h) {
+ chaz_ConfWriter_add_def("HAS_PCREPOSIX_H", NULL);
+ }
+
+ /* Check for OS X enhanced regexes. */
+ if (has_regex_h) {
+ const char *reg_enhanced_code =
+ CHAZ_QUOTE( #include <regex.h> )
+ CHAZ_QUOTE( int main(int argc, char **argv) { )
+ CHAZ_QUOTE( regex_t re; )
+ CHAZ_QUOTE( if (regcomp(&re, "^", REG_ENHANCED)) { )
+ CHAZ_QUOTE( return 1; )
+ CHAZ_QUOTE( } )
+ CHAZ_QUOTE( return 0; )
+ CHAZ_QUOTE( } );
+
+ if (chaz_CC_test_compile(reg_enhanced_code)) {
+ chaz_ConfWriter_add_def("HAS_REG_ENHANCED", NULL);
+ }
+ }
+
+ chaz_ConfWriter_end_module();
+}
+
+
+
+/***************************************************************************/
+
#line 17 "src/Charmonizer/Probe/Strings.c"
/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
@@ -6068,6 +6132,7 @@ int main(int argc, const char **argv) {
chaz_Floats_run();
chaz_LargeFiles_run();
chaz_Memory_run();
+ chaz_RegularExpressions_run();
chaz_SymbolVisibility_run();
chaz_UnusedVars_run();
chaz_VariadicMacros_run();