Hi,
On z/OS, we tag files that are created with the code page they should use
when the file is created in 'text' mode, but we don't do any tagging if the
files are created in 'binary' mode.
This causes grief in genaliases.c
I would like to propose a small patch to create these files in text rather than
binary - I don't believe this would create any issues on non-z/OS systems
but I haven't tested there. Here's the proposed patch:
diff --git a/lib/genaliases.c b/lib/genaliases.c
index de7d705..81c7a1c 100644
--- a/lib/genaliases.c
+++ b/lib/genaliases.c
@@ -98,7 +98,7 @@ int main (int argc, char* argv[])
#define BRACIFY(...) { __VA_ARGS__ }
#define DEFALIAS(xxx_alias,xxx) emit_alias(aliases_file,xxx_alias,#xxx);
- canonical_sh_file = fopen(canonical_sh_file_name, "wb");
+ canonical_sh_file = fopen(canonical_sh_file_name, "w");
if (canonical_sh_file == NULL) {
fprintf(stderr, "Could not open '%s' for writing\n", canonical_sh_file_name);
exit(1);
@@ -107,7 +107,7 @@ int main (int argc, char* argv[])
if (ferror(canonical_sh_file) || fclose(canonical_sh_file))
exit(1);
- canonical_sh_file = fopen(canonical_local_sh_file_name, "wb");
+ canonical_sh_file = fopen(canonical_local_sh_file_name, "w");
if (canonical_sh_file == NULL) {
fprintf(stderr, "Could not open '%s' for writing\n", canonical_local_sh_file_name);
exit(1);
Thanks, Mike