rpcrt4: A signed 1-bit bitfield doesn't make much sense; use unsigned.

Paul Vriens paul.vriens.wine at gmail.com
Thu Oct 8 10:11:56 CDT 2009


On 10/08/2009 11:22 AM, Francois Gouget wrote:
> ---
>
> While signed 1-bit bitfields don't make much sense, that's how they are
> defined in the PSDK. So maybe we want to stick with the signed
> definition anyway. If not then we can apply this patch.
>
> As far as I can tell this is the only place left where we have signed
> 1-bit bitfields.
>
>   include/rpcndr.h |   26 +++++++++++++-------------
>   1 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/include/rpcndr.h b/include/rpcndr.h
> index 8fee143..81baa87 100644
> --- a/include/rpcndr.h
> +++ b/include/rpcndr.h
> @@ -204,19 +204,19 @@ typedef struct _MIDL_STUB_MESSAGE
>     struct _FULL_PTR_XLAT_TABLES *FullPtrXlatTables;
>     ULONG FullPtrRefId;
>     ULONG PointerLength;
> -  int fInDontFree:1;
> -  int fDontCallFreeInst:1;
> -  int fInOnlyParam:1;
> -  int fHasReturn:1;
> -  int fHasExtensions:1;
> -  int fHasNewCorrDesc:1;
> -  int fIsIn:1;
> -  int fIsOut:1;
> -  int fIsOicf:1;
> -  int fBufferValid:1;
> -  int fHasMemoryValidateCallback:1;
> -  int fInFree:1;
> -  int fNeedMCCP:1;
> +  unsigned int fInDontFree:1;
> +  unsigned int fDontCallFreeInst:1;
> +  unsigned int fInOnlyParam:1;
> +  unsigned int fHasReturn:1;
> +  unsigned int fHasExtensions:1;
> +  unsigned int fHasNewCorrDesc:1;
> +  unsigned int fIsIn:1;
> +  unsigned int fIsOut:1;
> +  unsigned int fIsOicf:1;
> +  unsigned int fBufferValid:1;
> +  unsigned int fHasMemoryValidateCallback:1;
> +  unsigned int fInFree:1;
> +  unsigned int fNeedMCCP:1;
>     int fUnused:3;
>     int fUnused2:16;
>     DWORD dwDestContext;

Hi Francois,

This one introduces some test failures:

http://test.winehq.org/data/d62d442d6d2fbb4a892f2448830aaabcda449b17/

The tests rely on the signedness so it seems.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list