Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> --- cgcc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cgcc b/cgcc index c075e5f..e94a965 100755 --- a/cgcc +++ b/cgcc @@ -226,6 +226,19 @@ sub add_specs { ' -D__OpenBSD__=1'; } elsif ($spec eq 'unix') { return ' -Dunix=1 -D__unix=1 -D__unix__=1'; + } elsif ($spec =~ /^mingw/) { + return ' -isystem /mingw/include' . + ' -D__MINGW32__=1' . + ' -D__MSVCRT__=1' . + ' -DWIN32=1 -D_WIN32=1 -D__WIN32=1 -D__WIN32__=1' . + ' -DWINNT=1 -D__WINNT=1 -D__WINNT__=1' . + " -D'_cdecl=__attribute__((__cdecl__))'" . + " -D'__cdecl=__attribute__((__cdecl__))'" . + " -D'_stdcall=__attribute__((__stdcall__))'" . + " -D'__stdcall=__attribute__((__stdcall__))'" . + " -D'_fastcall=__attribute__((__fastcall__))'" . + " -D'__fastcall=__attribute__((__fastcall__))'" . + " -D'__declspec(x)=__attribute__((x))'"; } elsif ( $spec =~ /^cygwin/) { return &add_specs ('unix') . ' -D__CYGWIN__=1 -D__CYGWIN32__=1' . -- 1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html