Merge pull request #1074 from EvanLloyd/ejll/62_file_mode

fiptool: Update file open modes with 'b' (for Windows)
diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c
index 4d80f2f..02223d9 100644
--- a/tools/fiptool/fiptool.c
+++ b/tools/fiptool/fiptool.c
@@ -285,7 +285,7 @@
 	fip_toc_entry_t *toc_entry;
 	int terminated = 0;
 
-	fp = fopen(filename, "r");
+	fp = fopen(filename, "rb");
 	if (fp == NULL)
 		log_err("fopen %s", filename);
 
@@ -376,7 +376,7 @@
 
 	assert(uuid != NULL);
 
-	fp = fopen(filename, "r");
+	fp = fopen(filename, "rb");
 	if (fp == NULL)
 		log_err("fopen %s", filename);
 
@@ -398,7 +398,7 @@
 {
 	FILE *fp;
 
-	fp = fopen(filename, "w");
+	fp = fopen(filename, "wb");
 	if (fp == NULL)
 		log_err("fopen");
 	xfwrite(image->buffer, image->toc_e.size, fp, filename);
@@ -534,7 +534,7 @@
 	toc_entry->offset_address = entry_offset;
 
 	/* Generate the FIP file. */
-	fp = fopen(filename, "w");
+	fp = fopen(filename, "wb");
 	if (fp == NULL)
 		log_err("fopen %s", filename);