mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-17 02:54:17 +00:00
bug #40817: Elf file support (possibly) not working on 6.0.1 windows build
* fileio.c (fileio): open file in binary mode also for FMT_ELF git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1253 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
8
fileio.c
8
fileio.c
@@ -1416,7 +1416,11 @@ static int fmt_autodetect(char * fname)
|
||||
int found;
|
||||
int first = 1;
|
||||
|
||||
#if defined(WIN32NATIVE)
|
||||
f = fopen(fname, "r");
|
||||
#else
|
||||
f = fopen(fname, "rb");
|
||||
#endif
|
||||
if (f == NULL) {
|
||||
fprintf(stderr, "%s: error opening %s: %s\n",
|
||||
progname, fname, strerror(errno));
|
||||
@@ -1562,8 +1566,8 @@ int fileio(int op, char * filename, FILEFMT format,
|
||||
}
|
||||
|
||||
#if defined(WIN32NATIVE)
|
||||
/* Open Raw Binary format in binary mode on Windows.*/
|
||||
if(format == FMT_RBIN)
|
||||
/* Open Raw Binary and ELF format in binary mode on Windows.*/
|
||||
if(format == FMT_RBIN || format == FMT_ELF)
|
||||
{
|
||||
if(fio.op == FIO_READ)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user