about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authoriancormac84 <wilnathan@gmail.com>2014-04-16 15:43:17 -0400
committeriancormac84 <wilnathan@gmail.com>2014-04-16 15:43:17 -0400
commitfc4c6ee462943fb7c8da76ac3ab648458a1a5b66 (patch)
treef9a64423d0d2d3afd61452b408e5b6ccc494f0b8 /src
parentbfaf171c6dff38faecf4de29abcedc6a128c4cec (diff)
downloadrust-fc4c6ee462943fb7c8da76ac3ab648458a1a5b66.tar.gz
rust-fc4c6ee462943fb7c8da76ac3ab648458a1a5b66.zip
This is a Windows specific fix in libc. According to MSDN, the GUID
structure's Data2 and Data3 members expect WORD types instead of DWORD. I
discovered this discrepancy while experimenting with some bindings to
Microsoft's OLE2 api. The discrepancy was corrupting the contents of the
string returned by UuidToString after I used known GUIDs to test the
accuracy of the function binding. I didn't add test cases because it would
mean adding a dependency to my rather incomplete binding library. However,
the fix produces expected string values when tested.
Diffstat (limited to 'src')
-rw-r--r--src/liblibc/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index f25734e1e21..4ec41e9488a 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -1221,8 +1221,8 @@ pub mod types {
 
                 pub struct GUID {
                     pub Data1: DWORD,
-                    pub Data2: DWORD,
-                    pub Data3: DWORD,
+                    pub Data2: WORD,
+                    pub Data3: WORD,
                     pub Data4: [BYTE, ..8],
                 }