linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] Add cygwin support to cgcc
@ 2007-05-22 18:12 Ramsay Jones
  2007-05-23 17:41 ` Josh Triplett
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2007-05-22 18:12 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Sparse Mailing-list



Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
  cgcc |   10 ++++++++++
  1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/cgcc b/cgcc
index e56226e..d50220c 100755
--- a/cgcc
+++ b/cgcc
@@ -214,6 +214,16 @@ sub add_specs {
  	    ' -D__STDC__=1';
      } elsif ($spec eq 'unix') {
  	return ' -Dunix=1 -D__unix=1 -D__unix__=1';
+    } elsif ( $spec =~ /^cygwin/) {
+	return &add_specs ('unix') .
+	    ' -D__STDC__=1 -D__CYGWIN__=1 -D__CYGWIN32__=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 eq 'i86') {
  	return (' -Di386=1 -D__i386=1 -D__i386__=1' .
  		&integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
-- 
1.5.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-23 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-22 18:12 [PATCH 5/5] Add cygwin support to cgcc Ramsay Jones
2007-05-23 17:41 ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).