> > I'm planning to go with something like this: > > #ifdef IS_MINGW > extern void log_printf(enum log_levels level, const char *file, int line, > const char *function, const char *format, ...) > __attribute__ ((format (gnu_printf, 5, 6))); > extern void log_printf_lf(enum log_levels level, const char *file, int > line, > const char *function, const char *format, ...) > __attribute__ ((format (gnu_printf, 5, 6))); > #else > extern void log_printf(enum log_levels level, const char *file, int line, > const char *function, const char *format, ...) > __attribute__ ((format (printf, 5, 6))); > extern void log_printf_lf(enum log_levels level, const char *file, int > line, > const char *function, const char *format, ...) > __attribute__ ((format (printf, 5, 6))); > #endif > > Or do you reckon we should safely be able to use gnu_printf for all > platforms and remove the need for an ifdef? >
Scratch that one too. It seems using -D__USE_MINGW_ANSI_STDIO=1 with MinGW-w64 cancels the need to set gnu_printf.
_______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
