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:
joerg_wunsch 2013-12-05 16:27:54 +00:00
parent 0e9b1c2898
commit a87d7d7249
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2013-12-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
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
2013-12-04 Rene Liebscher <R.Liebscher@gmx.de>
Rework of bitbanging functions setpin, getpin, highpulsepin to make simplier use

1
NEWS
View File

@ -19,6 +19,7 @@ Current:
* Bugfixes
- bug #40055: AVRDUDE segfaults when writing eeprom
- bug #40085: Typo fix in fuses report (for 6.1-svn-20130917)
- bug #40817: Elf file support (possibly) not working on 6.0.1 windows build
- patch #XXXX: xxx
* Internals:

View File

@ -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)
{