[PATCH] Add missing fastcall definitions to w32api

Casper Hornstrup <[email protected]>
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <[email protected]>
I'm not sure if some or all of these fastcall defines are in the
spec files, but they are, why is the eqvivalent stdcall defines here?


2002-06-15  Casper S. Hornstrup  <[email protected]>

	* include/windef.h (_fastcall, __fastcall, FASTCALL): Add defines.
	(SLOWORD, SHIWORD): Add macros.


Index: include/windef.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/windef.h,v
retrieving revision 1.6
diff -b -u -r1.6 windef.h
--- include/windef.h	14 Jun 2002 11:44:47 -0000	1.6
+++ include/windef.h	15 Jun 2002 12:31:26 -0000
@@ -51,6 +51,12 @@
 
 #ifdef __GNUC__
 #define PACKED __attribute__((packed))
+#ifndef _fastcall
+#define _fastcall __attribute__((fastcall))
+#endif
+#ifndef __fastcall
+#define __fastcall __attribute__((fastcall))
+#endif
 #ifndef _stdcall
 #define _stdcall __attribute__((stdcall))
 #endif
@@ -84,6 +90,7 @@
 #define PASCAL _pascal
 #define CDECL _cdecl
 #define STDCALL __stdcall
+#define FASTCALL __fastcall
 #define WINAPI __stdcall
 #define WINAPIV __cdecl
 #define APIENTRY __stdcall
@@ -101,6 +108,8 @@
 #endif /* __GNUC__/__WATCOMC__ */
 #define MAKEWORD(a,b)	((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
 #define MAKELONG(a,b)	((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
+#define SLOWORD(l) ((SHORT)((LONG)(l)))
+#define SHIWORD(l) ((SHORT)(((LONG)(l)>>16)&0xFFFF))
 #define LOWORD(l)	((WORD)((DWORD)(l)))
 #define HIWORD(l)	((WORD)(((DWORD)(l)>>16)&0xFFFF))
 #define LOBYTE(w)	((BYTE)(w))


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.