OSDN Git Service

Changes for WSL-4.0 based on Issues being closed.
authorEarnie Boyd <earnie@users.sourceforge.net>
Fri, 22 Feb 2013 16:02:46 +0000 (11:02 -0500)
committerEarnie Boyd <earnie@users.sourceforge.net>
Fri, 22 Feb 2013 16:02:46 +0000 (11:02 -0500)
* include/float.h (_MCW_DN, _DN_SAVE, _DN_FLUSH): Add definitions.
* include/winuser.h (POINTTOPOINTS, POINTSTOPOINT): Adjust parameters
with type specificity.
* include/windef.h(MAKEWORD, MAKELONG, LOWORD, HIWORD, LOBYTE, HIBYTE):
Ditto. Also use DWORD_PTR instead of DWORD.
* include/winuser.h (POINTTOPOINTS): Remove the cast to POINTS struct.
* include/winreg.h (reason.h): Include.

ChangeLog
include/float.h
include/windef.h
include/winreg.h
include/winuser.h

index b4a0807..23859ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2013-02-22  Earnie Boyd  <earnie@users.sourceforge.net>
 
+       * include/float.h (_MCW_DN, _DN_SAVE, _DN_FLUSH): Add definitions.
+       * include/winuser.h (POINTTOPOINTS, POINTSTOPOINT): Adjust parameters
+       with type specificity.
+       * include/windef.h(MAKEWORD, MAKELONG, LOWORD, HIWORD, LOBYTE, HIBYTE):
+       Ditto. Also use DWORD_PTR instead of DWORD.
+       * include/winuser.h (POINTTOPOINTS): Remove the cast to POINTS struct.
+       * include/winreg.h (reason.h): Include.
+
+2013-02-21  Earnie Boyd  <earnie@users.sourceforge.net>
+
        * include/oleauto.h (RegisterTypeLibForUser, UnRegisterTypeLibForUser):
        Add declarations.
        * lib/lib32/oleaut32.def: Ditto.
index c5be18b..dc1ab87 100644 (file)
 #define        _MCW_IC         0x00040000      /* Infinity */
 #define        _MCW_RC         0x00000300      /* Rounding */
 #define        _MCW_PC         0x00030000      /* Precision */
+#define _MCW_DN                0x03000000      /* Denormal */
 
 /* Control word values for unNew (use with related unMask above) */
+#define _DN_SAVE       0x00000000
+#define _DN_FLUSH      0x01000000
 #define        _EM_INVALID     0x00000010
 #define        _EM_DENORMAL    0x00080000
 #define        _EM_ZERODIVIDE  0x00000008
index fb6e6a5..5b980ff 100644 (file)
@@ -118,12 +118,12 @@ extern "C" {
 #define DECLSPEC_NORETURN __declspec(noreturn)
 #define DECLARE_STDCALL_P( type ) __stdcall type
 
-#define MAKEWORD(a,b)  ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
-#define MAKELONG(a,b)  ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
-#define LOWORD(l)      ((WORD)((DWORD)(l)))
-#define HIWORD(l)      ((WORD)(((DWORD)(l)>>16)&0xFFFF))
-#define LOBYTE(w)      ((BYTE)(w))
-#define HIBYTE(w)      ((BYTE)(((WORD)(w)>>8)&0xFF))
+#define MAKEWORD(a,b)  ((WORD)(((BYTE)(((DWORD_PTR)(a))&0xFF))|(((WORD)((BYTE)(((DWORD_PTR)(b))&0xFF)))<<8)))
+#define MAKELONG(a,b)  ((LONG)(((WORD)(((DWORD_PTR)(a))&0xFFFF))|(((DWORD)((WORD)(((DWORD_PTR)(b))&0xFFFF)))<<16)))
+#define LOWORD(l)      ((WORD)(((DWORD_PTR)(l))&0xFFFF))
+#define HIWORD(l)      ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))
+#define LOBYTE(w)      ((BYTE)(((DWORD_PTR)(w))&0xFF))
+#define HIBYTE(w)      ((BYTE)((((DWORD_PTR)(w))>>8)&0xFF))
 
 #ifndef _export
 #define _export
index 73c2dab..1a42a4d 100644 (file)
@@ -34,6 +34,8 @@
 extern "C" {
 #endif
 
+#include <reason.h>
+
 #define HKEY_CLASSES_ROOT      ((HKEY)0x80000000)
 #define HKEY_CURRENT_USER      ((HKEY)0x80000001)
 #define HKEY_LOCAL_MACHINE     ((HKEY)0x80000002)
index 3947813..eb9300b 100644 (file)
@@ -2907,10 +2907,16 @@ typedef struct tagINPUT {
 #define MAKEWPARAM(l,h) ((WPARAM)MAKELONG(l,h))
 #define MAKELRESULT(l,h) ((LRESULT)MAKELONG(l,h))
 #define POINTSTOPOINT(p,ps) { \
-  (p).x=LOWORD(*(DWORD *)&ps); \
-  (p).y=HIWORD(*(DWORD *)&ps); \
+  (p).x=(LONG)(SHORT)LOWORD(*(LONG*)&ps); \
+  (p).y=(LONG)(SHORT)HIWORD(*(LONG*)&ps); \
 }
-#define POINTTOPOINTS(p) ((POINTS)MAKELONG((p).x,(p).y))
+/* NOTE: MSDN states POINTTOPOINTS returns the POINTS structure but usage
+ * proves otherswise.  Removing the cast allows the user the choice to cast
+ * the result to the POINTS structure themselves or use the long that is
+ * returned instead.  See Issues ticket #1402 for discussion.
+#define POINTTOPOINTS(p) ((POINTS)MAKELONG((short)(p).x,(short)(p).y))
+ */
+#define POINTTOPOINTS(p) (MAKELONG((short)(p).x,(short)(p).y))
        
 #ifndef _LPCGUID_DEFINED
 #define _LPCGUID_DEFINED