[PATCH 4/6] include: Added definitions used by OpenFileById. (try 2)

Vincas Miliūnas vincas.miliunas at gmail.com
Thu Oct 11 11:20:00 CDT 2012


On 10/11/2012 04:30 AM, Dmitry Timoshkov wrote:
> "Vincas Miliūnas" <vincas.miliunas at gmail.com> wrote:
>
>> * Renamed DUMMYUNIONNAME to u.
> ...
>> +typedef struct _FILE_ID_DESCRIPTOR {
>> +    DWORD        dwSize;
>> +    FILE_ID_TYPE Type;
>> +    union {
>> +        LARGE_INTEGER FileId;
>> +        GUID          ObjectId;
>> +    } u;
>> +} FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
> This change is clearly wrong.
>
As far as I know WINE does not use anonymous unions to preserve
compatibility with compilers that do not support them. For the unions
that need to be accessed in the code, letter u is used to name them. git
grep '\.u\.' | wc -l returns 2523 lines of such usage to access union
members.

Of course the union can be removed and replaced by a single FileId
field. Also an issue might be that WinBase.h does not follow the
standard practice and defines struct FILE_ID_DESCRIPTOR instead of the
struct _FILE_ID_DESCRIPTOR like I submitted.

Unless you mind sharing why it is wrong, I will not be able to read your
mind.

Thanks for feedback.



More information about the wine-devel mailing list