Index: trunk/src/VBox/Runtime/common/fs/RTFsCmdLs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/RTFsCmdLs.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/RTFsCmdLs.cpp	(revision 73097)
@@ -782,8 +782,8 @@
     {
         default: AssertFailed(); RT_FALL_THRU();
-        case RTCMDLSTIME_MTIME: offTime = RT_OFFSETOF(RTCMDLSENTRY, Info.ModificationTime); break;
-        case RTCMDLSTIME_BTIME: offTime = RT_OFFSETOF(RTCMDLSENTRY, Info.BirthTime); break;
-        case RTCMDLSTIME_CTIME: offTime = RT_OFFSETOF(RTCMDLSENTRY, Info.ChangeTime); break;
-        case RTCMDLSTIME_ATIME: offTime = RT_OFFSETOF(RTCMDLSENTRY, Info.AccessTime); break;
+        case RTCMDLSTIME_MTIME: offTime = RT_UOFFSETOF(RTCMDLSENTRY, Info.ModificationTime); break;
+        case RTCMDLSTIME_BTIME: offTime = RT_UOFFSETOF(RTCMDLSENTRY, Info.BirthTime); break;
+        case RTCMDLSTIME_CTIME: offTime = RT_UOFFSETOF(RTCMDLSENTRY, Info.ChangeTime); break;
+        case RTCMDLSTIME_ATIME: offTime = RT_UOFFSETOF(RTCMDLSENTRY, Info.AccessTime); break;
     }
 
@@ -1027,5 +1027,5 @@
             && *pszName)
         {
-            PRTCMDLSCOLLECTION pCollection = (PRTCMDLSCOLLECTION)RTMemAllocZ(RT_OFFSETOF(RTCMDLSCOLLECTION, szName[1]));
+            PRTCMDLSCOLLECTION pCollection = (PRTCMDLSCOLLECTION)RTMemAllocZ(RT_UOFFSETOF(RTCMDLSCOLLECTION, szName[1]));
             if (!pCollection)
             {
@@ -1040,5 +1040,5 @@
     /* Add new collection. */
     size_t cbName = strlen(pszName) + 1;
-    PRTCMDLSCOLLECTION pCollection = (PRTCMDLSCOLLECTION)RTMemAllocZ(RT_OFFSETOF(RTCMDLSCOLLECTION, szName[cbName]));
+    PRTCMDLSCOLLECTION pCollection = (PRTCMDLSCOLLECTION)RTMemAllocZ(RT_UOFFSETOF_DYN(RTCMDLSCOLLECTION, szName[cbName]));
     if (pCollection)
     {
@@ -1083,5 +1083,5 @@
     size_t const cbGroup  = pszGroup  ? strlen(pszGroup)  + 1 : 0;
     size_t const cbTarget = pszTarget ? strlen(pszTarget) + 1 : 0;
-    size_t const cbEntry  = RT_OFFSETOF(RTCMDLSENTRY, szName[cchEntry + 1 + cbOwner + cbGroup + cbTarget]);
+    size_t const cbEntry  = RT_UOFFSETOF_DYN(RTCMDLSENTRY, szName[cchEntry + 1 + cbOwner + cbGroup + cbTarget]);
     PRTCMDLSENTRY pEntry = (PRTCMDLSENTRY)RTMemAlloc(cbEntry);
     if (pEntry)
Index: trunk/src/VBox/Runtime/common/fs/ext2vfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/ext2vfs.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/ext2vfs.cpp	(revision 73097)
@@ -99,5 +99,5 @@
     if (!pBlkGrpDesc)
     {
-        size_t cbBlkDesc = RT_OFFSETOF(RTFILESYSTEMEXTBLKGRP, abBlockBitmap[cbBlockBitmap]);
+        size_t cbBlkDesc = RT_UOFFSETOF_DYN(RTFILESYSTEMEXTBLKGRP, abBlockBitmap[cbBlockBitmap]);
         pBlkGrpDesc = (PRTFILESYSTEMEXTBLKGRP)RTMemAllocZ(cbBlkDesc);
         if (!pBlkGrpDesc)
Index: trunk/src/VBox/Runtime/common/fs/fatvfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/fatvfs.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/fatvfs.cpp	(revision 73097)
@@ -824,5 +824,6 @@
      */
     PRTFSFATCLUSTERMAPCACHE pFatCache;
-    pThis->pFatCache = pFatCache = (PRTFSFATCLUSTERMAPCACHE)RTMemAllocZ(RT_OFFSETOF(RTFSFATCLUSTERMAPCACHE, aEntries[cEntries]));
+    pFatCache = (PRTFSFATCLUSTERMAPCACHE)RTMemAllocZ(RT_UOFFSETOF_DYN(RTFSFATCLUSTERMAPCACHE, aEntries[cEntries]));
+    pThis->pFatCache = pFatCache;
     if (!pFatCache)
         return RTErrInfoSet(pErrInfo, VERR_NO_MEMORY, "Failed to allocate FAT cache");
@@ -2571,5 +2572,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSFILEOPS, Stream.Obj) - RT_OFFSETOF(RTVFSFILEOPS, ObjSet),
+        RT_UOFFSETOF(RTVFSFILEOPS, ObjSet) - RT_UOFFSETOF(RTVFSFILEOPS, Stream.Obj),
         rtFsFatFile_SetMode,
         rtFsFatFile_SetTimes,
@@ -4412,5 +4413,5 @@
     if (pThis->offDir < 2)
     {
-        size_t cbNeeded = RT_OFFSETOF(RTDIRENTRYEX, szName[pThis->offDir + 2]);
+        size_t cbNeeded = RT_UOFFSETOF_DYN(RTDIRENTRYEX, szName[pThis->offDir + 2]);
         if (cbNeeded < *pcbDirEntry)
             *pcbDirEntry = cbNeeded;
@@ -4554,5 +4555,5 @@
                 if (!fLongName)
                     cchName = rtFsFatDir_CalcUtf8LengthForDirEntry(pShared, &paEntries[iEntry].Entry);
-                size_t cbNeeded = RT_OFFSETOF(RTDIRENTRYEX, szName[cchName + 1]);
+                size_t cbNeeded = RT_UOFFSETOF_DYN(RTDIRENTRYEX, szName[cchName + 1]);
                 if (cbNeeded <= *pcbDirEntry)
                     *pcbDirEntry = cbNeeded;
@@ -4626,5 +4627,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSDIROPS, Obj) - RT_OFFSETOF(RTVFSDIROPS, ObjSet),
+        RT_UOFFSETOF(RTVFSDIROPS, ObjSet) - RT_UOFFSETOF(RTVFSDIROPS, Obj),
         rtFsFatDir_SetMode,
         rtFsFatDir_SetTimes,
@@ -5031,5 +5032,5 @@
     Assert(offFirstZero >= RT_UOFFSETOF(FATBOOTSECTOR, Bpb));
     uint32_t const cbZeroPad    = RT_MIN(offJump - offFirstZero,
-                                         sizeof(pBootSector->Bpb.Bpb20) - (offFirstZero - RT_OFFSETOF(FATBOOTSECTOR, Bpb)));
+                                         sizeof(pBootSector->Bpb.Bpb20) - (offFirstZero - RT_UOFFSETOF(FATBOOTSECTOR, Bpb)));
 
     if (!ASMMemIsAllU8((uint8_t const *)pBootSector + offFirstZero, cbZeroPad, 0))
@@ -5387,5 +5388,5 @@
              && pBootSector->abJmp[2] <= 0x7f)
         offJmp = RT_MIN(127, RT_MAKE_U16(pBootSector->abJmp[1], pBootSector->abJmp[2]));
-    uint8_t const cbMaxBpb = offJmp - RT_OFFSETOF(FATBOOTSECTOR, Bpb);
+    uint8_t const cbMaxBpb = offJmp - RT_UOFFSETOF(FATBOOTSECTOR, Bpb);
 
     /*
@@ -5444,5 +5445,5 @@
     if (   (   sizeof(FAT32EBPB) <= cbMaxBpb
             && pBootSector->Bpb.Fat32Ebpb.bExtSignature == FATEBPB_SIGNATURE)
-        || (   RT_OFFSETOF(FAT32EBPB, achLabel) <= cbMaxBpb
+        || (   RT_UOFFSETOF(FAT32EBPB, achLabel) <= cbMaxBpb
             && pBootSector->Bpb.Fat32Ebpb.bExtSignature == FATEBPB_SIGNATURE_OLD) )
     {
@@ -5460,5 +5461,5 @@
         if (   (   sizeof(FATEBPB) <= cbMaxBpb
                 && pBootSector->Bpb.Ebpb.bExtSignature == FATEBPB_SIGNATURE)
-            || (   RT_OFFSETOF(FATEBPB, achLabel) <= cbMaxBpb
+            || (   RT_UOFFSETOF(FATEBPB, achLabel) <= cbMaxBpb
                 && pBootSector->Bpb.Ebpb.bExtSignature == FATEBPB_SIGNATURE_OLD) )
         {
Index: trunk/src/VBox/Runtime/common/fs/isomaker.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/isomaker.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/isomaker.cpp	(revision 73097)
@@ -99,5 +99,5 @@
  *        is the case in rtFsIsoMakerNormalizeNameForNamespace. */
 #define RTFSISOMAKER_CALC_PATHREC_SIZE(a_cbNameInDirRec) \
-    ( RT_UOFFSETOF(ISO9660PATHREC, achDirId[(a_cbNameInDirRec) + ((a_cbNameInDirRec) & 1)]) )
+    ( RT_UOFFSETOF_DYN(ISO9660PATHREC, achDirId[(a_cbNameInDirRec) + ((a_cbNameInDirRec) & 1)]) )
 
 
@@ -660,8 +660,8 @@
 } g_aRTFsIsoNamespaces[] =
 {
-    {   RTFSISOMAKER_NAMESPACE_ISO_9660, RT_OFFSETOF(RTFSISOMAKERINT, PrimaryIso), RT_OFFSETOF(RTFSISOMAKEROBJ, pPrimaryName), "iso-9660" },
-    {   RTFSISOMAKER_NAMESPACE_JOLIET,   RT_OFFSETOF(RTFSISOMAKERINT, Joliet),     RT_OFFSETOF(RTFSISOMAKEROBJ, pJolietName),  "joliet" },
-    {   RTFSISOMAKER_NAMESPACE_UDF,      RT_OFFSETOF(RTFSISOMAKERINT, Udf),        RT_OFFSETOF(RTFSISOMAKEROBJ, pUdfName),     "udf" },
-    {   RTFSISOMAKER_NAMESPACE_HFS,      RT_OFFSETOF(RTFSISOMAKERINT, Hfs),        RT_OFFSETOF(RTFSISOMAKEROBJ, pHfsName),     "hfs" },
+    {   RTFSISOMAKER_NAMESPACE_ISO_9660, RT_UOFFSETOF(RTFSISOMAKERINT, PrimaryIso), RT_UOFFSETOF(RTFSISOMAKEROBJ, pPrimaryName), "iso-9660" },
+    {   RTFSISOMAKER_NAMESPACE_JOLIET,   RT_UOFFSETOF(RTFSISOMAKERINT, Joliet),     RT_UOFFSETOF(RTFSISOMAKEROBJ, pJolietName),  "joliet" },
+    {   RTFSISOMAKER_NAMESPACE_UDF,      RT_UOFFSETOF(RTFSISOMAKERINT, Udf),        RT_UOFFSETOF(RTFSISOMAKEROBJ, pUdfName),     "udf" },
+    {   RTFSISOMAKER_NAMESPACE_HFS,      RT_UOFFSETOF(RTFSISOMAKERINT, Hfs),        RT_UOFFSETOF(RTFSISOMAKEROBJ, pHfsName),     "hfs" },
 };
 
@@ -3611,5 +3611,5 @@
      * Do the adding.
      */
-    PRTFSISOMAKERSYMLINK pSymlink = (PRTFSISOMAKERSYMLINK)RTMemAllocZ(RT_UOFFSETOF(RTFSISOMAKERSYMLINK, szTarget[cchTarget + 1]));
+    PRTFSISOMAKERSYMLINK pSymlink = (PRTFSISOMAKERSYMLINK)RTMemAllocZ(RT_UOFFSETOF_DYN(RTFSISOMAKERSYMLINK, szTarget[cchTarget + 1]));
     AssertReturn(pSymlink, VERR_NO_MEMORY);
     int rc = rtFsIsoMakerInitCommonObj(pThis, &pSymlink->Core, RTFSISOMAKEROBJTYPE_SYMLINK, pObjInfo);
@@ -5882,5 +5882,5 @@
                 size_t         cchThis = RT_MIN(cchSrc, ISO9660RRIPNM_MAX_NAME_LEN);
                 PISO9660RRIPNM pNM     = (PISO9660RRIPNM)pbSys;
-                Assert(cbSys >= RT_UOFFSETOF(ISO9660RRIPNM, achName[cchThis]));
+                Assert(cbSys >= RT_UOFFSETOF_DYN(ISO9660RRIPNM, achName[cchThis]));
                 pNM->Hdr.bSig1      = ISO9660RRIPNM_SIG1;
                 pNM->Hdr.bSig2      = ISO9660RRIPNM_SIG2;
@@ -7379,5 +7379,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSFILEOPS, Stream.Obj) - RT_OFFSETOF(RTVFSFILEOPS, ObjSet),
+        RT_UOFFSETOF(RTVFSFILEOPS, ObjSet) - RT_UOFFSETOF(RTVFSFILEOPS, Stream.Obj),
         NULL /*SetMode*/,
         NULL /*SetTimes*/,
Index: trunk/src/VBox/Runtime/common/fs/isomakerimport.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/isomakerimport.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/isomakerimport.cpp	(revision 73097)
@@ -732,9 +732,9 @@
                     || pUnion->SP.bCheck1   != ISO9660SUSPSP_CHECK1
                     || pUnion->SP.bCheck2   != ISO9660SUSPSP_CHECK2
-                    || pUnion->SP.cbSkip > UINT8_MAX - RT_OFFSETOF(ISO9660DIRREC, achFileId[1]))
+                    || pUnion->SP.cbSkip > UINT8_MAX - RT_UOFFSETOF(ISO9660DIRREC, achFileId[1]))
                     LogRel(("rtFsIsoImport/Rock: Malformed 'SP' entry: cbEntry=%#x (vs %#x), bVersion=%#x (vs %#x), bCheck1=%#x (vs %#x), bCheck2=%#x (vs %#x), cbSkip=%#x (vs max %#x)\n",
                             pUnion->Hdr.cbEntry, ISO9660SUSPSP_LEN, pUnion->Hdr.bVersion, ISO9660SUSPSP_VER,
                             pUnion->SP.bCheck1, ISO9660SUSPSP_CHECK1, pUnion->SP.bCheck2, ISO9660SUSPSP_CHECK2,
-                            pUnion->SP.cbSkip, UINT8_MAX - RT_OFFSETOF(ISO9660DIRREC, achFileId[1]) ));
+                            pUnion->SP.cbSkip, UINT8_MAX - RT_UOFFSETOF(ISO9660DIRREC, achFileId[1]) ));
                 else if (!fIsFirstDirRec)
                     LogRel(("rtFsIsoImport/Rock: Ignorining 'SP' entry in non-root directory record\n"));
@@ -750,5 +750,5 @@
 
             case MAKE_SIG(ISO9660SUSPER_SIG1, ISO9660SUSPER_SIG2): /* ER */
-                if (   pUnion->Hdr.cbEntry >   RT_OFFSETOF(ISO9660SUSPER, achPayload) + (uint32_t)pUnion->ER.cchIdentifier
+                if (   pUnion->Hdr.cbEntry >   RT_UOFFSETOF(ISO9660SUSPER, achPayload) + (uint32_t)pUnion->ER.cchIdentifier
                                              + (uint32_t)pUnion->ER.cchDescription   + (uint32_t)pUnion->ER.cchSource
                     || pUnion->Hdr.bVersion != ISO9660SUSPER_VER)
@@ -914,9 +914,9 @@
             case MAKE_SIG(ISO9660RRIPSL_SIG1, ISO9660RRIPSL_SIG2): /* SL */
                 if (   pUnion->SL.Hdr.bVersion != ISO9660RRIPSL_VER
-                    || pUnion->SL.Hdr.cbEntry < RT_OFFSETOF(ISO9660RRIPSL, abComponents[2])
+                    || pUnion->SL.Hdr.cbEntry < RT_UOFFSETOF(ISO9660RRIPSL, abComponents[2])
                     || (pUnion->SL.fFlags & ~ISO9660RRIP_SL_F_CONTINUE)
                     || (pUnion->SL.abComponents[0] & ISO9660RRIP_SL_C_RESERVED_MASK) )
                     LogRel(("rtFsIsoImport/Rock: Malformed 'SL' entry: cbEntry=%#x (vs %#x), bVersion=%#x (vs %#x) fFlags=%#x comp[0].fFlags=%#x\n",
-                            pUnion->SL.Hdr.cbEntry, RT_OFFSETOF(ISO9660RRIPSL, abComponents[2]),
+                            pUnion->SL.Hdr.cbEntry, RT_UOFFSETOF(ISO9660RRIPSL, abComponents[2]),
                             pUnion->SL.Hdr.bVersion, ISO9660RRIPSL_VER, pUnion->SL.fFlags, pUnion->SL.abComponents[0]));
                 else if (pThis->fSeenLastSL)
@@ -928,5 +928,5 @@
                     size_t         offDst    = strlen(pThis->szRockSymlinkTargetBuf);
                     uint8_t const *pbSrc     = &pUnion->SL.abComponents[0];
-                    uint8_t        cbSrcLeft = pUnion->SL.Hdr.cbEntry - RT_OFFSETOF(ISO9660RRIPSL, abComponents);
+                    uint8_t        cbSrcLeft = pUnion->SL.Hdr.cbEntry - RT_UOFFSETOF(ISO9660RRIPSL, abComponents);
                     while (cbSrcLeft >= 2)
                     {
@@ -1019,10 +1019,10 @@
             case MAKE_SIG(ISO9660RRIPNM_SIG1, ISO9660RRIPNM_SIG2): /* NM */
                 if (   pUnion->NM.Hdr.bVersion != ISO9660RRIPNM_VER
-                    || pUnion->NM.Hdr.cbEntry < RT_OFFSETOF(ISO9660RRIPNM, achName)
+                    || pUnion->NM.Hdr.cbEntry < RT_UOFFSETOF(ISO9660RRIPNM, achName)
                     || (pUnion->NM.fFlags & ISO9660RRIP_NM_F_RESERVED_MASK) )
                     LogRel(("rtFsIsoImport/Rock: Malformed 'NM' entry: cbEntry=%#x (vs %#x), bVersion=%#x (vs %#x) fFlags=%#x %.*Rhxs\n",
-                            pUnion->NM.Hdr.cbEntry, RT_OFFSETOF(ISO9660RRIPNM, achName),
+                            pUnion->NM.Hdr.cbEntry, RT_UOFFSETOF(ISO9660RRIPNM, achName),
                             pUnion->NM.Hdr.bVersion, ISO9660RRIPNM_VER, pUnion->NM.fFlags,
-                            pUnion->NM.Hdr.cbEntry - RT_MIN(pUnion->NM.Hdr.cbEntry, RT_OFFSETOF(ISO9660RRIPNM, achName)),
+                            pUnion->NM.Hdr.cbEntry - RT_MIN(pUnion->NM.Hdr.cbEntry, RT_UOFFSETOF(ISO9660RRIPNM, achName)),
                             &pUnion->NM.achName[0] ));
                 else if (pThis->fSeenLastNM)
@@ -1032,5 +1032,5 @@
                     pThis->fSeenLastNM = !(pUnion->NM.fFlags & ISO9660RRIP_NM_F_CONTINUE);
 
-                    uint8_t const cchName = pUnion->NM.Hdr.cbEntry - (uint8_t)RT_OFFSETOF(ISO9660RRIPNM, achName);
+                    uint8_t const cchName = pUnion->NM.Hdr.cbEntry - (uint8_t)RT_UOFFSETOF(ISO9660RRIPNM, achName);
                     if (pUnion->NM.fFlags & (ISO9660RRIP_NM_F_CURRENT | ISO9660RRIP_NM_F_PARENT))
                     {
@@ -1163,8 +1163,8 @@
                                ISO9660_GET_ENDIAN(&pDirRec->offExtent), pThis->cBlocksInPrimaryVolumeSpace);
 
-    if (pDirRec->cbDirRec < RT_OFFSETOF(ISO9660DIRREC, achFileId) + pDirRec->bFileIdLength)
+    if (pDirRec->cbDirRec < RT_UOFFSETOF(ISO9660DIRREC, achFileId) + pDirRec->bFileIdLength)
         return rtFsIsoImpError(pThis, VERR_ISOMK_IMPORT_BAD_DIR_REC_LENGTH,
                                "Dir record size is too small: %#x (min %#x)",
-                               pDirRec->cbDirRec, RT_OFFSETOF(ISO9660DIRREC, achFileId) + pDirRec->bFileIdLength);
+                               pDirRec->cbDirRec, RT_UOFFSETOF(ISO9660DIRREC, achFileId) + pDirRec->bFileIdLength);
     if (pDirRec->cbDirRec > cbMax)
         return rtFsIsoImpError(pThis, VERR_ISOMK_IMPORT_BAD_DIR_REC_LENGTH,
@@ -1830,8 +1830,8 @@
                                ISO9660_GET_ENDIAN(&pDirRec->offExtent), pThis->cBlocksInPrimaryVolumeSpace);
 
-    if (pDirRec->cbDirRec < RT_OFFSETOF(ISO9660DIRREC, achFileId))
+    if (pDirRec->cbDirRec < RT_UOFFSETOF(ISO9660DIRREC, achFileId))
         return rtFsIsoImpError(pThis, VERR_ISOMK_IMPORT_BAD_ROOT_DIR_REC_LENGTH,
                                "Root dir record size is too small: %#x (min %#x)",
-                               pDirRec->cbDirRec, RT_OFFSETOF(ISO9660DIRREC, achFileId));
+                               pDirRec->cbDirRec, RT_UOFFSETOF(ISO9660DIRREC, achFileId));
 
     if (!(pDirRec->fFileFlags & ISO9660_FILE_FLAGS_DIRECTORY))
Index: trunk/src/VBox/Runtime/common/fs/isovfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/isovfs.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/isovfs.cpp	(revision 73097)
@@ -1229,5 +1229,5 @@
      * Basic sanity checking of what we use.
      */
-    if (     RT_OFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs + pFileEntry->cbAllocDescs
+    if (     RT_UOFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs + pFileEntry->cbAllocDescs
            > pVol->Udf.VolInfo.cbBlock
         || (pFileEntry->cbExtAttribs & 3) != 0
@@ -1275,5 +1275,5 @@
                                                 idxDefaultPart,
                                                   ((uint64_t)pFileEntry->Tag.offTag << pVol->Udf.VolInfo.cShiftBlock)
-                                                + RT_OFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs,
+                                                + RT_UOFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs,
                                                 pVol);
         if (RT_SUCCESS(rc))
@@ -1381,5 +1381,5 @@
      * Basic sanity checking of what we use.
      */
-    if (     RT_OFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs + pFileEntry->cbAllocDescs
+    if (     RT_UOFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs + pFileEntry->cbAllocDescs
            > pVol->Udf.VolInfo.cbBlock
         || (pFileEntry->cbExtAttribs & 3) != 0
@@ -1431,5 +1431,5 @@
                                                 idxDefaultPart,
                                                   ((uint64_t)pFileEntry->Tag.offTag << pVol->Udf.VolInfo.cShiftBlock)
-                                                + RT_OFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs,
+                                                + RT_UOFFSETOF(UDFFILEENTRY, abExtAttribs) + pFileEntry->cbExtAttribs,
                                                 pVol);
         if (RT_SUCCESS(rc))
@@ -2153,5 +2153,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSFILEOPS, Stream.Obj) - RT_OFFSETOF(RTVFSFILEOPS, ObjSet),
+        RT_UOFFSETOF(RTVFSFILEOPS, ObjSet) - RT_UOFFSETOF(RTVFSFILEOPS, Stream.Obj),
         NULL /*SetMode*/,
         NULL /*SetTimes*/,
@@ -3430,5 +3430,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSDIROPS, Obj) - RT_OFFSETOF(RTVFSDIROPS, ObjSet),
+        RT_UOFFSETOF(RTVFSDIROPS, ObjSet) - RT_UOFFSETOF(RTVFSDIROPS, Obj),
         NULL /*SetMode*/,
         NULL /*SetTimes*/,
@@ -3549,5 +3549,6 @@
                   wszName));
 
-            uint32_t offSysUse = RT_OFFSETOF(ISO9660DIRREC, achFileId[pDirRec->bFileIdLength]) + !(pDirRec->bFileIdLength & 1);
+            uint32_t offSysUse = RT_UOFFSETOF_DYN(ISO9660DIRREC, achFileId[pDirRec->bFileIdLength])
+                               + !(pDirRec->bFileIdLength & 1);
             if (offSysUse < pDirRec->cbDirRec)
             {
@@ -3631,5 +3632,5 @@
     {
         uint32_t offDesc = 0;
-        while (offDesc + RT_OFFSETOF(UDFFILEIDDESC, abImplementationUse) < pThis->cbDir)
+        while (offDesc + RT_UOFFSETOF(UDFFILEIDDESC, abImplementationUse) < pThis->cbDir)
         {
             PCUDFFILEIDDESC pFid  = (PCUDFFILEIDDESC)&pThis->pbDir[offDesc];
@@ -5368,5 +5369,5 @@
         Log2(("ISO9660:  RootDir.RecTime.bFileIdLength:      %RX8\n", pVolDesc->RootDir.DirRec.bFileIdLength));
         Log2(("ISO9660:  RootDir.RecTime.achFileId:          '%.*s'\n", pVolDesc->RootDir.DirRec.bFileIdLength, pVolDesc->RootDir.DirRec.achFileId));
-        uint32_t offSysUse = RT_OFFSETOF(ISO9660DIRREC, achFileId[pVolDesc->RootDir.DirRec.bFileIdLength])
+        uint32_t offSysUse = RT_UOFFSETOF_DYN(ISO9660DIRREC, achFileId[pVolDesc->RootDir.DirRec.bFileIdLength])
                            + !(pVolDesc->RootDir.DirRec.bFileIdLength & 1);
         if (offSysUse < pVolDesc->RootDir.DirRec.cbDirRec)
@@ -5392,7 +5393,7 @@
                                    PISO9660DIRREC pDstRootDir, PRTERRINFO pErrInfo)
 {
-    if (pRootDir->cbDirRec < RT_OFFSETOF(ISO9660DIRREC, achFileId))
+    if (pRootDir->cbDirRec < RT_UOFFSETOF(ISO9660DIRREC, achFileId))
         return RTERRINFO_LOG_SET_F(pErrInfo, VERR_VFS_BOGUS_FORMAT, "Root dir record size is too small: %#x (min %#x)",
-                                   pRootDir->cbDirRec, RT_OFFSETOF(ISO9660DIRREC, achFileId));
+                                   pRootDir->cbDirRec, RT_UOFFSETOF(ISO9660DIRREC, achFileId));
 
     if (!(pRootDir->fFileFlags & ISO9660_FILE_FLAGS_DIRECTORY))
@@ -5494,5 +5495,5 @@
      * ... and the root directory record.
      */
-    *poffRootDirRec = offVolDesc + RT_OFFSETOF(ISO9660PRIMARYVOLDESC, RootDir.DirRec);
+    *poffRootDirRec = offVolDesc + RT_UOFFSETOF(ISO9660PRIMARYVOLDESC, RootDir.DirRec);
     return rtFsIsoVolHandleRootDir(pThis, &pVolDesc->RootDir.DirRec, pRootDir, pErrInfo);
 }
@@ -5571,5 +5572,5 @@
     if (RT_SUCCESS(rc))
     {
-        *poffRootDirRec = offVolDesc + RT_OFFSETOF(ISO9660SUPVOLDESC, RootDir.DirRec);
+        *poffRootDirRec = offVolDesc + RT_UOFFSETOF(ISO9660SUPVOLDESC, RootDir.DirRec);
         *pbUcs2Level    = pVolDesc->abEscapeSequences[2] == ISO9660_JOLIET_ESC_SEQ_2_LEVEL_1 ? 1
                         : pVolDesc->abEscapeSequences[2] == ISO9660_JOLIET_ESC_SEQ_2_LEVEL_2 ? 2 : 3;
Index: trunk/src/VBox/Runtime/common/fs/ntfsvfs.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/fs/ntfsvfs.cpp	(revision 72585)
+++ trunk/src/VBox/Runtime/common/fs/ntfsvfs.cpp	(revision 73097)
@@ -764,5 +764,5 @@
                                     Log2(("NTFS:     cwcFilename        %#x\n", pInfo->cwcFilename));
                                     Log2(("NTFS:     fFilenameType      %#x\n", pInfo->fFilenameType));
-                                    if (RT_UOFFSETOF(NTFSATFILENAME, wszFilename[pInfo->cwcFilename]) <= cbValue)
+                                    if (RT_UOFFSETOF_DYN(NTFSATFILENAME, wszFilename[pInfo->cwcFilename]) <= cbValue)
                                         Log2(("NTFS:     wszFilename       '%.*ls'\n", pInfo->cwcFilename, pInfo->wszFilename ));
                                     else
@@ -770,6 +770,6 @@
                                 }
                                 else
-                                    Log2(("NTFS:     Error! cbValue=%#x is smaller than expected (%#x) for NTFSATFILENAME!\n",
-                                          cbValue, RT_OFFSETOF(NTFSATFILENAME, wszFilename) ));
+                                    Log2(("NTFS:     Error! cbValue=%#x is smaller than expected (%#zx) for NTFSATFILENAME!\n",
+                                          cbValue, RT_UOFFSETOF(NTFSATFILENAME, wszFilename) ));
                                 break;
                             }
@@ -2138,5 +2138,5 @@
         if (   pFilename
             && pFilename->cwcFilename >= 4
-            && RT_UOFFSETOF(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]) <= cbFilename)
+            && RT_UOFFSETOF_DYN(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]) <= cbFilename)
         {
             PCRTUTF16 pwcExt = &pFilename->wszFilename[pFilename->cwcFilename - 4];
@@ -2618,5 +2618,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSFILEOPS, Stream.Obj) - RT_OFFSETOF(RTVFSFILEOPS, ObjSet),
+        RT_UOFFSETOF(RTVFSFILEOPS, ObjSet) - RT_UOFFSETOF(RTVFSFILEOPS, Stream.Obj),
         rtFsNtfsFile_SetMode,
         rtFsNtfsFile_SetTimes,
@@ -2820,5 +2820,5 @@
             Log2(("NTFS:             cwcFilename        %#x\n", pFilename->cwcFilename));
             Log2(("NTFS:             fFilenameType      %#x\n", pFilename->fFilenameType));
-            if (RT_UOFFSETOF(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]) <= RT_LE2H_U16(pEntryHdr->cbKey))
+            if (RT_UOFFSETOF_DYN(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]) <= RT_LE2H_U16(pEntryHdr->cbKey))
                 Log2(("NTFS:             wszFilename       '%.*ls'\n", pFilename->cwcFilename, pFilename->wszFilename ));
             else
@@ -2980,9 +2980,9 @@
         {
             PCNTFSATFILENAME pFilename = (PCNTFSATFILENAME)(pEntryHdr + 1);
-            if (RT_UOFFSETOF(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]) > cbKey)
+            if (RT_UOFFSETOF_DYN(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]) > cbKey)
                 return RTERRINFO_LOG_REL_SET_F(pErrInfo, VERR_VFS_BOGUS_FORMAT,
                                                "%s: Entry #%u filename is out of bounds: cwcFilename=%#x -> %#x key, max %#x",
                                                pszWhat, iEntry, pFilename->cwcFilename,
-                                               RT_UOFFSETOF(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]), cbKey);
+                                               RT_UOFFSETOF_DYN(NTFSATFILENAME, wszFilename[pFilename->cwcFilename]), cbKey);
         }
 
@@ -4163,5 +4163,5 @@
         {
 
-            *pcbDirEntry = RT_UOFFSETOF(RTDIRENTRYEX, szName[pThis->paEnumStack[0].iNext + 2]);
+            *pcbDirEntry = RT_UOFFSETOF_DYN(RTDIRENTRYEX, szName[pThis->paEnumStack[0].iNext + 2]);
             if (*pcbDirEntry > cbDirEntry)
                 return VERR_BUFFER_OVERFLOW;
@@ -4255,5 +4255,5 @@
                                 rc, pFilename->cwcFilename * sizeof(RTUTF16), pFilename->wszFilename));
                     }
-                    *pcbDirEntry = RT_UOFFSETOF(RTDIRENTRYEX, szName[cchFilename + 1]);
+                    *pcbDirEntry = RT_UOFFSETOF_DYN(RTDIRENTRYEX, szName[cchFilename + 1]);
                     if (*pcbDirEntry > cbDirEntry)
                     {
@@ -4403,5 +4403,5 @@
     { /* ObjSet */
         RTVFSOBJSETOPS_VERSION,
-        RT_OFFSETOF(RTVFSDIROPS, Obj) - RT_OFFSETOF(RTVFSDIROPS, ObjSet),
+        RT_UOFFSETOF(RTVFSDIROPS, ObjSet) - RT_UOFFSETOF(RTVFSDIROPS, Obj),
         rtFsNtfsDir_SetMode,
         rtFsNtfsDir_SetTimes,
