From 6f98f3f2bb89fdc5096b882c6599078c21ba5df1 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 8 Oct 2008 18:40:40 +0000 Subject: - fix building locale (pre- and generated, even parallel) --- extra/locale/gen_ldc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'extra/locale/gen_ldc.c') diff --git a/extra/locale/gen_ldc.c b/extra/locale/gen_ldc.c index 2a121610e..08cd855af 100644 --- a/extra/locale/gen_ldc.c +++ b/extra/locale/gen_ldc.c @@ -148,8 +148,9 @@ void out_size_t(FILE *f, const size_t *p, size_t n, char *comment) } -int main(void) +int main(int argc, char **argv) { + char *output_file = "locale_data.c"; FILE *lso; /* static object */ int i; #ifdef __LOCALE_DATA_MAGIC_SIZE @@ -158,8 +159,10 @@ int main(void) memset(magic, 0, __LOCALE_DATA_MAGIC_SIZE); #endif /* __LOCALE_DATA_MAGIC_SIZE */ - if (!(lso = fopen("locale_data.c", "w"))) { - printf("can't open locale_data.c!\n"); + if (argc == 2) + output_file = argv[1]; + if (!(lso = fopen(output_file, "w"))) { + printf("can't open output file '%s'!\n", output_file); return EXIT_FAILURE; } -- cgit v1.2.3