BMP/PC: Allow to compile with mingw64 (#615)
__USE_MINGW_ANSI_STDIO 1 must be set befor any windows specific included.
This commit is contained in:
parent
e57792c95e
commit
2e185ba578
|
@ -22,7 +22,9 @@
|
||||||
#define __GENERAL_H
|
#define __GENERAL_H
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#define __USE_MINGW_ANSI_STDIO 1
|
#if !defined(__USE_MINGW_ANSI_STDIO)
|
||||||
|
# define __USE_MINGW_ANSI_STDIO 1
|
||||||
|
#endif
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
* binary file from the command line.
|
* binary file from the command line.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "general.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "target_internal.h"
|
#include "target_internal.h"
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
# define __USE_MINGW_ANSI_STDIO 1
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <ws2tcpip.h>
|
# include <ws2tcpip.h>
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
* particularly Sections 12. DSU and 25. NVMCTRL
|
* particularly Sections 12. DSU and 25. NVMCTRL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "general.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "general.h"
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "target_internal.h"
|
#include "target_internal.h"
|
||||||
#include "cortexm.h"
|
#include "cortexm.h"
|
||||||
|
|
Loading…
Reference in New Issue