mbed-os/libraries/mbed/common
Adam Green c6d2c81c7f LocalFileSystem fails to open binary files
Fixes issue #1562 reported by @justbuchanan.

When building code with GCC-ARM / newlib, attempting to use the
b (binary) mode in a fopen() call would fail. newlib would parse
this option and pass it down to the LocalFileSystem open call which
didn't like the unexpected O_BINARY flag in openmode.

The openmode_to_posix() function in retarget.cpp would never set the
O_BINARY flag for the other toolchains but for GCC it would just pass
down whatever newlib placed there.  This commit masks out the O_BINARY
bit so that it never gets passed down to the file system drivers, just
as occurs for the other supported toolchains.

Test case:
  FILE *fp = fopen("/local/out.txt", "rb");

I tested that code on mbed LPC1768 and LPC11U24 boards while using
GCC_ARM as the toolchain. It failed on both platforms previous to
this change and succeeded there after.
2016-03-07 13:34:32 -08:00
..
BusIn.cpp Include missing header file 2015-01-28 18:57:19 +08:00
BusInOut.cpp Include missing header file 2015-01-28 18:57:19 +08:00
BusOut.cpp Include missing header file 2015-01-28 18:57:19 +08:00
CAN.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
CallChain.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
Ethernet.cpp Unify mbed library sources 2013-06-14 17:32:15 +01:00
FileBase.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
FileLike.cpp Unify mbed library sources 2013-06-14 17:32:15 +01:00
FilePath.cpp Fix NULL pointer indirection in FilePath 2013-09-05 14:09:27 +03:00
FileSystemLike.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
I2C.cpp I2C - costness for tx buffer 2015-06-09 09:34:48 +01:00
I2CSlave.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
InterruptIn.cpp InterrupIn - attach with null clears the function pointer 2015-11-20 08:12:29 +00:00
InterruptManager.cpp [RZ/A1H] first release - change InterruptManager.cpp for CA9 2014-10-24 11:46:02 +09:00
LocalFileSystem.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
RawSerial.cpp Fix RawSerial when used with ARMCC microlib 2016-01-10 19:01:46 -06:00
SPI.cpp SPI - constness for tx buffer 2015-06-08 16:39:42 +01:00
SPISlave.cpp removing warnings discovered by using -Weffc++ flag for gcc 2014-05-26 18:04:46 +01:00
Serial.cpp Added new serial class, remove interrupt chaining 2013-10-23 16:08:34 +03:00
SerialBase.cpp Serial - constness for tx 2015-06-09 10:02:27 +01:00
Stream.cpp use cstdarg lib and not stdarg 2015-11-23 10:08:51 -06:00
Ticker.cpp Asynch API for mbed (SPI, I2C, Serial) and low power ticker 2015-04-27 10:55:44 -07:00
Timeout.cpp Added new serial class, remove interrupt chaining 2013-10-23 16:08:34 +03:00
Timer.cpp Timer/Ticker - fix constness of the data argument/member 2015-05-21 08:47:23 +01:00
TimerEvent.cpp Asynch API for mbed (SPI, I2C, Serial) and low power ticker 2015-04-27 10:55:44 -07:00
assert.c [mbed] Modified MBED_ASSERT to use error() 2015-07-13 10:20:11 -06:00
board.c added BLoD functionality to all Silicon Labs boards. Added #define to all device.h files and a disable_irq() exception in common/board.c because the wait function is implemented in a interrupt for both NRF and SiLabs boards 2015-08-11 11:32:11 -05:00
error.c Change "error.h" to "mbed_error.h" to avoid conflicts with 3rd party code 2014-08-15 16:19:18 +01:00
gpio.c mbed common - trailing white spaces removal 2014-05-29 15:11:05 +02:00
lp_ticker_api.c Asynch API for mbed (SPI, I2C, Serial) and low power ticker 2015-04-27 10:55:44 -07:00
mbed_interface.c Ensure that IG (Global) bit is reset in MAC address for K64F and others 2014-11-06 09:48:32 -08:00
pinmap_common.c Fixed and suppressed compiler warnings. 2015-04-23 12:36:07 -05:00
retarget.cpp LocalFileSystem fails to open binary files 2016-03-07 13:34:32 -08:00
rtc_time.c Made attach_rtc with disabled irqs 2015-02-28 12:21:55 +01:00
semihost_api.c Unify mbed library sources 2013-06-14 17:32:15 +01:00
ticker_api.c Asynch API for mbed (SPI, I2C, Serial) and low power ticker 2015-04-27 10:55:44 -07:00
us_ticker_api.c Asynch API for mbed (SPI, I2C, Serial) and low power ticker 2015-04-27 10:55:44 -07:00
wait_api.c Silence signed/unsigned comparison warnings in GCC. 2013-08-13 01:47:19 -07:00