On 01/29/2012 12:39 PM, Pete Batard wrote:
> Two additional patches that modify the ISO9660 and UDF headers for MSVC
> usage.
> 
> The most controversial has to be the ISO9660 as MSVC simply cannot use a
> zero sized array, even at the end of a struct, if that struct is going
> to be included in the middle of another.
> 
> Therefore, instead of defining:
> 
>      iso711_t filename_len;
>      char     filename[];
> 
> We leverage the fact that iso711_t and char are the same size and the
> following union:
> 
> union {
>      iso711_t        len;
>      char            str[1];
> } filename;

Pete,

A flashback from my Windows NT driver writing days:  I seem to recall
that MSVC will allow "char str[0]" here.  You can have a zero-length
array at the end of a structure as long as the size is explicitly zero.
 It's just done with "str[0]" instead of "str[]"?

Rob

Reply via email to