mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
fix MinGW format attribute
Setting -D__USE_MINGW_ANSI_STDIO=1 is wrong and should not be used. MinGW internally uses a macro to select between gnu_printf and printf. Just use that instead of using a wrong format under clang backends. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
24f60011fd
commit
5e6cefa17e
2 changed files with 3 additions and 8 deletions
|
@ -22,13 +22,6 @@ add_project_arguments(
|
|||
language: 'c'
|
||||
)
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
add_project_arguments(
|
||||
'-D__USE_MINGW_ANSI_STDIO=1',
|
||||
language: 'c'
|
||||
)
|
||||
endif
|
||||
|
||||
add_project_arguments(
|
||||
'-DFDT_ASSUME_MASK=' + get_option('assume-mask').to_string(),
|
||||
language: 'c'
|
||||
|
|
4
util.h
4
util.h
|
@ -13,7 +13,9 @@
|
|||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
||||
#ifdef __MINGW_PRINTF_FORMAT
|
||||
#define PRINTF(i, j) __attribute__((format (__MINGW_PRINTF_FORMAT, i, j)))
|
||||
#elif __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
||||
#define PRINTF(i, j) __attribute__((format (gnu_printf, i, j)))
|
||||
#else
|
||||
#define PRINTF(i, j) __attribute__((format (printf, i, j)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue