VirtualBox

Changeset 84509 in vbox for trunk/include/iprt/formats


Ignore:
Timestamp:
May 25, 2020 3:09:24 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138238
Message:

iprt/cdefs.h,*: Introducing RT_FLEXIBLE_ARRAY_EXTENSION as a g++ hack that allows us to use RT_FLEXIBLE_ARRAY without the compiler going all pendantic on us. Only tested with 10.1.0. bugref:9746

Location:
trunk/include/iprt/formats
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/iso9660.h

    r82968 r84509  
    239239    uint16_t            idParentRec;
    240240    /** 0x08: Directory identifier (d-characters or d1-characters). */
     241    RT_FLEXIBLE_ARRAY_EXTENSION
    241242    char                achDirId[RT_FLEXIBLE_ARRAY];
    242243    /* There will be a zero padding byte following if the directory identifier length is odd. */
     
    291292    ISO9660U16          cbAppUse;
    292293    /** 0x0fa: Variable sized application use field. */
     294    RT_FLEXIBLE_ARRAY_EXTENSION
    293295    uint8_t             abAppUse[RT_FLEXIBLE_ARRAY];
    294296    /* This is followed by escape sequences with length given by cbEscapeSequnces. */
  • trunk/include/iprt/formats/mach-o.h

    r82968 r84509  
    632632    uint32_t            sdk;        /**< SDK version:        31..16=major, 15..8=minor, 7..0=patch */
    633633    uint32_t            ntools;     /**< Number of build_tool_version entries following in aTools. */
     634    RT_FLEXIBLE_ARRAY_EXTENSION
    634635    build_tool_version_t aTools[RT_FLEXIBLE_ARRAY];
    635636} build_version_command_t;
  • trunk/include/iprt/formats/ntfs.h

    r82968 r84509  
    381381    uint16_t            idAttrib;
    382382    /** 0x1a: Maybe where the attribute name starts. */
     383    RT_FLEXIBLE_ARRAY_EXTENSION
    383384    RTUTF16             wszName[RT_FLEXIBLE_ARRAY];
    384385} NTFSATLISTENTRY;
     
    499500    uint8_t             fFilenameType;
    500501    /** 0x42: The filename. */
     502    RT_FLEXIBLE_ARRAY_EXTENSION
    501503    RTUTF16             wszFilename[RT_FLEXIBLE_ARRAY];
    502504} NTFSATFILENAME;
  • trunk/include/iprt/formats/pecoff.h

    r84361 r84509  
    721721    RT_GCC_EXTENSION uint8_t    FrameOffset : 4;
    722722    /** Unwind opcodes. */
    723     IMAGE_UNWIND_CODE   aOpcodes[RT_FLEXIBLE_ARRAY];
     723    RT_FLEXIBLE_ARRAY_EXTENSION
     724    IMAGE_UNWIND_CODE           aOpcodes[RT_FLEXIBLE_ARRAY];
    724725} IMAGE_UNWIND_INFO;
    725726AssertCompileMemberOffset(IMAGE_UNWIND_INFO, aOpcodes, 4);
  • trunk/include/iprt/formats/udf.h

    r82968 r84509  
    792792    /** 0x1b8: Partition maps (length given by @a cbMapTable), data format is
    793793     * defined by UDFPARTMAPHDR, UDFPARTMAPTYPE1 and UDFPARTMAPTYPE2. */
     794    RT_FLEXIBLE_ARRAY_EXTENSION
    794795    uint8_t         abPartitionMaps[RT_FLEXIBLE_ARRAY];
    795796} UDFLOGICALVOLUMEDESC;
     
    925926    uint32_t        cAllocationDescriptors;
    926927    /** 0x18: Allocation descriptors (variable length). */
     928    RT_FLEXIBLE_ARRAY_EXTENSION
    927929    UDFEXTENTAD     aAllocationDescriptors[RT_FLEXIBLE_ARRAY];
    928930} UDFUNALLOCATEDSPACEDESC;
     
    975977     * the implementation to use.
    976978     */
     979    RT_FLEXIBLE_ARRAY_EXTENSION
    977980    uint32_t        aTables[RT_FLEXIBLE_ARRAY];
    978981} UDFLOGICALVOLINTEGRITYDESC;
     
    10751078     * After that is a d-string field with the name of the file, length
    10761079     * specified by @a cbName. */
     1080    RT_FLEXIBLE_ARRAY_EXTENSION
    10771081    uint8_t         abImplementationUse[RT_FLEXIBLE_ARRAY];
    10781082} UDFFILEIDDESC;
     
    13581362    /** 0xb0: Two variable sized fields.  First @a cbExtAttribs bytes of extended
    13591363     *  attributes, then @a cbAllocDescs bytes of allocation descriptors. */
     1364    RT_FLEXIBLE_ARRAY_EXTENSION
    13601365    uint8_t         abExtAttribs[RT_FLEXIBLE_ARRAY];
    13611366} UDFFILEENTRY;
     
    19711976    uint32_t        cbBitmap;
    19721977    /** 0x18: The bitmap. */
     1978    RT_FLEXIBLE_ARRAY_EXTENSION
    19731979    uint8_t         abBitmap[RT_FLEXIBLE_ARRAY];
    19741980} UDFSPACEBITMAPDESC;
     
    20002006    UDFENTITYID     idImplementation;
    20012007    /** 0x100: Implementation use data. */
     2008    RT_FLEXIBLE_ARRAY_EXTENSION
    20022009    uint8_t         abImplementationUse[RT_FLEXIBLE_ARRAY];
    20032010} UDFPARTITIONINTEGRITYDESC;
     
    20672074    /** 0xd8: Two variable sized fields.  First @a cbExtAttribs bytes of extended
    20682075     *  attributes, then @a cbAllocDescs bytes of allocation descriptors. */
     2076    RT_FLEXIBLE_ARRAY_EXTENSION
    20692077    uint8_t         abExtAttribs[RT_FLEXIBLE_ARRAY];
    20702078} UDFEXFILEENTRY;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette