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:
parent
1c401d5d08
commit
8fa7417923
|
@ -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>
|
2013-12-04 Rene Liebscher <R.Liebscher@gmx.de>
|
||||||
|
|
||||||
Rework of bitbanging functions setpin, getpin, highpulsepin to make simplier use
|
Rework of bitbanging functions setpin, getpin, highpulsepin to make simplier use
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -19,6 +19,7 @@ Current:
|
||||||
* Bugfixes
|
* Bugfixes
|
||||||
- bug #40055: AVRDUDE segfaults when writing eeprom
|
- bug #40055: AVRDUDE segfaults when writing eeprom
|
||||||
- bug #40085: Typo fix in fuses report (for 6.1-svn-20130917)
|
- 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
|
- patch #XXXX: xxx
|
||||||
|
|
||||||
* Internals:
|
* Internals:
|
||||||
|
|
8
fileio.c
8
fileio.c
|
@ -1416,7 +1416,11 @@ static int fmt_autodetect(char * fname)
|
||||||
int found;
|
int found;
|
||||||
int first = 1;
|
int first = 1;
|
||||||
|
|
||||||
|
#if defined(WIN32NATIVE)
|
||||||
f = fopen(fname, "r");
|
f = fopen(fname, "r");
|
||||||
|
#else
|
||||||
|
f = fopen(fname, "rb");
|
||||||
|
#endif
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
fprintf(stderr, "%s: error opening %s: %s\n",
|
fprintf(stderr, "%s: error opening %s: %s\n",
|
||||||
progname, fname, strerror(errno));
|
progname, fname, strerror(errno));
|
||||||
|
@ -1562,8 +1566,8 @@ int fileio(int op, char * filename, FILEFMT format,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32NATIVE)
|
#if defined(WIN32NATIVE)
|
||||||
/* Open Raw Binary format in binary mode on Windows.*/
|
/* Open Raw Binary and ELF format in binary mode on Windows.*/
|
||||||
if(format == FMT_RBIN)
|
if(format == FMT_RBIN || format == FMT_ELF)
|
||||||
{
|
{
|
||||||
if(fio.op == FIO_READ)
|
if(fio.op == FIO_READ)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue