VirtualBox

Changeset 69686 in vbox


Ignore:
Timestamp:
Nov 14, 2017 1:29:33 PM (7 years ago)
Author:
vboxsync
Message:

/include/: darwin header tweaks

Location:
trunk/include
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Makefile.kmk

    r69107 r69686  
    2020include $(KBUILD_PATH)/subheader.kmk
    2121
    22 LIBRARIES += SyntaxVBoxIncludeR3 SyntaxVBoxIncludeR0 SyntaxVBoxIncludeRC
     22LIBRARIES += SyntaxVBoxIncludeR3 SyntaxVBoxIncludeR0
    2323
    2424# Omit headers that are using C++ features and upsets gcc.
     
    106106                VBox/VBoxNetCfg-win.h \
    107107                VBox/usblib-win.h \
     108                VBox/com/microatl.h \
    108109        ,$(VBOX_HDRS_GCC_ONLY)) \
    109110        \
     
    152153SyntaxVBoxIncludeR3_TEMPLATE = VBOXMAINEXE
    153154SyntaxVBoxIncludeR3_DEFS = VBOX_WITH_HGCM
    154 SyntaxVBoxIncludeR3_CDEFS = VBOX_WITHOUT_UNNAMED_UNIONS
     155SyntaxVBoxIncludeR3_CDEFS = IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS
    155156SyntaxVBoxIncludeR3_SOURCES := \
    156157        $(addprefix $(PATH_OBJ)/include/c/,  $(addsuffix .c,  $(basename $(VBOX_HDRS_ALL_R3_C)))) \
     
    161162SyntaxVBoxIncludeR0_TEMPLATE = VBoxR0
    162163SyntaxVBoxIncludeR0_DEFS = VBOX_WITH_HGCM
    163 SyntaxVBoxIncludeR0_CDEFS = VBOX_WITHOUT_UNNAMED_UNIONS
     164SyntaxVBoxIncludeR0_CDEFS = IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS
    164165SyntaxVBoxIncludeR0_SOURCES := \
    165166        $(addprefix $(PATH_OBJ)/include/c/,  $(addsuffix .c,  $(basename $(VBOX_HDRS_ALL_R0_C)))) \
     
    167168SyntaxVBoxIncludeR0_CLEAN = $(SyntaxVBoxIncludeR0_SOURCES)
    168169
    169 SyntaxVBoxIncludeRC_TEMPLATE = VBoxRc
    170 SyntaxVBoxIncludeRC_DEFS = VBOX_WITH_HGCM
    171 SyntaxVBoxIncludeRC_CDEFS = VBOX_WITHOUT_UNNAMED_UNIONS
    172 SyntaxVBoxIncludeRC_SOURCES := \
    173         $(addprefix $(PATH_OBJ)/include/c/,  $(addsuffix .c,  $(basename $(VBOX_HDRS_ALL_RC_C)))) \
    174         $(addprefix $(PATH_OBJ)/include/cpp/,$(addsuffix .cpp,$(basename $(VBOX_HDRS_ALL_RC))))
    175 SyntaxVBoxIncludeRC_CLEAN = $(SyntaxVBoxIncludeRC_SOURCES)
    176 
     170ifdef VBOX_WITH_RAW_MODE
     171 LIBRARIES += SyntaxVBoxIncludeRC
     172 SyntaxVBoxIncludeRC_TEMPLATE = VBoxRc
     173 SyntaxVBoxIncludeRC_DEFS = VBOX_WITH_HGCM
     174 SyntaxVBoxIncludeRC_CDEFS = IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS
     175 SyntaxVBoxIncludeRC_SOURCES := \
     176        $(addprefix $(PATH_OBJ)/include/c/,  $(addsuffix .c,  $(basename $(VBOX_HDRS_ALL_RC_C)))) \
     177        $(addprefix $(PATH_OBJ)/include/cpp/,$(addsuffix .cpp,$(basename $(VBOX_HDRS_ALL_RC))))
     178 SyntaxVBoxIncludeRC_CLEAN = $(SyntaxVBoxIncludeRC_SOURCES)
     179endif
    177180
    178181
  • trunk/include/VBox/Graphics/VBoxUhgsmi.h

    r69107 r69686  
    4343            uint32_t fCommand    : 1;
    4444            uint32_t Reserved    : 31;
    45         };
     45        } RT_STRUCT_NM(s);
    4646        uint32_t Value;
    47     };
     47    } RT_UNION_NM(u);
    4848} VBOXUHGSMI_BUFFER_TYPE_FLAGS;
    4949
     
    6060            uint32_t bLockEntire : 1;
    6161            uint32_t Reserved    : 27;
    62         };
     62        } RT_STRUCT_NM(s);
    6363        uint32_t Value;
    64     };
     64    } RT_UNION_NM(u);
    6565} VBOXUHGSMI_BUFFER_LOCK_FLAGS;
    6666
     
    7676            uint32_t bEntireBuffer          : 1;
    7777            uint32_t Reserved               : 28;
    78         };
     78        } RT_STRUCT_NM(s);
    7979        uint32_t Value;
    80     };
     80    } RT_UNION_NM(u);
    8181} VBOXUHGSMI_BUFFER_SUBMIT_FLAGS, *PVBOXUHGSMI_BUFFER_SUBMIT_FLAGS;
    8282
  • trunk/include/VBox/Graphics/VBoxVideoHost3D.h

    r69107 r69686  
    124124        void *pvVRamBase;
    125125        uint64_t uAlignment;
    126     };
     126    } RT_UNION_NM(u);
    127127    uint64_t cbVRam;
    128128    PPDMLED pLed;
  • trunk/include/VBox/vmm/cpum.h

    r69408 r69686  
    12101210/** @} */
    12111211
    1212 #ifndef VBOX_WITHOUT_UNNAMED_UNIONS
     1212#ifndef IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS
    12131213
    12141214/**
     
    14531453    return CPUMIsGuestInSvmNestedHwVirtMode(pCtx) || CPUMIsGuestInVmxNestedHwVirtMode(pCtx);
    14541454}
    1455 #endif /* VBOX_WITHOUT_UNNAMED_UNIONS */
     1455#endif /* IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS */
    14561456
    14571457/** @} */
  • trunk/include/VBox/vmm/cpumctx.h

    r69107 r69686  
    135135# define CPUM_UNION_NM(a_Nm)  a_Nm
    136136# define CPUM_STRUCT_NM(a_Nm) a_Nm
    137 #elif defined(VBOX_WITHOUT_UNNAMED_UNIONS)
     137#elif defined(IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS)
    138138# define CPUM_UNION_NM(a_Nm)  a_Nm
    139139# define CPUM_STRUCT_NM(a_Nm) a_Nm
  • trunk/include/VBox/vmm/pdmaudioifs.h

    r68758 r69686  
    661661            PDMAUDMIXBUFVOL Volume;
    662662        } From;
    663     };
     663    } RT_UNION_NM(u);
    664664} PDMAUDMIXBUFCONVOPTS;
    665665/** Pointer to conversion parameters for the audio mixer.   */
     
    918918        PDMAUDIOSTREAMIN   In;
    919919        PDMAUDIOSTREAMOUT  Out;
    920     };
     920    } RT_UNION_NM(u);
    921921    /** Data to backend-specific stream data.
    922922     *  This data block will be casted by the backend to access its backend-dependent data.
     
    926926    /** Size (in bytes) of the backend-specific stream data. */
    927927    size_t                 cbBackend;
    928 } PDMAUDIOSTREAM, *PPDMAUDIOSTREAM;
     928} PDMAUDIOSTREAM;
    929929
    930930/** Pointer to a audio connector interface. */
     
    10371037            PDMAUDIODEVICECBTYPE enmType;
    10381038        } Device;
    1039     };
     1039    } RT_UNION_NM(u);
    10401040    /** Pointer to context data. Optional. */
    10411041    void               *pvCtx;
     
    12411241    DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCBRECORD paCallbacks, size_t cCallbacks));
    12421242
    1243 } PDMIAUDIOCONNECTOR, *PPDMIAUDIOCONNECTOR;
     1243} PDMIAUDIOCONNECTOR;
    12441244
    12451245/** PDMIAUDIOCONNECTOR interface ID. */
     
    14711471    DECLR3CALLBACKMEMBER(void, pfnStreamCaptureEnd, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream));
    14721472
    1473 } PDMIHOSTAUDIO, *PPDMIHOSTAUDIO;
     1473} PDMIHOSTAUDIO;
    14741474
    14751475/** PDMIHOSTAUDIO interface ID. */
  • trunk/include/iprt/bldprog-strtab-template.cpp.h

    r69105 r69686  
    157157} BLDPROGSTRTAB;
    158158typedef BLDPROGSTRTAB *PBLDPROGSTRTAB;
     159
     160#if RT_CLANG_PREREQ(4, 0)
     161#  pragma GCC diagnostic push
     162#  pragma GCC diagnostic ignored "-Wunused-function"
     163#endif
    159164
    160165
     
    900905#else
    901906        else
    902             fprintf(pOut, "\\x%02", (unsigned)uch);
     907            fprintf(pOut, "\\x%02x", (unsigned)uch);
    903908        NOREF(pThis);
    904909#endif
     
    10341039}
    10351040
     1041#if RT_CLANG_PREREQ(4, 0)
     1042#  pragma GCC diagnostic pop
     1043#endif
     1044
    10361045#endif /* __cplusplus && IN_RING3 */
    10371046
     1047
  • trunk/include/iprt/cdefs.h

    r69105 r69686  
    23942394#endif
    23952395
     2396/** @def RT_UNION_NM
     2397 * For compilers (like DTrace) that does not grok nameless unions, we have a
     2398 * little hack to make them palatable.
     2399 */
     2400/** @def RT_STRUCT_NM
     2401 * For compilers (like DTrace) that does not grok nameless structs (it is
     2402 * non-standard C++), we have a little hack to make them palatable.
     2403 */
     2404#ifdef IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS
     2405# define RT_UNION_NM(a_Nm)  a_Nm
     2406# define RT_STRUCT_NM(a_Nm) a_Nm
     2407#else
     2408# define RT_UNION_NM(a_Nm)
     2409# define RT_STRUCT_NM(a_Nm)
     2410#endif
     2411
    23962412/**
    23972413 * Checks if the value is a power of two.
  • trunk/include/iprt/nocrt/math.h

    r69475 r69686  
    5757#define __GNUC_PREREQ__(ma, mi) 0
    5858#endif
     59#undef  __pure2 /* darwin: avoid conflict with system headers when doing syntax checking of the headers */
    5960#define __pure2
    6061
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