diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-10-08 18:40:40 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-10-08 18:40:40 +0000 |
commit | 6f98f3f2bb89fdc5096b882c6599078c21ba5df1 (patch) | |
tree | 19a0aec7393a8949ef9e184aa9e48dd3bc738fe3 /extra/locale/gen_ldc.c | |
parent | b60e6c916c4e10d970303a7a5b419210797709e6 (diff) |
- fix building locale (pre- and generated, even parallel)
Diffstat (limited to 'extra/locale/gen_ldc.c')
-rw-r--r-- | extra/locale/gen_ldc.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |