mirror of https://github.com/ecmwf/eccodes.git
Windows: use binary open
This commit is contained in:
parent
a77570cd19
commit
79b1853de8
|
@ -135,7 +135,7 @@ static int split_file_by_subtype(FILE* in, const char* filename, unsigned long *
|
|||
if (verbose) {
|
||||
if (!file_exists(ofilename)) printf("Writing output to %s\n", ofilename);
|
||||
}
|
||||
out=fopen(ofilename,"a");
|
||||
out=fopen(ofilename,"ab");
|
||||
if (!out) {
|
||||
fprintf(stderr,"ERROR: Failed to open output file '%s'\n", ofilename);
|
||||
perror(ofilename);
|
||||
|
@ -183,7 +183,7 @@ int main(int argc,char* argv[])
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
infh=fopen(filename,"r");
|
||||
infh=fopen(filename,"rb");
|
||||
if (!infh) {
|
||||
perror(filename);
|
||||
return 1;
|
||||
|
|
|
@ -91,7 +91,7 @@ int main(int argc,char* argv[])
|
|||
if (strcmp(filename,"-")==0)
|
||||
infh=stdin;
|
||||
else
|
||||
infh=fopen(filename,"r");
|
||||
infh=fopen(filename,"rb");
|
||||
if (!infh) {
|
||||
perror(filename);
|
||||
exit(1);
|
||||
|
|
|
@ -127,7 +127,7 @@ int main(int argc,char* argv[])
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
infh=fopen(filename,"r");
|
||||
infh=fopen(filename,"rb");
|
||||
if (!infh) {
|
||||
perror(filename);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue