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/04429b7b Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/04429b7b Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/04429b7b Branch: refs/heads/c99-types Commit: 04429b7b652f53f53fdd678baa5ee14223a976ad Parents: 07655e3 Author: Nick Wellnhofer <[email protected]> Authored: Sun Nov 18 01:07:40 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Nov 18 16:36:59 2012 +0100 ---------------------------------------------------------------------- clownfish/compiler/common/charmonizer.c | 18 +++++++++++++++++- clownfish/runtime/common/charmonizer.c | 18 +++++++++++++++++- common/charmonizer.c | 18 +++++++++++++++++- 3 files changed, 51 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/04429b7b/clownfish/compiler/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/clownfish/compiler/common/charmonizer.c b/clownfish/compiler/common/charmonizer.c index 3d2516f..b849437 100644 --- a/clownfish/compiler/common/charmonizer.c +++ b/clownfish/compiler/common/charmonizer.c @@ -524,6 +524,13 @@ chaz_Probe_clean_up(void); * UINT32_C * UINT64_C * + * If inttypes.h is is available, it will be pound-included in the + * configuration header. If it is not, the following macros will be defined if + * possible: + * + * PRId64 + * PRIu64 + * * The following typedefs will be created: * * bool_t @@ -2688,7 +2695,10 @@ chaz_Integers_run(void) { /* Write typedefs, maximums/minimums and literals macros. */ chaz_ConfWriter_add_typedef("int", "bool_t"); - if (has_stdint) { + if (has_inttypes) { + chaz_ConfWriter_add_sys_include("inttypes.h"); + } + else if (has_stdint) { chaz_ConfWriter_add_sys_include("stdint.h"); } else { @@ -2800,6 +2810,12 @@ chaz_Integers_run(void) { chaz_ConfWriter_add_def("I64P", scratch); sprintf(scratch, "\"%su\"", options[i]); chaz_ConfWriter_add_def("U64P", scratch); + if (!has_inttypes) { + sprintf(scratch, "\"%sd\"", options[i]); + chaz_ConfWriter_add_global_def("PRId64", scratch); + sprintf(scratch, "\"%su\"", options[i]); + chaz_ConfWriter_add_global_def("PRIu64", scratch); + } break; } } http://git-wip-us.apache.org/repos/asf/lucy/blob/04429b7b/clownfish/runtime/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c index 2f53734..7bf6010 100644 --- a/clownfish/runtime/common/charmonizer.c +++ b/clownfish/runtime/common/charmonizer.c @@ -753,6 +753,13 @@ chaz_Headers_run(void); * UINT32_C * UINT64_C * + * If inttypes.h is is available, it will be pound-included in the + * configuration header. If it is not, the following macros will be defined if + * possible: + * + * PRId64 + * PRIu64 + * * The following typedefs will be created: * * bool_t @@ -3735,7 +3742,10 @@ chaz_Integers_run(void) { /* Write typedefs, maximums/minimums and literals macros. */ chaz_ConfWriter_add_typedef("int", "bool_t"); - if (has_stdint) { + if (has_inttypes) { + chaz_ConfWriter_add_sys_include("inttypes.h"); + } + else if (has_stdint) { chaz_ConfWriter_add_sys_include("stdint.h"); } else { @@ -3847,6 +3857,12 @@ chaz_Integers_run(void) { chaz_ConfWriter_add_def("I64P", scratch); sprintf(scratch, "\"%su\"", options[i]); chaz_ConfWriter_add_def("U64P", scratch); + if (!has_inttypes) { + sprintf(scratch, "\"%sd\"", options[i]); + chaz_ConfWriter_add_global_def("PRId64", scratch); + sprintf(scratch, "\"%su\"", options[i]); + chaz_ConfWriter_add_global_def("PRIu64", scratch); + } break; } } http://git-wip-us.apache.org/repos/asf/lucy/blob/04429b7b/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/common/charmonizer.c b/common/charmonizer.c index 67af2c4..30ff149 100644 --- a/common/charmonizer.c +++ b/common/charmonizer.c @@ -753,6 +753,13 @@ chaz_Headers_run(void); * UINT32_C * UINT64_C * + * If inttypes.h is is available, it will be pound-included in the + * configuration header. If it is not, the following macros will be defined if + * possible: + * + * PRId64 + * PRIu64 + * * The following typedefs will be created: * * bool_t @@ -3735,7 +3742,10 @@ chaz_Integers_run(void) { /* Write typedefs, maximums/minimums and literals macros. */ chaz_ConfWriter_add_typedef("int", "bool_t"); - if (has_stdint) { + if (has_inttypes) { + chaz_ConfWriter_add_sys_include("inttypes.h"); + } + else if (has_stdint) { chaz_ConfWriter_add_sys_include("stdint.h"); } else { @@ -3847,6 +3857,12 @@ chaz_Integers_run(void) { chaz_ConfWriter_add_def("I64P", scratch); sprintf(scratch, "\"%su\"", options[i]); chaz_ConfWriter_add_def("U64P", scratch); + if (!has_inttypes) { + sprintf(scratch, "\"%sd\"", options[i]); + chaz_ConfWriter_add_global_def("PRId64", scratch); + sprintf(scratch, "\"%su\"", options[i]); + chaz_ConfWriter_add_global_def("PRIu64", scratch); + } break; } }
