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:
Uwe Bonnes 2020-03-24 16:29:04 +01:00 提交者 UweBonnes
父節點 e57792c95e
當前提交 2e185ba578
共有 4 個檔案被更改,包括 6 行新增3 行删除

查看文件

@ -22,7 +22,9 @@
#define __GENERAL_H
#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 <stdbool.h>
#include <stdlib.h>

查看文件

@ -22,13 +22,13 @@
* binary file from the command line.
*/
#include "general.h"
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "general.h"
#include "target.h"
#include "target_internal.h"

查看文件

@ -24,6 +24,7 @@
*/
#if defined(_WIN32) || defined(__CYGWIN__)
# define __USE_MINGW_ANSI_STDIO 1
# include <winsock2.h>
# include <windows.h>
# include <ws2tcpip.h>

查看文件

@ -31,9 +31,9 @@
* particularly Sections 12. DSU and 25. NVMCTRL
*/
#include "general.h"
#include <ctype.h>
#include "general.h"
#include "target.h"
#include "target_internal.h"
#include "cortexm.h"