summaryrefslogtreecommitdiff
path: root/src/helper/fileio.c
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-07-31 09:15:59 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-07-31 09:15:59 +0000
commitf251b925ffe230de9aa01849ba7b53230a5c492f (patch)
tree5dbb62a81816b28192187100583c2fbca9e0763f /src/helper/fileio.c
parenteba4e394d834c5088f95412a6d3bdba622a691fc (diff)
downloadopenocd+libswd-f251b925ffe230de9aa01849ba7b53230a5c492f.tar.gz
openocd+libswd-f251b925ffe230de9aa01849ba7b53230a5c492f.tar.bz2
openocd+libswd-f251b925ffe230de9aa01849ba7b53230a5c492f.tar.xz
openocd+libswd-f251b925ffe230de9aa01849ba7b53230a5c492f.zip
- motorola s19 file loader added
- added checksum support to intel hex file loader - elf file loader now ignores any bss sections - mingw build now always opens files in binary mode git-svn-id: svn://svn.berlios.de/openocd/trunk@185 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/fileio.c')
-rw-r--r--src/helper/fileio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helper/fileio.c b/src/helper/fileio.c
index 7075fc16..742bc689 100644
--- a/src/helper/fileio.c
+++ b/src/helper/fileio.c
@@ -97,9 +97,14 @@ int fileio_open_local(fileio_t *fileio)
return ERROR_FILEIO_OPERATION_FAILED;
}
}
-
+
+ /* win32 always opens in binary mode */
+#ifndef _WIN32
if (fileio->type == FILEIO_BINARY)
+#endif
+ {
strcat(access, "b");
+ }
if (!(fileio_local->file = fopen(fileio->url, access)))
{