wtypes.h

"Martin Fuchs" <[email protected]> Mon, 01 Mar 2004 23:18:05 +0100
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <[email protected]>
Changelog:
* include/wtypes.h (DEC_...): define macros for accessing DECIMAL structure
* include/wtypes.h (DECIMAL_SETZERO): use DEC_... macros in DECIMAL_SETZERO macro to be compiler independed


Index: wtypes.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/wtypes.h,v
retrieving revision 1.13
diff -u -p -d -r1.13 wtypes.h
--- wtypes.h	1 Mar 2004 10:09:42 -0000	1.13
+++ wtypes.h	1 Mar 2004 22:15:20 -0000
@@ -11,11 +11,19 @@
 extern "C" {
 #endif
 
+#define DEC_SIGN(d) ((d)->u.s.sign)
+#define DEC_SCALE(d) ((d)->u.s.scale)
+#define DEC_SIGNSCALE(d) ((d)->u.signscale)
+#define DEC_HI32(d) ((d)->Hi32)
+#define DEC_MID32(d) ((d)->DUMMYUNIONNAME2.DUMMYSTRUCTNAME2.Mid32)
+#define DEC_LO32(d) ((d)->DUMMYUNIONNAME2.DUMMYSTRUCTNAME2.Lo32)
+#define DEC_LO64(d) ((d)->DUMMYUNIONNAME2.Lo64)
+
 #define IID_NULL GUID_NULL
 #define CLSID_NULL GUID_NULL
 #define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt))
 #define DECIMAL_NEG ((BYTE)0x80)
-#define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=(d).signscale=0;}
+#define DECIMAL_SETZERO(d) {DEC_LO64(d)=DEC_HI32(d)=DEC_SIGNSCALE(d)=0;}
 #define ROTFLAGS_REGISTRATIONKEEPSALIVE	0x01
 #define ROTFLAGS_ALLOWANYCLIENT		0x02
 



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click