Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full set of struct tests + changes to make them pass #607

Merged
merged 10 commits into from
Jun 3, 2018

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Apr 22, 2018

Issue #442.

Fix summary:

  • ntddscsi had some of the structs put behind an IFDEF to match the sdk header.
  • Quite a few zero sized arrays were changed to one to match the sdk headers. They weren't really wrong, but the tests on them fail otherwise.
  • Quite a few struct were not packed when they should have been.
  • A few structs were changed to contain pointers instead of the pointee type.
  • A couple of BOOL and BOOLEAN mixups.
  • A few structs were changed to unions.
  • Some unions had the wrong storage type.
  • Some missing fields were added.

One unresolved issue is SPPHRASE in sapi. The C and C++ definitions differ from each other and I'm unsure as to which is the correct definition. The C++ definition uses base classes which add padding the C definition does not.

Would you like the C code used to generate the tests added in as well?

Copy link
Owner

@retep998 retep998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting all the work into this PR. Just watch out for those spaces.

nFromPage: DWORD,
nToPage: DWORD,
}}
pub type LPPRINTPAGERANGE = *mut PRINTPAGERANGE;
pub type PCPRINTPAGERANGE = *const PRINTPAGERANGE;
STRUCT!{struct PRINTDLGEXA {
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct PRINTDLGEXA {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these... double spaces I see? You monster!

@@ -32,25 +32,25 @@ pub const MAX_SERVICE_NAME_LEN: usize = 256;
pub const MAX_SUBTITLE_LEN: usize = 256;
pub const SP_MAX_MACHINENAME_LENGTH: usize = MAX_PATH + 3;
pub type HINF = PVOID;
STRUCT!{struct INFCONTEXT {
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct INFCONTEXT {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And even more of those double spaces!

@retep998 retep998 merged commit 3049a3b into retep998:0.3 Jun 3, 2018
ehuss added a commit to ehuss/atty that referenced this pull request Jul 14, 2018
Ever since winapi version 0.3.5, tty detection for msys terminals has been
broken.  The definition for FILE_NAME_INFO struct changed in
retep998/winapi-rs#607, causing the first character from the filename to be cut
off.
ehuss added a commit to ehuss/atty that referenced this pull request Jul 15, 2018
Ever since winapi version 0.3.5, tty detection for msys terminals has been
broken.  The definition for FILE_NAME_INFO struct changed in
retep998/winapi-rs#607, causing the first character from the filename to be cut
off.
mattlknight pushed a commit to mattlknight/winapi-rs that referenced this pull request Aug 31, 2018
* Add full set of struct tests + changes to make them pass

* Update tests + fixes

* Update struct tests

* Update tests + fixes

* Update tests + changes

* Fix double spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants