mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
windows: fopen files with "wb"
This commit is contained in:
@@ -1010,7 +1010,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
int old_errors, old_tests, old_leaks, expected_errors;
|
int old_errors, old_tests, old_leaks, expected_errors;
|
||||||
|
|
||||||
logfile = fopen(LOGFILE, "w");
|
logfile = fopen(LOGFILE, "wb");
|
||||||
if (logfile == NULL) {
|
if (logfile == NULL) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Could not open the log file, running in verbose mode\n");
|
"Could not open the log file, running in verbose mode\n");
|
||||||
|
|||||||
@@ -545,7 +545,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
int old_errors, old_tests, old_leaks;
|
int old_errors, old_tests, old_leaks;
|
||||||
|
|
||||||
logfile = fopen(LOGFILE, "w");
|
logfile = fopen(LOGFILE, "wb");
|
||||||
if (logfile == NULL) {
|
if (logfile == NULL) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Could not open the log file, running in verbose mode\n");
|
"Could not open the log file, running in verbose mode\n");
|
||||||
|
|||||||
2
shell.c
2
shell.c
@@ -807,7 +807,7 @@ xmllintShellWrite(xmllintShellCtxtPtr ctxt, char *filename, xmlNodePtr node,
|
|||||||
default:{
|
default:{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
f = fopen((char *) filename, "w");
|
f = fopen((char *) filename, "wb");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
fprintf(ctxt->output,
|
fprintf(ctxt->output,
|
||||||
"Failed to write to %s\n", filename);
|
"Failed to write to %s\n", filename);
|
||||||
|
|||||||
@@ -487,7 +487,7 @@ int main(int argc, char **argv) {
|
|||||||
if (xmlCatalogIsEmpty(catal)) {
|
if (xmlCatalogIsEmpty(catal)) {
|
||||||
remove(argv[i + 1]);
|
remove(argv[i + 1]);
|
||||||
} else {
|
} else {
|
||||||
out = fopen(argv[i + 1], "w");
|
out = fopen(argv[i + 1], "wb");
|
||||||
if (out == NULL) {
|
if (out == NULL) {
|
||||||
fprintf(stderr, "could not open %s for saving\n",
|
fprintf(stderr, "could not open %s for saving\n",
|
||||||
argv[i + 1]);
|
argv[i + 1]);
|
||||||
@@ -502,7 +502,7 @@ int main(int argc, char **argv) {
|
|||||||
if (xmlCatalogIsEmpty(super)) {
|
if (xmlCatalogIsEmpty(super)) {
|
||||||
remove(XML_SGML_DEFAULT_CATALOG);
|
remove(XML_SGML_DEFAULT_CATALOG);
|
||||||
} else {
|
} else {
|
||||||
out = fopen(XML_SGML_DEFAULT_CATALOG, "w");
|
out = fopen(XML_SGML_DEFAULT_CATALOG, "wb");
|
||||||
if (out == NULL) {
|
if (out == NULL) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"could not open %s for saving\n",
|
"could not open %s for saving\n",
|
||||||
@@ -592,7 +592,7 @@ int main(int argc, char **argv) {
|
|||||||
if (noout && filename && *filename) {
|
if (noout && filename && *filename) {
|
||||||
FILE *out;
|
FILE *out;
|
||||||
|
|
||||||
out = fopen(filename, "w");
|
out = fopen(filename, "wb");
|
||||||
if (out == NULL) {
|
if (out == NULL) {
|
||||||
fprintf(stderr, "could not open %s for saving\n", filename);
|
fprintf(stderr, "could not open %s for saving\n", filename);
|
||||||
exit_value = 2;
|
exit_value = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user