puppetlabs/puppet — pull request #2691 by Iristyle (2014-05-23 18:36:11+00:00)
Title: (PUP-2382) FFI typedef for win32_bool / fix User

- Previously check_token_membership was failing in 2003 spec tests
due to 2 issues
- FFI::Pointer::NULL cannot be used in place of our :handle typedef,
and therefore we must add a new constant of 0 to be used for NULL
handles
- FFI defines a :bool as variable width "(?? 1 byte in C++)", while
Win32 defines a BOOL as int, and is fixed to 4 bytes on x86 and x64
- Fortunately the bool issue really only bit us in the one spot where
we were using a pointer to a bool, but by adding a new typedef for
:win32_bool, all call sites comparing the return value needed to be
updated for correctness to compare against FFI::WIN32_FALSE
- A test was added to ensure these APIs are called during spec tests
on all Windows platforms, and not just 2003