lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [12/14] git commit: refs/heads/chaz_namespacing - Use full symbol names in Charmonizer.
Date Thu, 01 Nov 2012 23:35:00 GMT
Use full symbol names in Charmonizer.

Since all Charmonizer source code and userland code now ends up in the
same amalgamated file, we can no longer use short names without an
elevated risk of symbol clashes.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f63547c5
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f63547c5
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f63547c5

Branch: refs/heads/chaz_namespacing
Commit: f63547c577773336132b762cfd940f1c0c2b44c6
Parents: 4193536
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Wed Oct 17 16:13:12 2012 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Thu Nov 1 14:29:55 2012 -0700

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Core/Compiler.c        |  122 ++++----
 charmonizer/src/Charmonizer/Core/ConfWriter.c      |   22 +-
 charmonizer/src/Charmonizer/Core/ConfWriterC.c     |   22 +-
 charmonizer/src/Charmonizer/Core/ConfWriterPerl.c  |   12 +-
 charmonizer/src/Charmonizer/Core/ConfWriterRuby.c  |   12 +-
 charmonizer/src/Charmonizer/Core/HeaderChecker.c   |   28 +-
 charmonizer/src/Charmonizer/Core/OperatingSystem.c |   38 ++--
 charmonizer/src/Charmonizer/Core/Util.c            |   53 ++--
 charmonizer/src/Charmonizer/Probe.c                |   38 ++--
 charmonizer/src/Charmonizer/Probe/AtomicOps.c      |   42 ++--
 charmonizer/src/Charmonizer/Probe/DirManip.c       |   98 ++++----
 charmonizer/src/Charmonizer/Probe/Floats.c         |   20 +-
 charmonizer/src/Charmonizer/Probe/FuncMacro.c      |   62 ++--
 charmonizer/src/Charmonizer/Probe/Headers.c        |   34 ++--
 charmonizer/src/Charmonizer/Probe/Integers.c       |  214 +++++++-------
 charmonizer/src/Charmonizer/Probe/LargeFiles.c     |  150 +++++-----
 charmonizer/src/Charmonizer/Probe/Memory.c         |   44 ++--
 .../src/Charmonizer/Probe/SymbolVisibility.c       |   38 ++--
 charmonizer/src/Charmonizer/Probe/UnusedVars.c     |   10 +-
 charmonizer/src/Charmonizer/Probe/VariadicMacros.c |   48 ++--
 20 files changed, 557 insertions(+), 550 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/Compiler.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Compiler.c b/charmonizer/src/Charmonizer/Core/Compiler.c
index 8b8f266..0610c9b 100644
--- a/charmonizer/src/Charmonizer/Core/Compiler.c
+++ b/charmonizer/src/Charmonizer/Core/Compiler.c
@@ -50,7 +50,7 @@ static int       defines___clang__ = 0;
 static int       warnings_as_errors = 0;    
 
 void
-CC_set_warnings_as_errors(const int flag) {
+chaz_CC_set_warnings_as_errors(const int flag) {
     warnings_as_errors = flag;
     if (warnings_as_errors) {
         if (defines__MSC_VER)  {
@@ -65,26 +65,26 @@ CC_set_warnings_as_errors(const int flag) {
 }
 
 void
-CC_init(const char *compiler_command, const char *compiler_flags) {
+chaz_CC_init(const char *compiler_command, const char *compiler_flags) {
     const char *code = "int main() { return 0; }\n";
     int compile_succeeded = 0;
 
-    if (Util_verbosity) { printf("Creating compiler object...\n"); }
+    if (chaz_Util_verbosity) { printf("Creating compiler object...\n"); }
 
     /* Assign. */
-    cc_command      = Util_strdup(compiler_command);
-    cc_flags        = Util_strdup(compiler_flags);
+    cc_command      = chaz_Util_strdup(compiler_command);
+    cc_flags        = chaz_Util_strdup(compiler_flags);
 
     /* Init. */
     inc_dirs              = (char**)calloc(sizeof(char*), 1);
 
     /* Add the current directory as an include dir. */
-    CC_add_inc_dir(".");
+    chaz_CC_add_inc_dir(".");
 
     /* Set names for the targets which we "try" to compile. */
     {
-        const char *exe_ext = OS_exe_ext();
-        const char *obj_ext = OS_obj_ext();
+        const char *exe_ext = chaz_OS_exe_ext();
+        const char *obj_ext = chaz_OS_obj_ext();
         size_t exe_len = strlen(TRY_BASENAME) + strlen(exe_ext) + 1;
         size_t obj_len = strlen(TRY_BASENAME) + strlen(obj_ext) + 1;
         try_exe_name = (char*)malloc(exe_len);
@@ -94,7 +94,7 @@ CC_init(const char *compiler_command, const char *compiler_flags) {
     }
 
     /* If we can't compile anything, game over. */
-    if (Util_verbosity) {
+    if (chaz_Util_verbosity) {
         printf("Trying to compile a small test file...\n");
     }
     /* Try POSIX argument style. */
@@ -102,29 +102,29 @@ CC_init(const char *compiler_command, const char *compiler_flags) {
     strcpy(object_flag,  "-o ");
     strcpy(exe_flag,     "-o ");
     strcpy(no_link_flag, "-c ");
-    compile_succeeded = CC_test_compile(code);
+    compile_succeeded = chaz_CC_test_compile(code);
     if (!compile_succeeded) {
         /* Try MSVC argument style. */
         strcpy(include_flag, "/I");
         strcpy(object_flag,  "/Fo");
         strcpy(exe_flag,     "/Fe");
         strcpy(no_link_flag, "/c");
-        compile_succeeded = CC_test_compile(code);
+        compile_succeeded = chaz_CC_test_compile(code);
     }
     if (!compile_succeeded) {
-        Util_die("Failed to compile a small test file");
+        chaz_Util_die("Failed to compile a small test file");
     }
 
     S_detect_known_compilers();
 }
 
 static const char detect_macro_code[] =
-    QUOTE(  int main() {                   )
-    QUOTE(  #ifndef %s                     )
-    QUOTE(  #error "nope"                  )
-    QUOTE(  #endif                         )
-    QUOTE(      return 0;                  )
-    QUOTE(  }                              );
+    CHAZ_QUOTE(  int main() {                   )
+    CHAZ_QUOTE(  #ifndef %s                     )
+    CHAZ_QUOTE(  #error "nope"                  )
+    CHAZ_QUOTE(  #endif                         )
+    CHAZ_QUOTE(      return 0;                  )
+    CHAZ_QUOTE(  }                              );
 
 static int
 S_detect_macro(const char *macro) {
@@ -132,7 +132,7 @@ S_detect_macro(const char *macro) {
     char *code = (char*)malloc(size);
     int retval;
     sprintf(code, detect_macro_code, macro);
-    retval = CC_test_compile(code);
+    retval = chaz_CC_test_compile(code);
     free(code);
     return retval;
 }
@@ -145,7 +145,7 @@ S_detect_known_compilers(void) {
 }
 
 void
-CC_clean_up(void) {
+chaz_CC_clean_up(void) {
     char **dirs;
 
     for (dirs = inc_dirs; *dirs != NULL; dirs++) {
@@ -180,9 +180,9 @@ S_inc_dir_string(void) {
 }
 
 int
-CC_compile_exe(const char *source_path, const char *exe_name,
-               const char *code) {
-    const char *exe_ext        = OS_exe_ext();
+chaz_CC_compile_exe(const char *source_path, const char *exe_name,
+                    const char *code) {
+    const char *exe_ext        = chaz_OS_exe_ext();
     size_t   exe_file_buf_size = strlen(exe_name) + strlen(exe_ext) + 1;
     char    *exe_file          = (char*)malloc(exe_file_buf_size);
     size_t   junk_buf_size     = exe_file_buf_size + 3;
@@ -201,7 +201,7 @@ CC_compile_exe(const char *source_path, const char *exe_name,
     int result;
 
     /* Write the source file. */
-    Util_write_file(source_path, code);
+    chaz_Util_write_file(source_path, code);
 
     /* Prepare and run the compiler command. */
     sprintf(command, "%s %s %s %s%s %s %s",
@@ -209,8 +209,8 @@ CC_compile_exe(const char *source_path, const char *exe_name,
             source_path, exe_flag, 
             exe_file, inc_dir_string, 
             cc_flags);
-    if (Util_verbosity < 2) {
-        OS_run_quietly(command);
+    if (chaz_Util_verbosity < 2) {
+        chaz_OS_run_quietly(command);
     }
     else {
         system(command);
@@ -219,17 +219,17 @@ CC_compile_exe(const char *source_path, const char *exe_name,
     if (defines__MSC_VER) {
         /* Zap MSVC junk. */
         sprintf(junk, "%s.obj", exe_name);
-        Util_remove_and_verify(junk);
+        chaz_Util_remove_and_verify(junk);
         sprintf(junk, "%s.ilk", exe_name);
-        Util_remove_and_verify(junk);
+        chaz_Util_remove_and_verify(junk);
         sprintf(junk, "%s.pdb", exe_name);
-        Util_remove_and_verify(junk);
+        chaz_Util_remove_and_verify(junk);
     }
 
     /* See if compilation was successful.  Remove the source file. */
-    result = Util_can_open_file(exe_file);
-    if (!Util_remove_and_verify(source_path)) {
-        Util_die("Failed to remove '%s'", source_path);
+    result = chaz_Util_can_open_file(exe_file);
+    if (!chaz_Util_remove_and_verify(source_path)) {
+        chaz_Util_die("Failed to remove '%s'", source_path);
     }
 
     free(command);
@@ -240,9 +240,9 @@ CC_compile_exe(const char *source_path, const char *exe_name,
 }
 
 int
-CC_compile_obj(const char *source_path, const char *obj_name,
-               const char *code) {
-    const char *obj_ext        = OS_obj_ext();
+chaz_CC_compile_obj(const char *source_path, const char *obj_name,
+                    const char *code) {
+    const char *obj_ext        = chaz_OS_obj_ext();
     size_t   obj_file_buf_size = strlen(obj_name) + strlen(obj_ext) + 1;
     char    *obj_file          = (char*)malloc(obj_file_buf_size);
     size_t   obj_file_buf_len  = sprintf(obj_file, "%s%s", obj_name, obj_ext);
@@ -260,7 +260,7 @@ CC_compile_obj(const char *source_path, const char *obj_name,
     int result;
 
     /* Write the source file. */
-    Util_write_file(source_path, code);
+    chaz_Util_write_file(source_path, code);
 
     /* Prepare and run the compiler command. */
     sprintf(command, "%s %s %s %s %s%s %s %s",
@@ -268,17 +268,17 @@ CC_compile_obj(const char *source_path, const char *obj_name,
             source_path, object_flag, 
             obj_file, inc_dir_string,
             cc_flags);
-    if (Util_verbosity < 2) {
-        OS_run_quietly(command);
+    if (chaz_Util_verbosity < 2) {
+        chaz_OS_run_quietly(command);
     }
     else {
         system(command);
     }
 
     /* See if compilation was successful.  Remove the source file. */
-    result = Util_can_open_file(obj_file);
-    if (!Util_remove_and_verify(source_path)) {
-        Util_die("Failed to remove '%s'", source_path);
+    result = chaz_Util_can_open_file(obj_file);
+    if (!chaz_Util_remove_and_verify(source_path)) {
+        chaz_Util_die("Failed to remove '%s'", source_path);
     }
 
     free(command);
@@ -288,51 +288,51 @@ CC_compile_obj(const char *source_path, const char *obj_name,
 }
 
 int
-CC_test_compile(const char *source) {
+chaz_CC_test_compile(const char *source) {
     int compile_succeeded;
-    if (!Util_remove_and_verify(try_obj_name)) {
-        Util_die("Failed to delete file '%s'", try_obj_name);
+    if (!chaz_Util_remove_and_verify(try_obj_name)) {
+        chaz_Util_die("Failed to delete file '%s'", try_obj_name);
     }
-    compile_succeeded = CC_compile_obj(TRY_SOURCE_PATH, TRY_BASENAME,
-                                       source);
-    Util_remove_and_verify(try_obj_name);
+    compile_succeeded = chaz_CC_compile_obj(TRY_SOURCE_PATH, TRY_BASENAME,
+                                            source);
+    chaz_Util_remove_and_verify(try_obj_name);
     return compile_succeeded;
 }
 
 char*
-CC_capture_output(const char *source, size_t *output_len) {
+chaz_CC_capture_output(const char *source, size_t *output_len) {
     char *captured_output = NULL;
     int compile_succeeded;
 
     /* Clear out previous versions and test to make sure removal worked. */
-    if (!Util_remove_and_verify(try_exe_name)) {
-        Util_die("Failed to delete file '%s'", try_exe_name);
+    if (!chaz_Util_remove_and_verify(try_exe_name)) {
+        chaz_Util_die("Failed to delete file '%s'", try_exe_name);
     }
-    if (!Util_remove_and_verify(TARGET_PATH)) {
-        Util_die("Failed to delete file '%s'", TARGET_PATH);
+    if (!chaz_Util_remove_and_verify(TARGET_PATH)) {
+        chaz_Util_die("Failed to delete file '%s'", TARGET_PATH);
     }
 
     /* Attempt compilation; if successful, run app and slurp output. */
-    compile_succeeded = CC_compile_exe(TRY_SOURCE_PATH, TRY_BASENAME,
-                                       source);
+    compile_succeeded = chaz_CC_compile_exe(TRY_SOURCE_PATH, TRY_BASENAME,
+                                            source);
     if (compile_succeeded) {
-        OS_run_local(try_exe_name, NULL);
-        captured_output = Util_slurp_file(TARGET_PATH, output_len);
+        chaz_OS_run_local(try_exe_name, NULL);
+        captured_output = chaz_Util_slurp_file(TARGET_PATH, output_len);
     }
     else {
         *output_len = 0;
     }
 
     /* Remove all the files we just created. */
-    Util_remove_and_verify(TRY_SOURCE_PATH);
-    Util_remove_and_verify(try_exe_name);
-    Util_remove_and_verify(TARGET_PATH);
+    chaz_Util_remove_and_verify(TRY_SOURCE_PATH);
+    chaz_Util_remove_and_verify(try_exe_name);
+    chaz_Util_remove_and_verify(TARGET_PATH);
 
     return captured_output;
 }
 
 void
-CC_add_inc_dir(const char *dir) {
+chaz_CC_add_inc_dir(const char *dir) {
     size_t num_dirs = 0;
     char **dirs = inc_dirs;
 
@@ -342,7 +342,7 @@ CC_add_inc_dir(const char *dir) {
     inc_dirs = (char**)realloc(inc_dirs, (num_dirs + 1) * sizeof(char*));
 
     /* Put the passed-in dir at the end of the list. */
-    inc_dirs[num_dirs - 1] = Util_strdup(dir);
+    inc_dirs[num_dirs - 1] = chaz_Util_strdup(dir);
     inc_dirs[num_dirs] = NULL;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/ConfWriter.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/ConfWriter.c b/charmonizer/src/Charmonizer/Core/ConfWriter.c
index 53e7d48..536a8bd 100644
--- a/charmonizer/src/Charmonizer/Core/ConfWriter.c
+++ b/charmonizer/src/Charmonizer/Core/ConfWriter.c
@@ -23,18 +23,18 @@
 
 #define CW_MAX_WRITERS 10
 static struct {
-    ConfWriter *writers[CW_MAX_WRITERS];
+    chaz_ConfWriter *writers[CW_MAX_WRITERS];
     size_t num_writers;
 } CW;
 
 void
-ConfWriter_init(void) {
+chaz_ConfWriter_init(void) {
     CW.num_writers = 0;
     return;
 }
 
 void
-ConfWriter_clean_up(void) {
+chaz_ConfWriter_clean_up(void) {
     size_t i;
     for (i = 0; i < CW.num_writers; i++) {
         CW.writers[i]->clean_up();
@@ -42,7 +42,7 @@ ConfWriter_clean_up(void) {
 }
 
 void
-ConfWriter_append_conf(const char *fmt, ...) {
+chaz_ConfWriter_append_conf(const char *fmt, ...) {
     va_list args;
     size_t i;
     
@@ -54,7 +54,7 @@ ConfWriter_append_conf(const char *fmt, ...) {
 }
 
 void
-ConfWriter_add_def(const char *sym, const char *value) {
+chaz_ConfWriter_add_def(const char *sym, const char *value) {
     size_t i;
     for (i = 0; i < CW.num_writers; i++) {
         CW.writers[i]->add_def(sym, value);
@@ -62,7 +62,7 @@ ConfWriter_add_def(const char *sym, const char *value) {
 }
 
 void
-ConfWriter_add_typedef(const char *type, const char *alias) {
+chaz_ConfWriter_add_typedef(const char *type, const char *alias) {
     size_t i;
     for (i = 0; i < CW.num_writers; i++) {
         CW.writers[i]->add_typedef(type, alias);
@@ -70,7 +70,7 @@ ConfWriter_add_typedef(const char *type, const char *alias) {
 }
 
 void
-ConfWriter_add_sys_include(const char *header) {
+chaz_ConfWriter_add_sys_include(const char *header) {
     size_t i;
     for (i = 0; i < CW.num_writers; i++) {
         CW.writers[i]->add_sys_include(header);
@@ -78,7 +78,7 @@ ConfWriter_add_sys_include(const char *header) {
 }
 
 void
-ConfWriter_add_local_include(const char *header) {
+chaz_ConfWriter_add_local_include(const char *header) {
     size_t i;
     for (i = 0; i < CW.num_writers; i++) {
         CW.writers[i]->add_local_include(header);
@@ -86,7 +86,7 @@ ConfWriter_add_local_include(const char *header) {
 }
 
 void
-ConfWriter_start_module(const char *module_name) {
+chaz_ConfWriter_start_module(const char *module_name) {
     size_t i;
     if (chaz_Util_verbosity > 0) {
         printf("Running %s module...\n", module_name);
@@ -97,7 +97,7 @@ ConfWriter_start_module(const char *module_name) {
 }
 
 void
-ConfWriter_end_module(void) {
+chaz_ConfWriter_end_module(void) {
     size_t i;
     for (i = 0; i < CW.num_writers; i++) {
         CW.writers[i]->end_module();
@@ -105,7 +105,7 @@ ConfWriter_end_module(void) {
 }
 
 void
-ConfWriter_add_writer(ConfWriter *writer) {
+chaz_ConfWriter_add_writer(chaz_ConfWriter *writer) {
     CW.writers[CW.num_writers] = writer;
     CW.num_writers++;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/ConfWriterC.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/ConfWriterC.c b/charmonizer/src/Charmonizer/Core/ConfWriterC.c
index 0f0ac15..b4dda42 100644
--- a/charmonizer/src/Charmonizer/Core/ConfWriterC.c
+++ b/charmonizer/src/Charmonizer/Core/ConfWriterC.c
@@ -46,7 +46,7 @@ static FILE *charmony_fh  = NULL;
 static ConfElem *defs      = NULL;
 static size_t    def_cap   = 0;
 static size_t    def_count = 0;
-static ConfWriter CWC_conf_writer;
+static chaz_ConfWriter CWC_conf_writer;
 
 /* Open the charmony.h file handle.  Print supplied text to it, if non-null.
  * Print an explanatory comment and open the include guard.
@@ -80,7 +80,7 @@ static void
 S_ConfWriterC_end_module(void);
 
 void
-ConfWriterC_enable(void) {
+chaz_ConfWriterC_enable(void) {
     CWC_conf_writer.clean_up          = S_ConfWriterC_clean_up;
     CWC_conf_writer.vappend_conf      = S_ConfWriterC_vappend_conf;
     CWC_conf_writer.add_def           = S_ConfWriterC_add_def;
@@ -90,7 +90,7 @@ ConfWriterC_enable(void) {
     CWC_conf_writer.start_module      = S_ConfWriterC_start_module;
     CWC_conf_writer.end_module        = S_ConfWriterC_end_module;
     S_open_charmony_h(NULL);
-    ConfWriter_add_writer(&CWC_conf_writer);
+    chaz_ConfWriter_add_writer(&CWC_conf_writer);
     return;
 }
 
@@ -99,7 +99,7 @@ S_open_charmony_h(const char *charmony_start) {
     /* Open the filehandle. */
     charmony_fh = fopen("charmony.h", "w+");
     if (charmony_fh == NULL) {
-        Util_die("Can't open 'charmony.h': %s", strerror(errno));
+        chaz_Util_die("Can't open 'charmony.h': %s", strerror(errno));
     }
 
     /* Print supplied text (if any) along with warning, open include guard. */
@@ -121,7 +121,7 @@ S_ConfWriterC_clean_up(void) {
     /* Write the last bit of charmony.h and close. */
     fprintf(charmony_fh, "#endif /* H_CHARMONY */\n\n");
     if (fclose(charmony_fh)) {
-        Util_die("Couldn't close 'charmony.h': %s", strerror(errno));
+        chaz_Util_die("Couldn't close 'charmony.h': %s", strerror(errno));
     }
 }
 
@@ -229,8 +229,8 @@ S_ConfWriterC_end_module(void) {
                 S_append_local_include_to_conf(defs[i].str1);
                 break;
             default:
-                Util_die("Internal error: bad element type %d",
-                         (int)defs[i].type);
+                chaz_Util_die("Internal error: bad element type %d",
+                              (int)defs[i].type);
         }
     }
 
@@ -259,8 +259,8 @@ S_ConfWriterC_end_module(void) {
                 /* no-op */
                 break;
             default:
-                Util_die("Internal error: bad element type %d",
-                         (int)defs[i].type);
+                chaz_Util_die("Internal error: bad element type %d",
+                              (int)defs[i].type);
         }
     }
 
@@ -276,8 +276,8 @@ S_push_def_list_item(const char *str1, const char *str2, ConfElemType type) {
         def_cap += 10;
         defs = (ConfElem*)realloc(defs, def_cap * sizeof(ConfElem));
     }
-    defs[def_count].str1 = str1 ? Util_strdup(str1) : NULL;
-    defs[def_count].str2 = str2 ? Util_strdup(str2) : NULL;
+    defs[def_count].str1 = str1 ? chaz_Util_strdup(str1) : NULL;
+    defs[def_count].str2 = str2 ? chaz_Util_strdup(str2) : NULL;
     defs[def_count].type = type;
     def_count++;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/ConfWriterPerl.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/ConfWriterPerl.c b/charmonizer/src/Charmonizer/Core/ConfWriterPerl.c
index b10b274..50cd156 100644
--- a/charmonizer/src/Charmonizer/Core/ConfWriterPerl.c
+++ b/charmonizer/src/Charmonizer/Core/ConfWriterPerl.c
@@ -27,7 +27,7 @@
 
 /* Static vars. */
 static FILE *config_pm_fh  = NULL;
-static ConfWriter CWPerl_conf_writer;
+static chaz_ConfWriter CWPerl_conf_writer;
 
 /* Open the Charmony.pm file handle.
  */
@@ -52,7 +52,7 @@ static void
 S_ConfWriterPerl_end_module(void);
 
 void
-ConfWriterPerl_enable(void) {
+chaz_ConfWriterPerl_enable(void) {
     CWPerl_conf_writer.clean_up          = S_ConfWriterPerl_clean_up;
     CWPerl_conf_writer.vappend_conf      = S_ConfWriterPerl_vappend_conf;
     CWPerl_conf_writer.add_def           = S_ConfWriterPerl_add_def;
@@ -62,7 +62,7 @@ ConfWriterPerl_enable(void) {
     CWPerl_conf_writer.start_module      = S_ConfWriterPerl_start_module;
     CWPerl_conf_writer.end_module        = S_ConfWriterPerl_end_module;
     S_open_config_pm();
-    ConfWriter_add_writer(&CWPerl_conf_writer);
+    chaz_ConfWriter_add_writer(&CWPerl_conf_writer);
     return;
 }
 
@@ -71,7 +71,7 @@ S_open_config_pm(void) {
     /* Open the filehandle. */
     config_pm_fh = fopen("Charmony.pm", "w+");
     if (config_pm_fh == NULL) {
-        Util_die("Can't open 'Charmony.pm': %s", strerror(errno));
+        chaz_Util_die("Can't open 'Charmony.pm': %s", strerror(errno));
     }
 
     /* Start the module. */
@@ -95,7 +95,7 @@ S_ConfWriterPerl_clean_up(void) {
     /* Write the last bit of Charmony.pm and close. */
     fprintf(config_pm_fh, "\n1;\n\n");
     if (fclose(config_pm_fh)) {
-        Util_die("Couldn't close 'Charmony.pm': %s", strerror(errno));
+        chaz_Util_die("Couldn't close 'Charmony.pm': %s", strerror(errno));
     }
 }
 
@@ -159,7 +159,7 @@ S_ConfWriterPerl_add_def(const char *sym, const char *value) {
 
     /* Quote key. */
     if (!sym) {
-        Util_die("Can't handle NULL key");
+        chaz_Util_die("Can't handle NULL key");
     }
     quoted_sym = S_ConfWriterPerl_quotify(sym, sym_buf, CFPERL_MAX_BUF);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/ConfWriterRuby.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/ConfWriterRuby.c b/charmonizer/src/Charmonizer/Core/ConfWriterRuby.c
index e99f98c..dde4947 100644
--- a/charmonizer/src/Charmonizer/Core/ConfWriterRuby.c
+++ b/charmonizer/src/Charmonizer/Core/ConfWriterRuby.c
@@ -27,7 +27,7 @@
 
 /* Static vars. */
 static FILE *config_rb_fh  = NULL;
-static ConfWriter CWRuby_conf_writer;
+static chaz_ConfWriter CWRuby_conf_writer;
 
 /* Open the Charmony.rb file handle.
  */
@@ -52,7 +52,7 @@ static void
 S_ConfWriterRuby_end_module(void);
 
 void
-ConfWriterRuby_enable(void) {
+chaz_ConfWriterRuby_enable(void) {
     CWRuby_conf_writer.clean_up          = S_ConfWriterRuby_clean_up;
     CWRuby_conf_writer.vappend_conf      = S_ConfWriterRuby_vappend_conf;
     CWRuby_conf_writer.add_def           = S_ConfWriterRuby_add_def;
@@ -62,7 +62,7 @@ ConfWriterRuby_enable(void) {
     CWRuby_conf_writer.start_module      = S_ConfWriterRuby_start_module;
     CWRuby_conf_writer.end_module        = S_ConfWriterRuby_end_module;
     S_open_config_rb();
-    ConfWriter_add_writer(&CWRuby_conf_writer);
+    chaz_ConfWriter_add_writer(&CWRuby_conf_writer);
     return;
 }
 
@@ -71,7 +71,7 @@ S_open_config_rb(void) {
     /* Open the filehandle. */
     config_rb_fh = fopen("Charmony.rb", "w+");
     if (config_rb_fh == NULL) {
-        Util_die("Can't open 'Charmony.rb': %s", strerror(errno));
+        chaz_Util_die("Can't open 'Charmony.rb': %s", strerror(errno));
     }
 
     /* Start the module. */
@@ -93,7 +93,7 @@ S_ConfWriterRuby_clean_up(void) {
     /* Write the last bit of Charmony.rb and close. */
     fprintf(config_rb_fh, "\nend\n\n");
     if (fclose(config_rb_fh)) {
-        Util_die("Couldn't close 'Charmony.rb': %s", strerror(errno));
+        chaz_Util_die("Couldn't close 'Charmony.rb': %s", strerror(errno));
     }
 }
 
@@ -157,7 +157,7 @@ S_ConfWriterRuby_add_def(const char *sym, const char *value) {
 
     /* Quote key. */
     if (!sym) {
-        Util_die("Can't handle NULL key");
+        chaz_Util_die("Can't handle NULL key");
     }
     quoted_sym = S_ConfWriterRuby_quotify(sym, sym_buf, CFRUBY_MAX_BUF);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/HeaderChecker.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/HeaderChecker.c b/charmonizer/src/Charmonizer/Core/HeaderChecker.c
index e06472a..a3cfc38 100644
--- a/charmonizer/src/Charmonizer/Core/HeaderChecker.c
+++ b/charmonizer/src/Charmonizer/Core/HeaderChecker.c
@@ -60,7 +60,7 @@ static void
 S_maybe_add_to_cache(const char *header_name, int exists);
 
 void
-HeadCheck_init(void) {
+chaz_HeadCheck_init(void) {
     Header *null_header = (Header*)malloc(sizeof(Header));
 
     /* Create terminating record for the dynamic array of Header objects. */
@@ -72,7 +72,7 @@ HeadCheck_init(void) {
 }
 
 int
-HeadCheck_check_header(const char *header_name) {
+chaz_HeadCheck_check_header(const char *header_name) {
     Header  *header;
     Header   key;
     Header  *fake = &key;
@@ -97,10 +97,10 @@ HeadCheck_check_header(const char *header_name) {
 }
 
 int
-HeadCheck_check_many_headers(const char **header_names) {
+chaz_HeadCheck_check_many_headers(const char **header_names) {
     int success;
     int i;
-    char *code_buf = Util_strdup("");
+    char *code_buf = chaz_Util_strdup("");
     size_t needed = sizeof(test_code) + 20;
 
     /* Build the source code string. */
@@ -118,7 +118,7 @@ HeadCheck_check_many_headers(const char **header_names) {
     strcat(code_buf, test_code);
 
     /* If the code compiles, bulk add all header names to the cache. */
-    success = CC_test_compile(code_buf);
+    success = chaz_CC_test_compile(code_buf);
     if (success) {
         for (i = 0; header_names[i] != NULL; i++) {
             S_maybe_add_to_cache(header_names[i], true);
@@ -130,13 +130,13 @@ HeadCheck_check_many_headers(const char **header_names) {
 }
 
 static const char contains_code[] =
-    QUOTE(  #include <stddef.h>                           )
-    QUOTE(  %s                                            )
-    QUOTE(  int main() { return offsetof(%s, %s); }       );
+    CHAZ_QUOTE(  #include <stddef.h>                           )
+    CHAZ_QUOTE(  %s                                            )
+    CHAZ_QUOTE(  int main() { return offsetof(%s, %s); }       );
 
 int
-HeadCheck_contains_member(const char *struct_name, const char *member,
-                          const char *includes) {
+chaz_HeadCheck_contains_member(const char *struct_name, const char *member,
+                               const char *includes) {
     long needed = sizeof(contains_code)
                   + strlen(struct_name)
                   + strlen(member)
@@ -145,7 +145,7 @@ HeadCheck_contains_member(const char *struct_name, const char *member,
     char *buf = (char*)malloc(needed);
     int retval;
     sprintf(buf, contains_code, includes, struct_name, member);
-    retval = CC_test_compile(buf);
+    retval = chaz_CC_test_compile(buf);
     free(buf);
     return retval;
 }
@@ -168,11 +168,11 @@ S_discover_header(const char *header_name) {
     char *include_test = (char*)malloc(needed);
 
     /* Assign. */
-    header->name = Util_strdup(header_name);
+    header->name = chaz_Util_strdup(header_name);
 
     /* See whether code that tries to pull in this header compiles. */
     sprintf(include_test, "#include <%s>\n%s", header_name, test_code);
-    header->exists = CC_test_compile(include_test);
+    header->exists = chaz_CC_test_compile(include_test);
 
     free(include_test);
     return header;
@@ -205,7 +205,7 @@ S_maybe_add_to_cache(const char *header_name, int exists) {
     /* We've already done the test compile, so skip that step and add it. */
     if (header == NULL) {
         header = (Header*)malloc(sizeof(Header));
-        header->name   = Util_strdup(header_name);
+        header->name   = chaz_Util_strdup(header_name);
         header->exists = exists;
         S_add_to_cache(header);
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/OperatingSystem.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/OperatingSystem.c b/charmonizer/src/Charmonizer/Core/OperatingSystem.c
index 7dee617..8d12a4d 100644
--- a/charmonizer/src/Charmonizer/Core/OperatingSystem.c
+++ b/charmonizer/src/Charmonizer/Core/OperatingSystem.c
@@ -34,24 +34,24 @@ static int  shell_type = 0;
 #define SHELL_TYPE_CMD_EXE  2
 
 void
-OS_init(void) {
-    if (Util_verbosity) {
+chaz_OS_init(void) {
+    if (chaz_Util_verbosity) {
         printf("Initializing Charmonizer/Core/OperatingSystem...\n");
     }
 
-    if (Util_verbosity) {
+    if (chaz_Util_verbosity) {
         printf("Trying to find a bit-bucket a la /dev/null...\n");
     }
 
     /* Detect shell based on whether the bitbucket is "/dev/null" or "nul". */
-    if (Util_can_open_file("/dev/null")) {
+    if (chaz_Util_can_open_file("/dev/null")) {
         strcpy(dev_null, "/dev/null");
         strcpy(exe_ext, "");
         strcpy(obj_ext, "");
         strcpy(local_command_start, "./");
         shell_type = SHELL_TYPE_POSIX;
     }
-    else if (Util_can_open_file("nul")) {
+    else if (chaz_Util_can_open_file("nul")) {
         strcpy(dev_null, "nul");
         strcpy(exe_ext, ".exe");
         strcpy(obj_ext, ".obj");
@@ -60,27 +60,27 @@ OS_init(void) {
     }
     else {
         /* Bail out because we couldn't find anything like /dev/null. */
-        Util_die("Couldn't find anything like /dev/null");
+        chaz_Util_die("Couldn't find anything like /dev/null");
     }
 }
 
 const char*
-OS_exe_ext(void) {
+chaz_OS_exe_ext(void) {
     return exe_ext;
 }
 
 const char*
-OS_obj_ext(void) {
+chaz_OS_obj_ext(void) {
     return obj_ext;
 }
 
 const char*
-OS_dev_null(void) {
+chaz_OS_dev_null(void) {
     return dev_null;
 }
 
 int
-OS_remove(const char *name) {
+chaz_OS_remove(const char *name) {
     /*
      * On Windows it can happen that another process, typically a
      * virus scanner, still has an open handle on the file. This can
@@ -115,7 +115,7 @@ OS_remove(const char *name) {
 }
 
 int
-OS_run_local(const char *arg1, ...) {
+chaz_OS_run_local(const char *arg1, ...) {
     va_list  args;
     size_t   len     = strlen(local_command_start) + strlen(arg1);
     char    *command = (char*)malloc(len + 1);
@@ -139,7 +139,7 @@ OS_run_local(const char *arg1, ...) {
 }
 
 int
-OS_run_quietly(const char *command) {
+chaz_OS_run_quietly(const char *command) {
     int retval = 1;
     char *quiet_command = NULL;
     if (shell_type == SHELL_TYPE_POSIX) {
@@ -156,7 +156,7 @@ OS_run_quietly(const char *command) {
         sprintf(quiet_command, pattern, command);
     }
     else {
-        Util_die("Don't know the shell type");
+        chaz_Util_die("Don't know the shell type");
     }
     retval = system(quiet_command);
     free(quiet_command);
@@ -165,7 +165,7 @@ OS_run_quietly(const char *command) {
 }
 
 void
-OS_mkdir(const char *filepath) {
+chaz_OS_mkdir(const char *filepath) {
     char *command = NULL;
     if (shell_type == SHELL_TYPE_POSIX || shell_type == SHELL_TYPE_CMD_EXE) {
         unsigned size = sizeof("mkdir") + 1 + strlen(filepath) + 1;
@@ -173,14 +173,14 @@ OS_mkdir(const char *filepath) {
         sprintf(command, "mkdir %s", filepath);
     }
     else {
-        Util_die("Don't know the shell type");
+        chaz_Util_die("Don't know the shell type");
     }
-    OS_run_quietly(command);
+    chaz_OS_run_quietly(command);
     free(command);
 }
 
 void
-OS_rmdir(const char *filepath) {
+chaz_OS_rmdir(const char *filepath) {
     char *command = NULL;
     if (shell_type == SHELL_TYPE_POSIX) {
         unsigned size = strlen("rmdir") + 1 + strlen(filepath) + 1;
@@ -193,9 +193,9 @@ OS_rmdir(const char *filepath) {
         sprintf(command, "rmdir /q %s", filepath);
     }
     else {
-        Util_die("Don't know the shell type");
+        chaz_Util_die("Don't know the shell type");
     }
-    OS_run_quietly(command);
+    chaz_OS_run_quietly(command);
     free(command);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Core/Util.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Util.c b/charmonizer/src/Charmonizer/Core/Util.c
index 0c0385d..39d7075 100644
--- a/charmonizer/src/Charmonizer/Core/Util.c
+++ b/charmonizer/src/Charmonizer/Core/Util.c
@@ -23,23 +23,24 @@
 #include "Charmonizer/Core/Util.h"
 
 /* Global verbosity setting. */
-int Util_verbosity = 1;
+int chaz_Util_verbosity = 1;
 
 void
-Util_write_file(const char *filename, const char *content) {
+chaz_Util_write_file(const char *filename, const char *content) {
     FILE *fh = fopen(filename, "w+");
     size_t content_len = strlen(content);
     if (fh == NULL) {
-        Util_die("Couldn't open '%s': %s", filename, strerror(errno));
+        chaz_Util_die("Couldn't open '%s': %s", filename, strerror(errno));
     }
     fwrite(content, sizeof(char), content_len, fh);
     if (fclose(fh)) {
-        Util_die("Error when closing '%s': %s", filename, strerror(errno));
+        chaz_Util_die("Error when closing '%s': %s", filename,
+                      strerror(errno));
     }
 }
 
 char*
-Util_slurp_file(const char *file_path, size_t *len_ptr) {
+chaz_Util_slurp_file(const char *file_path, size_t *len_ptr) {
     FILE   *const file = fopen(file_path, "r");
     char   *contents;
     size_t  len;
@@ -47,11 +48,12 @@ Util_slurp_file(const char *file_path, size_t *len_ptr) {
 
     /* Sanity check. */
     if (file == NULL) {
-        Util_die("Error opening file '%s': %s", file_path, strerror(errno));
+        chaz_Util_die("Error opening file '%s': %s", file_path,
+                      strerror(errno));
     }
 
     /* Find length; return NULL if the file has a zero-length. */
-    len = Util_flength(file);
+    len = chaz_Util_flength(file);
     if (len == 0) {
         *len_ptr = 0;
         return NULL;
@@ -60,15 +62,15 @@ Util_slurp_file(const char *file_path, size_t *len_ptr) {
     /* Allocate memory and read the file. */
     contents = (char*)malloc(len * sizeof(char) + 1);
     if (contents == NULL) {
-        Util_die("Out of memory at %d, %s", __FILE__, __LINE__);
+        chaz_Util_die("Out of memory at %d, %s", __FILE__, __LINE__);
     }
     contents[len] = '\0';
     check_val = fread(contents, sizeof(char), len, file);
 
     /* Weak error check, because CRLF might result in fewer chars read. */
     if (check_val <= 0) {
-        Util_die("Tried to read %d characters of '%s', got %d", (int)len,
-                 file_path, check_val);
+        chaz_Util_die("Tried to read %d characters of '%s', got %d", (int)len,
+                      file_path, check_val);
     }
 
     /* Set length pointer for benefit of caller. */
@@ -76,14 +78,15 @@ Util_slurp_file(const char *file_path, size_t *len_ptr) {
 
     /* Clean up. */
     if (fclose(file)) {
-        Util_die("Error closing file '%s': %s", file_path, strerror(errno));
+        chaz_Util_die("Error closing file '%s': %s", file_path,
+                      strerror(errno));
     }
 
     return contents;
 }
 
 long
-Util_flength(void *file) {
+chaz_Util_flength(void *file) {
     FILE *f = (FILE*)file;
     const long bookmark = ftell(f);
     long check_val;
@@ -91,19 +94,23 @@ Util_flength(void *file) {
 
     /* Seek to end of file and check length. */
     check_val = fseek(f, 0, SEEK_END);
-    if (check_val == -1) { Util_die("fseek error : %s\n", strerror(errno)); }
+    if (check_val == -1) {
+        chaz_Util_die("fseek error : %s\n", strerror(errno));
+    }
     len = ftell(f);
-    if (len == -1) { Util_die("ftell error : %s\n", strerror(errno)); }
+    if (len == -1) { chaz_Util_die("ftell error : %s\n", strerror(errno)); }
 
     /* Return to where we were. */
     check_val = fseek(f, bookmark, SEEK_SET);
-    if (check_val == -1) { Util_die("fseek error : %s\n", strerror(errno)); }
+    if (check_val == -1) {
+        chaz_Util_die("fseek error : %s\n", strerror(errno));
+    }
 
     return len;
 }
 
 char*
-Util_strdup(const char *string) {
+chaz_Util_strdup(const char *string) {
     size_t len = strlen(string);
     char *copy = (char*)malloc(len + 1);
     strncpy(copy, string, len);
@@ -112,7 +119,7 @@ Util_strdup(const char *string) {
 }
 
 void
-Util_die(const char* format, ...) {
+chaz_Util_die(const char* format, ...) {
     va_list args;
     va_start(args, format);
     vfprintf(stderr, format, args);
@@ -122,7 +129,7 @@ Util_die(const char* format, ...) {
 }
 
 void
-Util_warn(const char* format, ...) {
+chaz_Util_warn(const char* format, ...) {
     va_list args;
     va_start(args, format);
     vfprintf(stderr, format, args);
@@ -131,23 +138,23 @@ Util_warn(const char* format, ...) {
 }
 
 int
-Util_remove_and_verify(const char *file_path) {
+chaz_Util_remove_and_verify(const char *file_path) {
     /* Attempt to delete the file.  If it's gone after the attempt, return
      * success, whether or not it was there to begin with.
      * (ENOENT is POSIX not C89, but let's go with it for now.) */
-    int result = OS_remove(file_path);
+    int result = chaz_OS_remove(file_path);
     if (result || errno == ENOENT) {
         return 1;
     }
 
     /* Issue a warning and return failure. */
-    Util_warn("Failed to remove '%s': %s at %s line %d",
-              file_path, strerror(errno), __FILE__, __LINE__);
+    chaz_Util_warn("Failed to remove '%s': %s at %s line %d",
+                   file_path, strerror(errno), __FILE__, __LINE__);
     return 0;
 }
 
 int
-Util_can_open_file(const char *file_path) {
+chaz_Util_can_open_file(const char *file_path) {
     FILE *garbage_fh;
 
     /* Use fopen as a portable test for the existence of a file. */

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe.c b/charmonizer/src/Charmonizer/Probe.c
index 5789551..db72dda 100644
--- a/charmonizer/src/Charmonizer/Probe.c
+++ b/charmonizer/src/Charmonizer/Probe.c
@@ -35,49 +35,49 @@ static void
 S_remove_charm_h(void);
 
 void
-Probe_init(const char *cc_command, const char *cc_flags) {
+chaz_Probe_init(const char *cc_command, const char *cc_flags) {
     /* Proces CHARM_VERBOSITY environment variable. */
     const char *verbosity_env = getenv("CHARM_VERBOSITY");
     if (verbosity_env && strlen(verbosity_env)) {
-        Util_verbosity = strtol(verbosity_env, NULL, 10);
+        chaz_Util_verbosity = strtol(verbosity_env, NULL, 10);
     }
 
     /* Dispatch other initializers. */
-    OS_init();
-    CC_init(cc_command, cc_flags);
-    ConfWriter_init();
-    HeadCheck_init();
+    chaz_OS_init();
+    chaz_CC_init(cc_command, cc_flags);
+    chaz_ConfWriter_init();
+    chaz_HeadCheck_init();
     S_write_charm_h();
 
-    if (Util_verbosity) { printf("Initialization complete.\n"); }
+    if (chaz_Util_verbosity) { printf("Initialization complete.\n"); }
 }
 
 void
-Probe_clean_up(void) {
-    if (Util_verbosity) { printf("Cleaning up...\n"); }
+chaz_Probe_clean_up(void) {
+    if (chaz_Util_verbosity) { printf("Cleaning up...\n"); }
 
     /* Dispatch various clean up routines. */
     S_remove_charm_h();
-    ConfWriter_clean_up();
-    CC_clean_up();
+    chaz_ConfWriter_clean_up();
+    chaz_CC_clean_up();
 
-    if (Util_verbosity) { printf("Cleanup complete.\n"); }
+    if (chaz_Util_verbosity) { printf("Cleanup complete.\n"); }
 }
 
 static const char charm_h_code[] =
-    QUOTE(  #ifndef CHARM_H                                                  )
-    QUOTE(  #define CHARM_H 1                                                )
-    QUOTE(  #include <stdio.h>                                               )
-    QUOTE(  #define Charm_Setup freopen("_charmonizer_target", "w", stdout)  )
-    QUOTE(  #endif                                                           );
+    CHAZ_QUOTE(  #ifndef CHARM_H                                                  )
+    CHAZ_QUOTE(  #define CHARM_H 1                                                )
+    CHAZ_QUOTE(  #include <stdio.h>                                               )
+    CHAZ_QUOTE(  #define Charm_Setup freopen("_charmonizer_target", "w", stdout)  )
+    CHAZ_QUOTE(  #endif                                                           );
 
 static void
 S_write_charm_h(void) {
-    Util_write_file("_charm.h", charm_h_code);
+    chaz_Util_write_file("_charm.h", charm_h_code);
 }
 
 static void
 S_remove_charm_h(void) {
-    Util_remove_and_verify("_charm.h");
+    chaz_Util_remove_and_verify("_charm.h");
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe/AtomicOps.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/AtomicOps.c b/charmonizer/src/Charmonizer/Probe/AtomicOps.c
index dbbbc8b..8a19f52 100644
--- a/charmonizer/src/Charmonizer/Probe/AtomicOps.c
+++ b/charmonizer/src/Charmonizer/Probe/AtomicOps.c
@@ -26,48 +26,48 @@
 #include <stdlib.h>
 
 static const char osatomic_casptr_code[] =
-    QUOTE(  #include <libkern/OSAtomic.h>                                  )
-    QUOTE(  #include <libkern/OSAtomic.h>                                  )
-    QUOTE(  int main() {                                                   )
-    QUOTE(      int  foo = 1;                                              )
-    QUOTE(      int *foo_ptr = &foo;                                       )
-    QUOTE(      int *target = NULL;                                        )
-    QUOTE(      OSAtomicCompareAndSwapPtr(NULL, foo_ptr, (void**)&target); )
-    QUOTE(      return 0;                                                  )
-    QUOTE(  }                                                              );
+    CHAZ_QUOTE(  #include <libkern/OSAtomic.h>                                  )
+    CHAZ_QUOTE(  #include <libkern/OSAtomic.h>                                  )
+    CHAZ_QUOTE(  int main() {                                                   )
+    CHAZ_QUOTE(      int  foo = 1;                                              )
+    CHAZ_QUOTE(      int *foo_ptr = &foo;                                       )
+    CHAZ_QUOTE(      int *target = NULL;                                        )
+    CHAZ_QUOTE(      OSAtomicCompareAndSwapPtr(NULL, foo_ptr, (void**)&target); )
+    CHAZ_QUOTE(      return 0;                                                  )
+    CHAZ_QUOTE(  }                                                              );
 
 void
-AtomicOps_run(void) {
+chaz_AtomicOps_run(void) {
     int has_libkern_osatomic_h = false;
     int has_osatomic_cas_ptr   = false;
     int has_sys_atomic_h       = false;
     int has_intrin_h           = false;
 
-    ConfWriter_start_module("AtomicOps");
+    chaz_ConfWriter_start_module("AtomicOps");
 
-    if (HeadCheck_check_header("libkern/OSAtomic.h")) {
+    if (chaz_HeadCheck_check_header("libkern/OSAtomic.h")) {
         has_libkern_osatomic_h = true;
-        ConfWriter_add_def("HAS_LIBKERN_OSATOMIC_H", NULL);
+        chaz_ConfWriter_add_def("HAS_LIBKERN_OSATOMIC_H", NULL);
 
         /* Check for OSAtomicCompareAndSwapPtr, introduced in later versions
          * of OSAtomic.h. */
-        has_osatomic_cas_ptr = CC_test_compile(osatomic_casptr_code);
+        has_osatomic_cas_ptr = chaz_CC_test_compile(osatomic_casptr_code);
         if (has_osatomic_cas_ptr) {
-            ConfWriter_add_def("HAS_OSATOMIC_CAS_PTR", NULL);
+            chaz_ConfWriter_add_def("HAS_OSATOMIC_CAS_PTR", NULL);
         }
     }
-    if (HeadCheck_check_header("sys/atomic.h")) {
+    if (chaz_HeadCheck_check_header("sys/atomic.h")) {
         has_sys_atomic_h = true;
-        ConfWriter_add_def("HAS_SYS_ATOMIC_H", NULL);
+        chaz_ConfWriter_add_def("HAS_SYS_ATOMIC_H", NULL);
     }
-    if (HeadCheck_check_header("windows.h")
-        && HeadCheck_check_header("intrin.h")
+    if (chaz_HeadCheck_check_header("windows.h")
+        && chaz_HeadCheck_check_header("intrin.h")
        ) {
         has_intrin_h = true;
-        ConfWriter_add_def("HAS_INTRIN_H", NULL);
+        chaz_ConfWriter_add_def("HAS_INTRIN_H", NULL);
     }
 
-    ConfWriter_end_module();
+    chaz_ConfWriter_end_module();
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe/DirManip.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/DirManip.c b/charmonizer/src/Charmonizer/Probe/DirManip.c
index 3a862f7..5098d6b 100644
--- a/charmonizer/src/Charmonizer/Probe/DirManip.c
+++ b/charmonizer/src/Charmonizer/Probe/DirManip.c
@@ -34,30 +34,30 @@ static int   rmdir_available = 0;
 
 /* Source code for standard POSIX mkdir */
 static const char posix_mkdir_code[] =
-    QUOTE(  #include <%s>                                          )
-    QUOTE(  int main(int argc, char **argv) {                      )
-    QUOTE(      if (argc != 2) { return 1; }                       )
-    QUOTE(      if (mkdir(argv[1], 0777) != 0) { return 2; }       )
-    QUOTE(      return 0;                                          )
-    QUOTE(  }                                                      );
+    CHAZ_QUOTE(  #include <%s>                                          )
+    CHAZ_QUOTE(  int main(int argc, char **argv) {                      )
+    CHAZ_QUOTE(      if (argc != 2) { return 1; }                       )
+    CHAZ_QUOTE(      if (mkdir(argv[1], 0777) != 0) { return 2; }       )
+    CHAZ_QUOTE(      return 0;                                          )
+    CHAZ_QUOTE(  }                                                      );
 
 /* Source code for Windows _mkdir. */
 static const char win_mkdir_code[] =
-    QUOTE(  #include <direct.h>                                    )
-    QUOTE(  int main(int argc, char **argv) {                      )
-    QUOTE(      if (argc != 2) { return 1; }                       )
-    QUOTE(      if (_mkdir(argv[1]) != 0) { return 2; }            )
-    QUOTE(      return 0;                                          )
-    QUOTE(  }                                                      );
+    CHAZ_QUOTE(  #include <direct.h>                                    )
+    CHAZ_QUOTE(  int main(int argc, char **argv) {                      )
+    CHAZ_QUOTE(      if (argc != 2) { return 1; }                       )
+    CHAZ_QUOTE(      if (_mkdir(argv[1]) != 0) { return 2; }            )
+    CHAZ_QUOTE(      return 0;                                          )
+    CHAZ_QUOTE(  }                                                      );
 
 /* Source code for rmdir. */
 static const char rmdir_code[] =
-    QUOTE(  #include <%s>                                          )
-    QUOTE(  int main(int argc, char **argv) {                      )
-    QUOTE(      if (argc != 2) { return 1; }                       )
-    QUOTE(      if (rmdir(argv[1]) != 0) { return 2; }             )
-    QUOTE(      return 0;                                          )
-    QUOTE(  }                                                      );
+    CHAZ_QUOTE(  #include <%s>                                          )
+    CHAZ_QUOTE(  int main(int argc, char **argv) {                      )
+    CHAZ_QUOTE(      if (argc != 2) { return 1; }                       )
+    CHAZ_QUOTE(      if (rmdir(argv[1]) != 0) { return 2; }             )
+    CHAZ_QUOTE(      return 0;                                          )
+    CHAZ_QUOTE(  }                                                      );
 
 static int
 S_compile_posix_mkdir(const char *header) {
@@ -66,7 +66,7 @@ S_compile_posix_mkdir(const char *header) {
 
     /* Attempt compilation. */
     sprintf(code_buf, posix_mkdir_code, header);
-    mkdir_available = CC_test_compile(code_buf);
+    mkdir_available = chaz_CC_test_compile(code_buf);
 
     /* Set vars on success. */
     if (mkdir_available) {
@@ -85,7 +85,7 @@ S_compile_posix_mkdir(const char *header) {
 
 static int
 S_compile_win_mkdir(void) {
-    mkdir_available = CC_test_compile(win_mkdir_code);
+    mkdir_available = chaz_CC_test_compile(win_mkdir_code);
     if (mkdir_available) {
         strcpy(mkdir_command, "_mkdir");
         mkdir_num_args = 1;
@@ -95,7 +95,7 @@ S_compile_win_mkdir(void) {
 
 static void
 S_try_mkdir(void) {
-    if (HeadCheck_check_header("windows.h")) {
+    if (chaz_HeadCheck_check_header("windows.h")) {
         if (S_compile_win_mkdir())               { return; }
         if (S_compile_posix_mkdir("direct.h"))   { return; }
     }
@@ -107,7 +107,7 @@ S_compile_rmdir(const char *header) {
     size_t needed = sizeof(posix_mkdir_code) + 30;
     char *code_buf = (char*)malloc(needed);
     sprintf(code_buf, rmdir_code, header);
-    rmdir_available = CC_test_compile(code_buf);
+    rmdir_available = chaz_CC_test_compile(code_buf);
     free(code_buf);
     return rmdir_available;
 }
@@ -120,47 +120,47 @@ S_try_rmdir(void) {
 }
 
 static const char cygwin_code[] =
-    QUOTE(#ifndef __CYGWIN__            )
-    QUOTE(  #error "Not Cygwin"         )
-    QUOTE(#endif                        )
-    QUOTE(int main() { return 0; }      );
+    CHAZ_QUOTE(#ifndef __CYGWIN__            )
+    CHAZ_QUOTE(  #error "Not Cygwin"         )
+    CHAZ_QUOTE(#endif                        )
+    CHAZ_QUOTE(int main() { return 0; }      );
 
 void
-DirManip_run(void) {
+chaz_DirManip_run(void) {
     char dir_sep[3];
     int remove_zaps_dirs = false;
-    int has_dirent_h = HeadCheck_check_header("dirent.h");
-    int has_direct_h = HeadCheck_check_header("direct.h");
+    int has_dirent_h = chaz_HeadCheck_check_header("dirent.h");
+    int has_direct_h = chaz_HeadCheck_check_header("direct.h");
     int has_dirent_d_namlen = false;
     int has_dirent_d_type   = false;
 
-    ConfWriter_start_module("DirManip");
+    chaz_ConfWriter_start_module("DirManip");
     S_try_mkdir();
     S_try_rmdir();
 
     /* Header checks. */
     if (has_dirent_h) {
-        ConfWriter_add_def("HAS_DIRENT_H", NULL);
+        chaz_ConfWriter_add_def("HAS_DIRENT_H", NULL);
     }
     if (has_direct_h) {
-        ConfWriter_add_def("HAS_DIRECT_H", NULL);
+        chaz_ConfWriter_add_def("HAS_DIRECT_H", NULL);
     }
 
     /* Check for members in struct dirent. */
     if (has_dirent_h) {
-        has_dirent_d_namlen = HeadCheck_contains_member(
+        has_dirent_d_namlen = chaz_HeadCheck_contains_member(
                                   "struct dirent", "d_namlen",
                                   "#include <sys/types.h>\n#include <dirent.h>"
                               );
         if (has_dirent_d_namlen) {
-            ConfWriter_add_def("HAS_DIRENT_D_NAMLEN", NULL);
+            chaz_ConfWriter_add_def("HAS_DIRENT_D_NAMLEN", NULL);
         }
-        has_dirent_d_type = HeadCheck_contains_member(
+        has_dirent_d_type = chaz_HeadCheck_contains_member(
                                 "struct dirent", "d_type",
                                 "#include <sys/types.h>\n#include <dirent.h>"
                             );
         if (has_dirent_d_type) {
-            ConfWriter_add_def("HAS_DIRENT_D_TYPE", NULL);
+            chaz_ConfWriter_add_def("HAS_DIRENT_D_TYPE", NULL);
         }
     }
 
@@ -168,27 +168,27 @@ DirManip_run(void) {
         /* It's two args, but the command isn't "mkdir". */
         char scratch[50];
         if (strlen(mkdir_command) > 30) {
-            Util_die("Command too long: '%s'", mkdir_command);
+            chaz_Util_die("Command too long: '%s'", mkdir_command);
         }
         sprintf(scratch, "%s(_dir, _mode)", mkdir_command);
-        ConfWriter_add_def("makedir(_dir, _mode)", scratch);
-        ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "0");
+        chaz_ConfWriter_add_def("makedir(_dir, _mode)", scratch);
+        chaz_ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "0");
     }
     else if (mkdir_num_args == 1) {
         /* It's one arg... mode arg will be ignored. */
         char scratch[50];
         if (strlen(mkdir_command) > 30) {
-            Util_die("Command too long: '%s'", mkdir_command);
+            chaz_Util_die("Command too long: '%s'", mkdir_command);
         }
         sprintf(scratch, "%s(_dir)", mkdir_command);
-        ConfWriter_add_def("makedir(_dir, _mode)", scratch);
-        ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "1");
+        chaz_ConfWriter_add_def("makedir(_dir, _mode)", scratch);
+        chaz_ConfWriter_add_def("MAKEDIR_MODE_IGNORED", "1");
     }
 
-    if (CC_test_compile(cygwin_code)) {
+    if (chaz_CC_test_compile(cygwin_code)) {
         strcpy(dir_sep, "/");
     }
-    else if (HeadCheck_check_header("windows.h")) {
+    else if (chaz_HeadCheck_check_header("windows.h")) {
         strcpy(dir_sep, "\\\\");
     }
     else {
@@ -198,18 +198,18 @@ DirManip_run(void) {
     {
         char scratch[5];
         sprintf(scratch, "\"%s\"", dir_sep);
-        ConfWriter_add_def("DIR_SEP", scratch);
+        chaz_ConfWriter_add_def("DIR_SEP", scratch);
     }
 
     /* See whether remove works on directories. */
-    OS_mkdir("_charm_test_remove_me");
+    chaz_OS_mkdir("_charm_test_remove_me");
     if (0 == remove("_charm_test_remove_me")) {
         remove_zaps_dirs = true;
-        ConfWriter_add_def("REMOVE_ZAPS_DIRS", NULL);
+        chaz_ConfWriter_add_def("REMOVE_ZAPS_DIRS", NULL);
     }
-    OS_rmdir("_charm_test_remove_me");
+    chaz_OS_rmdir("_charm_test_remove_me");
 
-    ConfWriter_end_module();
+    chaz_ConfWriter_end_module();
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe/Floats.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/Floats.c b/charmonizer/src/Charmonizer/Probe/Floats.c
index efab1c4..ca1b3d7 100644
--- a/charmonizer/src/Charmonizer/Probe/Floats.c
+++ b/charmonizer/src/Charmonizer/Probe/Floats.c
@@ -25,10 +25,10 @@
 #include <stdlib.h>
 
 void
-Floats_run(void) {
-    ConfWriter_start_module("Floats");
+chaz_Floats_run(void) {
+    chaz_ConfWriter_start_module("Floats");
 
-    ConfWriter_append_conf(
+    chaz_ConfWriter_append_conf(
         "typedef union { uint32_t i; float f; } chy_floatu32;\n"
         "typedef union { uint64_t i; double d; } chy_floatu64;\n"
         "static const chy_floatu32 chy_f32inf    = {CHY_U32_C(0x7f800000)};\n"
@@ -38,14 +38,14 @@ Floats_run(void) {
         "static const chy_floatu64 chy_f64neginf = {CHY_U64_C(0xfff0000000000000)};\n"
         "static const chy_floatu64 chy_f64nan    = {CHY_U64_C(0x7ff8000000000000)};\n"
     );
-    ConfWriter_add_def("F32_INF", "(chy_f32inf.f)");
-    ConfWriter_add_def("F32_NEGINF", "(chy_f32neginf.f)");
-    ConfWriter_add_def("F32_NAN", "(chy_f32nan.f)");
-    ConfWriter_add_def("F64_INF", "(chy_f64inf.d)");
-    ConfWriter_add_def("F64_NEGINF", "(chy_f64neginf.d)");
-    ConfWriter_add_def("F64_NAN", "(chy_f64nan.d)");
+    chaz_ConfWriter_add_def("F32_INF", "(chy_f32inf.f)");
+    chaz_ConfWriter_add_def("F32_NEGINF", "(chy_f32neginf.f)");
+    chaz_ConfWriter_add_def("F32_NAN", "(chy_f32nan.f)");
+    chaz_ConfWriter_add_def("F64_INF", "(chy_f64inf.d)");
+    chaz_ConfWriter_add_def("F64_NEGINF", "(chy_f64neginf.d)");
+    chaz_ConfWriter_add_def("F64_NAN", "(chy_f64nan.d)");
 
-    ConfWriter_end_module();
+    chaz_ConfWriter_end_module();
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe/FuncMacro.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/FuncMacro.c b/charmonizer/src/Charmonizer/Probe/FuncMacro.c
index 69814bf..3acef64 100644
--- a/charmonizer/src/Charmonizer/Probe/FuncMacro.c
+++ b/charmonizer/src/Charmonizer/Probe/FuncMacro.c
@@ -26,37 +26,37 @@
 
 /* Code for verifying ISO func macro. */
 static const char iso_func_code[] =
-    QUOTE(  #include "_charm.h"               )
-    QUOTE(  int main() {                      )
-    QUOTE(      Charm_Setup;                  )
-    QUOTE(      printf("%s", __func__);       )
-    QUOTE(      return 0;                     )
-    QUOTE(  }                                 );
+    CHAZ_QUOTE(  #include "_charm.h"               )
+    CHAZ_QUOTE(  int main() {                      )
+    CHAZ_QUOTE(      Charm_Setup;                  )
+    CHAZ_QUOTE(      printf("%s", __func__);       )
+    CHAZ_QUOTE(      return 0;                     )
+    CHAZ_QUOTE(  }                                 );
 
 /* Code for verifying GNU func macro. */
 static const char gnuc_func_code[] =
-    QUOTE(  #include "_charm.h"               )
-    QUOTE(  int main() {                      )
-    QUOTE(      Charm_Setup;                  )
-    QUOTE(      printf("%s", __FUNCTION__);   )
-    QUOTE(      return 0;                     )
-    QUOTE(  }                                 );
+    CHAZ_QUOTE(  #include "_charm.h"               )
+    CHAZ_QUOTE(  int main() {                      )
+    CHAZ_QUOTE(      Charm_Setup;                  )
+    CHAZ_QUOTE(      printf("%s", __FUNCTION__);   )
+    CHAZ_QUOTE(      return 0;                     )
+    CHAZ_QUOTE(  }                                 );
 
 /* Code for verifying inline keyword. */
 static const char inline_code[] =
-    QUOTE(  #include "_charm.h"               )
-    QUOTE(  static %s int foo() { return 1; } )
-    QUOTE(  int main() {                      )
-    QUOTE(      Charm_Setup;                  )
-    QUOTE(      printf("%%d", foo());         )
-    QUOTE(      return 0;                     )
-    QUOTE(  }                                 );
+    CHAZ_QUOTE(  #include "_charm.h"               )
+    CHAZ_QUOTE(  static %s int foo() { return 1; } )
+    CHAZ_QUOTE(  int main() {                      )
+    CHAZ_QUOTE(      Charm_Setup;                  )
+    CHAZ_QUOTE(      printf("%%d", foo());         )
+    CHAZ_QUOTE(      return 0;                     )
+    CHAZ_QUOTE(  }                                 );
 
 static char*
 S_try_inline(const char *keyword, size_t *output_len) {
     char code[sizeof(inline_code) + 30];
     sprintf(code, inline_code, keyword);
-    return CC_capture_output(code, output_len);
+    return chaz_CC_capture_output(code, output_len);
 }
 
 static const char* inline_options[] = {
@@ -67,7 +67,7 @@ static const char* inline_options[] = {
 static int num_inline_options = sizeof(inline_options) / sizeof(void*);
 
 void
-FuncMacro_run(void) {
+chaz_FuncMacro_run(void) {
     int i;
     char *output;
     size_t output_len;
@@ -76,10 +76,10 @@ FuncMacro_run(void) {
     int has_gnuc_funcmac = false;
     int has_inline       = false;
 
-    ConfWriter_start_module("FuncMacro");
+    chaz_ConfWriter_start_module("FuncMacro");
 
     /* Check for ISO func macro. */
-    output = CC_capture_output(iso_func_code, &output_len);
+    output = chaz_CC_capture_output(iso_func_code, &output_len);
     if (output != NULL && strncmp(output, "main", 4) == 0) {
         has_funcmac     = true;
         has_iso_funcmac = true;
@@ -87,7 +87,7 @@ FuncMacro_run(void) {
     free(output);
 
     /* Check for GNUC func macro. */
-    output = CC_capture_output(gnuc_func_code, &output_len);
+    output = chaz_CC_capture_output(gnuc_func_code, &output_len);
     if (output != NULL && strncmp(output, "main", 4) == 0) {
         has_funcmac      = true;
         has_gnuc_funcmac = true;
@@ -99,16 +99,16 @@ FuncMacro_run(void) {
         const char *macro_text = has_iso_funcmac
                                  ? "__func__"
                                  : "__FUNCTION__";
-        ConfWriter_add_def("HAS_FUNC_MACRO", NULL);
-        ConfWriter_add_def("FUNC_MACRO", macro_text);
+        chaz_ConfWriter_add_def("HAS_FUNC_MACRO", NULL);
+        chaz_ConfWriter_add_def("FUNC_MACRO", macro_text);
     }
 
     /* Write out specific defines. */
     if (has_iso_funcmac) {
-        ConfWriter_add_def("HAS_ISO_FUNC_MACRO", NULL);
+        chaz_ConfWriter_add_def("HAS_ISO_FUNC_MACRO", NULL);
     }
     if (has_gnuc_funcmac) {
-        ConfWriter_add_def("HAS_GNUC_FUNC_MACRO", NULL);
+        chaz_ConfWriter_add_def("HAS_GNUC_FUNC_MACRO", NULL);
     }
 
     /* Check for inline keyword. */
@@ -118,16 +118,16 @@ FuncMacro_run(void) {
         output = S_try_inline(inline_option, &output_len);
         if (output != NULL) {
             has_inline = true;
-            ConfWriter_add_def("INLINE", inline_option);
+            chaz_ConfWriter_add_def("INLINE", inline_option);
             free(output);
             break;
         }
     }
     if (!has_inline) {
-        ConfWriter_add_def("INLINE", NULL);
+        chaz_ConfWriter_add_def("INLINE", NULL);
     }
 
-    ConfWriter_end_module();
+    chaz_ConfWriter_end_module();
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe/Headers.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/Headers.c b/charmonizer/src/Charmonizer/Probe/Headers.c
index 22bd743..4624189 100644
--- a/charmonizer/src/Charmonizer/Probe/Headers.c
+++ b/charmonizer/src/Charmonizer/Probe/Headers.c
@@ -93,24 +93,24 @@ const char *win_headers[] = {
 };
 
 int
-Headers_check(const char *header_name) {
-    return HeadCheck_check_header(header_name);
+chaz_Headers_check(const char *header_name) {
+    return chaz_HeadCheck_check_header(header_name);
 }
 
 void
-Headers_run(void) {
+chaz_Headers_run(void) {
     int i;
     int has_posix = false;
     int has_c89   = false;
 
     keeper_count = 0;
 
-    ConfWriter_start_module("Headers");
+    chaz_ConfWriter_start_module("Headers");
 
     /* Try for all POSIX headers in one blast. */
-    if (HeadCheck_check_many_headers((const char**)posix_headers)) {
+    if (chaz_HeadCheck_check_many_headers((const char**)posix_headers)) {
         has_posix = true;
-        ConfWriter_add_def("HAS_POSIX", NULL);
+        chaz_ConfWriter_add_def("HAS_POSIX", NULL);
         for (i = 0; posix_headers[i] != NULL; i++) {
             S_keep(posix_headers[i]);
         }
@@ -118,17 +118,17 @@ Headers_run(void) {
     /* Test one-at-a-time. */
     else {
         for (i = 0; posix_headers[i] != NULL; i++) {
-            if (HeadCheck_check_header(posix_headers[i])) {
+            if (chaz_HeadCheck_check_header(posix_headers[i])) {
                 S_keep(posix_headers[i]);
             }
         }
     }
 
     /* Test for all c89 headers in one blast. */
-    if (HeadCheck_check_many_headers((const char**)c89_headers)) {
+    if (chaz_HeadCheck_check_many_headers((const char**)c89_headers)) {
         has_c89 = true;
-        ConfWriter_add_def("HAS_C89", NULL);
-        ConfWriter_add_def("HAS_C90", NULL);
+        chaz_ConfWriter_add_def("HAS_C89", NULL);
+        chaz_ConfWriter_add_def("HAS_C90", NULL);
         for (i = 0; c89_headers[i] != NULL; i++) {
             S_keep(c89_headers[i]);
         }
@@ -136,14 +136,14 @@ Headers_run(void) {
     /* Test one-at-a-time. */
     else {
         for (i = 0; c89_headers[i] != NULL; i++) {
-            if (HeadCheck_check_header(c89_headers[i])) {
+            if (chaz_HeadCheck_check_header(c89_headers[i])) {
                 S_keep(c89_headers[i]);
             }
         }
     }
 
     /* Test for all Windows headers in one blast */
-    if (HeadCheck_check_many_headers((const char**)win_headers)) {
+    if (chaz_HeadCheck_check_many_headers((const char**)win_headers)) {
         for (i = 0; win_headers[i] != NULL; i++) {
             S_keep(win_headers[i]);
         }
@@ -151,30 +151,30 @@ Headers_run(void) {
     /* Test one-at-a-time. */
     else {
         for (i = 0; win_headers[i] != NULL; i++) {
-            if (HeadCheck_check_header(win_headers[i])) {
+            if (chaz_HeadCheck_check_header(win_headers[i])) {
                 S_keep(win_headers[i]);
             }
         }
     }
 
     /* One-offs. */
-    if (HeadCheck_check_header("pthread.h")) {
+    if (chaz_HeadCheck_check_header("pthread.h")) {
         S_keep("pthread.h");
     }
 
     /* Append the config with every header detected so far. */
     for (i = 0; keepers[i] != NULL; i++) {
         S_encode_affirmation(keepers[i]);
-        ConfWriter_add_def(aff_buf, NULL);
+        chaz_ConfWriter_add_def(aff_buf, NULL);
     }
 
-    ConfWriter_end_module();
+    chaz_ConfWriter_end_module();
 }
 
 static void
 S_keep(const char *header_name) {
     if (keeper_count >= MAX_KEEPER_COUNT) {
-        Util_die("Too many keepers -- increase MAX_KEEPER_COUNT");
+        chaz_Util_die("Too many keepers -- increase MAX_KEEPER_COUNT");
     }
     keepers[keeper_count++] = header_name;
     keepers[keeper_count]   = NULL;

http://git-wip-us.apache.org/repos/asf/lucy/blob/f63547c5/charmonizer/src/Charmonizer/Probe/Integers.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/Integers.c b/charmonizer/src/Charmonizer/Probe/Integers.c
index f753e20..3adeda5 100644
--- a/charmonizer/src/Charmonizer/Probe/Integers.c
+++ b/charmonizer/src/Charmonizer/Probe/Integers.c
@@ -31,39 +31,39 @@ static int
 S_machine_is_big_endian(void);
 
 static const char sizes_code[] =
-    QUOTE(  #include "_charm.h"                       )
-    QUOTE(  int main () {                             )
-    QUOTE(      Charm_Setup;                          )
-    QUOTE(      printf("%d ", (int)sizeof(char));     )
-    QUOTE(      printf("%d ", (int)sizeof(short));    )
-    QUOTE(      printf("%d ", (int)sizeof(int));      )
-    QUOTE(      printf("%d ", (int)sizeof(long));     )
-    QUOTE(      printf("%d ", (int)sizeof(void*));    )
-    QUOTE(      return 0;                             )
-    QUOTE(  }                                         );
+    CHAZ_QUOTE(  #include "_charm.h"                       )
+    CHAZ_QUOTE(  int main () {                             )
+    CHAZ_QUOTE(      Charm_Setup;                          )
+    CHAZ_QUOTE(      printf("%d ", (int)sizeof(char));     )
+    CHAZ_QUOTE(      printf("%d ", (int)sizeof(short));    )
+    CHAZ_QUOTE(      printf("%d ", (int)sizeof(int));      )
+    CHAZ_QUOTE(      printf("%d ", (int)sizeof(long));     )
+    CHAZ_QUOTE(      printf("%d ", (int)sizeof(void*));    )
+    CHAZ_QUOTE(      return 0;                             )
+    CHAZ_QUOTE(  }                                         );
 
 static const char type64_code[] =
-    QUOTE(  #include "_charm.h"                       )
-    QUOTE(  int main()                                )
-    QUOTE(  {                                         )
-    QUOTE(      Charm_Setup;                          )
-    QUOTE(      printf("%%d", (int)sizeof(%s));       )
-    QUOTE(      return 0;                             )
-    QUOTE(  }                                         );
+    CHAZ_QUOTE(  #include "_charm.h"                       )
+    CHAZ_QUOTE(  int main()                                )
+    CHAZ_QUOTE(  {                                         )
+    CHAZ_QUOTE(      Charm_Setup;                          )
+    CHAZ_QUOTE(      printf("%%d", (int)sizeof(%s));       )
+    CHAZ_QUOTE(      return 0;                             )
+    CHAZ_QUOTE(  }                                         );
 
 static const char literal64_code[] =
-    QUOTE(  #include "_charm.h"                       )
-    QUOTE(  #define big 9000000000000000000%s         )
-    QUOTE(  int main()                                )
-    QUOTE(  {                                         )
-    QUOTE(      int truncated = (int)big;             )
-    QUOTE(      Charm_Setup;                          )
-    QUOTE(      printf("%%d\n", truncated);           )
-    QUOTE(      return 0;                             )
-    QUOTE(  }                                         );
+    CHAZ_QUOTE(  #include "_charm.h"                       )
+    CHAZ_QUOTE(  #define big 9000000000000000000%s         )
+    CHAZ_QUOTE(  int main()                                )
+    CHAZ_QUOTE(  {                                         )
+    CHAZ_QUOTE(      int truncated = (int)big;             )
+    CHAZ_QUOTE(      Charm_Setup;                          )
+    CHAZ_QUOTE(      printf("%%d\n", truncated);           )
+    CHAZ_QUOTE(      return 0;                             )
+    CHAZ_QUOTE(  }                                         );
 
 void
-Integers_run(void) {
+chaz_Integers_run(void) {
     char *output;
     size_t output_len;
     int sizeof_char       = -1;
@@ -79,8 +79,8 @@ Integers_run(void) {
     int has_64            = false;
     int has_long_long     = false;
     int has___int64       = false;
-    int has_inttypes      = HeadCheck_check_header("inttypes.h");
-    int has_stdint        = HeadCheck_check_header("stdint.h");
+    int has_inttypes      = chaz_HeadCheck_check_header("inttypes.h");
+    int has_stdint        = chaz_HeadCheck_check_header("stdint.h");
     char i32_t_type[10];
     char i32_t_postfix[10];
     char u32_t_postfix[10];
@@ -90,18 +90,18 @@ Integers_run(void) {
     char code_buf[1000];
     char scratch[50];
 
-    ConfWriter_start_module("Integers");
+    chaz_ConfWriter_start_module("Integers");
 
     /* Document endian-ness. */
     if (S_machine_is_big_endian()) {
-        ConfWriter_add_def("BIG_END", NULL);
+        chaz_ConfWriter_add_def("BIG_END", NULL);
     }
     else {
-        ConfWriter_add_def("LITTLE_END", NULL);
+        chaz_ConfWriter_add_def("LITTLE_END", NULL);
     }
 
     /* Record sizeof() for several common integer types. */
-    output = CC_capture_output(sizes_code, &output_len);
+    output = chaz_CC_capture_output(sizes_code, &output_len);
     if (output != NULL) {
         char *end_ptr = output;
 
@@ -118,7 +118,7 @@ Integers_run(void) {
 
     /* Determine whether long longs are available. */
     sprintf(code_buf, type64_code, "long long");
-    output = CC_capture_output(code_buf, &output_len);
+    output = chaz_CC_capture_output(code_buf, &output_len);
     if (output != NULL) {
         has_long_long    = true;
         sizeof_long_long = strtol(output, NULL, 10);
@@ -126,7 +126,7 @@ Integers_run(void) {
 
     /* Determine whether the __int64 type is available. */
     sprintf(code_buf, type64_code, "__int64");
-    output = CC_capture_output(code_buf, &output_len);
+    output = chaz_CC_capture_output(code_buf, &output_len);
     if (output != NULL) {
         has___int64 = true;
         sizeof___int64 = strtol(output, NULL, 10);
@@ -171,75 +171,75 @@ Integers_run(void) {
     }
     else if (has_64) {
         sprintf(code_buf, literal64_code, "LL");
-        output = CC_capture_output(code_buf, &output_len);
+        output = chaz_CC_capture_output(code_buf, &output_len);
         if (output != NULL) {
             strcpy(i64_t_postfix, "LL");
         }
         else {
             sprintf(code_buf, literal64_code, "i64");
-            output = CC_capture_output(code_buf, &output_len);
+            output = chaz_CC_capture_output(code_buf, &output_len);
             if (output != NULL) {
                 strcpy(i64_t_postfix, "i64");
             }
             else {
-                Util_die("64-bit types, but no literal syntax found");
+                chaz_Util_die("64-bit types, but no literal syntax found");
             }
         }
         sprintf(code_buf, literal64_code, "ULL");
-        output = CC_capture_output(code_buf, &output_len);
+        output = chaz_CC_capture_output(code_buf, &output_len);
         if (output != NULL) {
             strcpy(u64_t_postfix, "ULL");
         }
         else {
             sprintf(code_buf, literal64_code, "Ui64");
-            output = CC_capture_output(code_buf, &output_len);
+            output = chaz_CC_capture_output(code_buf, &output_len);
             if (output != NULL) {
                 strcpy(u64_t_postfix, "Ui64");
             }
             else {
-                Util_die("64-bit types, but no literal syntax found");
+                chaz_Util_die("64-bit types, but no literal syntax found");
             }
         }
     }
 
     /* Write out some conditional defines. */
     if (has_inttypes) {
-        ConfWriter_add_def("HAS_INTTYPES_H", NULL);
+        chaz_ConfWriter_add_def("HAS_INTTYPES_H", NULL);
     }
     if (has_stdint) {
-        ConfWriter_add_def("HAS_STDINT_H", NULL);
+        chaz_ConfWriter_add_def("HAS_STDINT_H", NULL);
     }
     if (has_long_long) {
-        ConfWriter_add_def("HAS_LONG_LONG", NULL);
+        chaz_ConfWriter_add_def("HAS_LONG_LONG", NULL);
     }
     if (has___int64) {
-        ConfWriter_add_def("HAS___INT64", NULL);
+        chaz_ConfWriter_add_def("HAS___INT64", NULL);
     }
 
     /* Write out sizes. */
     sprintf(scratch, "%d", sizeof_char);
-    ConfWriter_add_def("SIZEOF_CHAR", scratch);
+    chaz_ConfWriter_add_def("SIZEOF_CHAR", scratch);
     sprintf(scratch, "%d", sizeof_short);
-    ConfWriter_add_def("SIZEOF_SHORT", scratch);
+    chaz_ConfWriter_add_def("SIZEOF_SHORT", scratch);
     sprintf(scratch, "%d", sizeof_int);
-    ConfWriter_add_def("SIZEOF_INT", scratch);
+    chaz_ConfWriter_add_def("SIZEOF_INT", scratch);
     sprintf(scratch, "%d", sizeof_long);
-    ConfWriter_add_def("SIZEOF_LONG", scratch);
+    chaz_ConfWriter_add_def("SIZEOF_LONG", scratch);
     sprintf(scratch, "%d", sizeof_ptr);
-    ConfWriter_add_def("SIZEOF_PTR", scratch);
+    chaz_ConfWriter_add_def("SIZEOF_PTR", scratch);
     if (has_long_long) {
         sprintf(scratch, "%d", sizeof_long_long);
-        ConfWriter_add_def("SIZEOF_LONG_LONG", scratch);
+        chaz_ConfWriter_add_def("SIZEOF_LONG_LONG", scratch);
     }
     if (has___int64) {
         sprintf(scratch, "%d", sizeof___int64);
-        ConfWriter_add_def("SIZEOF___INT64", scratch);
+        chaz_ConfWriter_add_def("SIZEOF___INT64", scratch);
     }
 
     /* Write affirmations, typedefs and maximums/minimums. */
-    ConfWriter_add_typedef("int", "bool_t");
+    chaz_ConfWriter_add_typedef("int", "bool_t");
     if (has_stdint) {
-        ConfWriter_add_sys_include("stdint.h");
+        chaz_ConfWriter_add_sys_include("stdint.h");
     }
     else {
         /* we support only the following subset of stdint.h
@@ -253,68 +253,68 @@ Integers_run(void) {
          *   uint64_t
          */
         if (has_8) {
-            ConfWriter_add_typedef("signed char", "int8_t");
-            ConfWriter_add_typedef("unsigned char", "uint8_t");
+            chaz_ConfWriter_add_typedef("signed char", "int8_t");
+            chaz_ConfWriter_add_typedef("unsigned char", "uint8_t");
         }
         if (has_16) {
-            ConfWriter_add_typedef("signed short", "int16_t");
-            ConfWriter_add_typedef("unsigned short", "uint16_t");
+            chaz_ConfWriter_add_typedef("signed short", "int16_t");
+            chaz_ConfWriter_add_typedef("unsigned short", "uint16_t");
         }
         if (has_32) {
-            ConfWriter_add_typedef(i32_t_type, "int32_t");
+            chaz_ConfWriter_add_typedef(i32_t_type, "int32_t");
             sprintf(scratch, "unsigned %s", i32_t_type);
-            ConfWriter_add_typedef(scratch, "uint32_t");
+            chaz_ConfWriter_add_typedef(scratch, "uint32_t");
         }
         if (has_64) {
-            ConfWriter_add_typedef(i64_t_type, "int64_t");
+            chaz_ConfWriter_add_typedef(i64_t_type, "int64_t");
             sprintf(scratch, "unsigned %s", i64_t_type);
-            ConfWriter_add_typedef(scratch, "uint64_t");
+            chaz_ConfWriter_add_typedef(scratch, "uint64_t");
         }
     }
     if (has_8) {
-        ConfWriter_add_def("HAS_I8_T", NULL);
-        ConfWriter_add_typedef("signed char", "i8_t");
-        ConfWriter_add_typedef("unsigned char", "u8_t");
+        chaz_ConfWriter_add_def("HAS_I8_T", NULL);
+        chaz_ConfWriter_add_typedef("signed char", "i8_t");
+        chaz_ConfWriter_add_typedef("unsigned char", "u8_t");
         /* FIXME: use integer literals. */
-        ConfWriter_add_def("I8_MAX", "0x7F");
-        ConfWriter_add_def("I8_MIN", "(-I8_MAX - 1)");
-        ConfWriter_add_def("U8_MAX", "(I8_MAX * 2 + 1)");
+        chaz_ConfWriter_add_def("I8_MAX", "0x7F");
+        chaz_ConfWriter_add_def("I8_MIN", "(-I8_MAX - 1)");
+        chaz_ConfWriter_add_def("U8_MAX", "(I8_MAX * 2 + 1)");
     }
     if (has_16) {
-        ConfWriter_add_def("HAS_I16_T", NULL);
-        ConfWriter_add_typedef("short", "i16_t");
-        ConfWriter_add_typedef("unsigned short", "u16_t");
+        chaz_ConfWriter_add_def("HAS_I16_T", NULL);
+        chaz_ConfWriter_add_typedef("short", "i16_t");
+        chaz_ConfWriter_add_typedef("unsigned short", "u16_t");
         /* FIXME: use integer literals. */
-        ConfWriter_add_def("I16_MAX", "0x7FFF");
-        ConfWriter_add_def("I16_MIN", "(-I16_MAX - 1)");
-        ConfWriter_add_def("U16_MAX", "(I16_MAX * 2 + 1)");
+        chaz_ConfWriter_add_def("I16_MAX", "0x7FFF");
+        chaz_ConfWriter_add_def("I16_MIN", "(-I16_MAX - 1)");
+        chaz_ConfWriter_add_def("U16_MAX", "(I16_MAX * 2 + 1)");
     }
     if (has_32) {
-        ConfWriter_add_def("HAS_I32_T", NULL);
-        ConfWriter_add_typedef(i32_t_type, "i32_t");
+        chaz_ConfWriter_add_def("HAS_I32_T", NULL);
+        chaz_ConfWriter_add_typedef(i32_t_type, "i32_t");
         sprintf(scratch, "unsigned %s", i32_t_type);
-        ConfWriter_add_typedef(scratch, "u32_t");
+        chaz_ConfWriter_add_typedef(scratch, "u32_t");
         /* FIXME: use integer literals. */
         sprintf(scratch, "0x7FFFFFFF%s", i32_t_postfix);
-        ConfWriter_add_def("I32_MAX", scratch);
-        ConfWriter_add_def("I32_MIN", "(-I32_MAX - 1)");
+        chaz_ConfWriter_add_def("I32_MAX", scratch);
+        chaz_ConfWriter_add_def("I32_MIN", "(-I32_MAX - 1)");
         sprintf(scratch, "(I32_MAX * 2%s + 1%s)", u32_t_postfix,
                 u32_t_postfix);
-        ConfWriter_add_def("U32_MAX", scratch);
+        chaz_ConfWriter_add_def("U32_MAX", scratch);
     }
     if (has_64) {
-        ConfWriter_add_def("HAS_I64_T", NULL);
-        ConfWriter_add_typedef(i64_t_type, "i64_t");
+        chaz_ConfWriter_add_def("HAS_I64_T", NULL);
+        chaz_ConfWriter_add_typedef(i64_t_type, "i64_t");
         sprintf(scratch, "unsigned %s", i64_t_type);
-        ConfWriter_add_typedef(scratch, "u64_t");
+        chaz_ConfWriter_add_typedef(scratch, "u64_t");
         /* FIXME: use integer literals. */
         sprintf(scratch, "0x7FFFFFFFFFFFFFFF%s", i64_t_postfix);
-        ConfWriter_add_def("I64_MAX", scratch);
+        chaz_ConfWriter_add_def("I64_MAX", scratch);
         sprintf(scratch, "(-I64_MAX - 1%s)", i64_t_postfix);
-        ConfWriter_add_def("I64_MIN", scratch);
+        chaz_ConfWriter_add_def("I64_MIN", scratch);
         sprintf(scratch, "(I64_MAX * 2%s + 1%s)", u64_t_postfix,
                 u64_t_postfix);
-        ConfWriter_add_def("U64_MAX", scratch);
+        chaz_ConfWriter_add_def("U64_MAX", scratch);
     }
 
     /* Create the I64P and U64P printf macros. */
@@ -331,25 +331,25 @@ Integers_run(void) {
 
         /* Buffer to hold the code, and its start and end. */
         static const char format_64_code[] =
-            QUOTE(  #include "_charm.h"                           )
-            QUOTE(  int main() {                                  )
-            QUOTE(      Charm_Setup;                              )
-            QUOTE(      printf("%%%su", 18446744073709551615%s);  )
-            QUOTE(      return 0;                                 )
-            QUOTE( }                                              );
+            CHAZ_QUOTE(  #include "_charm.h"                           )
+            CHAZ_QUOTE(  int main() {                                  )
+            CHAZ_QUOTE(      Charm_Setup;                              )
+            CHAZ_QUOTE(      printf("%%%su", 18446744073709551615%s);  )
+            CHAZ_QUOTE(      return 0;                                 )
+            CHAZ_QUOTE( }                                              );
 
         for (i = 0; options[i] != NULL; i++) {
             /* Try to print 2**64-1, and see if we get it back intact. */
             sprintf(code_buf, format_64_code, options[i], u64_t_postfix);
-            output = CC_capture_output(code_buf, &output_len);
+            output = chaz_CC_capture_output(code_buf, &output_len);
 
             if (output_len != 0
                 && strcmp(output, "18446744073709551615") == 0
                ) {
                 sprintf(scratch, "\"%sd\"", options[i]);
-                ConfWriter_add_def("I64P", scratch);
+                chaz_ConfWriter_add_def("I64P", scratch);
                 sprintf(scratch, "\"%su\"", options[i]);
-                ConfWriter_add_def("U64P", scratch);
+                chaz_ConfWriter_add_def("U64P", scratch);
                 break;
             }
         }
@@ -359,38 +359,38 @@ Integers_run(void) {
     /* Write out the 32-bit and 64-bit literal macros. */
     if (has_32) {
         if (strcmp(i32_t_postfix, "") == 0) {
-            ConfWriter_add_def("I32_C(n)", "n");
+            chaz_ConfWriter_add_def("I32_C(n)", "n");
             sprintf(scratch, "n##%s", u32_t_postfix);
-            ConfWriter_add_def("U32_C(n)", scratch);
+            chaz_ConfWriter_add_def("U32_C(n)", scratch);
         }
         else {
             sprintf(scratch, "n##%s", i32_t_postfix);
-            ConfWriter_add_def("I32_C(n)", scratch);
+            chaz_ConfWriter_add_def("I32_C(n)", scratch);
             sprintf(scratch, "n##%s", u32_t_postfix);
-            ConfWriter_add_def("U32_C(n)", scratch);
+            chaz_ConfWriter_add_def("U32_C(n)", scratch);
         }
     }
     if (has_64) {
         sprintf(scratch, "n##%s", i64_t_postfix);
-        ConfWriter_add_def("I64_C(n)", scratch);
+        chaz_ConfWriter_add_def("I64_C(n)", scratch);
         sprintf(scratch, "n##%s", u64_t_postfix);
-        ConfWriter_add_def("U64_C(n)", scratch);
+        chaz_ConfWriter_add_def("U64_C(n)", scratch);
     }
 
     /* Create macro for promoting pointers to integers. */
     if (has_64) {
         if (sizeof_ptr == 8) {
-            ConfWriter_add_def("PTR_TO_I64(ptr)",
-                               "((chy_i64_t)(chy_u64_t)(ptr))");
+            chaz_ConfWriter_add_def("PTR_TO_I64(ptr)",
+                                    "((chy_i64_t)(chy_u64_t)(ptr))");
         }
         else {
-            ConfWriter_add_def("PTR_TO_I64(ptr)",
-                               "((chy_i64_t)(chy_u32_t)(ptr))");
+            chaz_ConfWriter_add_def("PTR_TO_I64(ptr)",
+                                    "((chy_i64_t)(chy_u32_t)(ptr))");
         }
     }
 
     /* True and false. */
-    ConfWriter_append_conf(
+    chaz_ConfWriter_append_conf(
         "#ifndef true\n"
         "  #define true 1\n"
         "#endif\n"
@@ -399,7 +399,7 @@ Integers_run(void) {
         "#endif\n"
     );
 
-    ConfWriter_end_module();
+    chaz_ConfWriter_end_module();
 }
 
 static int


Mime
View raw message