VirtualBox

Ignore:
Timestamp:
Jul 12, 2018 9:06:33 PM (7 years ago)
Author:
vboxsync
Message:

*: Made RT_UOFFSETOF, RT_OFFSETOF, RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD work like builtin_offsetof() and require compile time resolvable requests, adding RT_UOFFSETOF_DYN for the dynamic questions that can only be answered at runtime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dvm/dvmvfs.cpp

    r69977 r73097  
    472472    { /* ObjSet */
    473473        RTVFSOBJSETOPS_VERSION,
    474         RT_OFFSETOF(RTVFSFILEOPS, Stream.Obj) - RT_OFFSETOF(RTVFSFILEOPS, ObjSet),
     474        RT_UOFFSETOF(RTVFSFILEOPS, ObjSet) - RT_UOFFSETOF(RTVFSFILEOPS, Stream.Obj),
    475475        rtDvmVfsFile_SetMode,
    476476        rtDvmVfsFile_SetTimes,
     
    921921
    922922        size_t cchVolName = strlen(pszVolName);
    923         size_t cbNeeded   = RT_OFFSETOF(RTDIRENTRYEX,  szName[cchVolName + 1]);
     923        size_t cbNeeded   = RT_UOFFSETOF_DYN(RTDIRENTRYEX,  szName[cchVolName + 1]);
    924924        if (cbNeeded <= *pcbDirEntry)
    925925        {
     
    982982    { /* ObjSet */
    983983        RTVFSOBJSETOPS_VERSION,
    984         RT_OFFSETOF(RTVFSDIROPS, Obj) - RT_OFFSETOF(RTVFSDIROPS, ObjSet),
     984        RT_UOFFSETOF(RTVFSDIROPS, ObjSet) - RT_UOFFSETOF(RTVFSDIROPS, Obj),
    985985        rtDvmVfsDir_SetMode,
    986986        rtDvmVfsDir_SetTimes,
Note: See TracChangeset for help on using the changeset viewer.

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