VirtualBox

Ignore:
Timestamp:
Apr 27, 2020 12:17:19 AM (5 years ago)
Author:
vboxsync
Message:

IPRT: Reduce the amoung of strings in errmsg and errmsgwin in static builds (IN_RT_STATIC). The windows ones are almost never used anywhere anyways.

Location:
trunk/src/VBox/Runtime/common/err
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/err/errmsg-sorter.cpp

    r83749 r83984  
    205205
    206206            /* Produce the output: */
    207             fprintf(pOut, "/*%8d:*/ { \"%s\", \"%s\", \"%s\", %s },\n",
     207            fprintf(pOut, "/*%8d:*/ ENTRY(\"%s\", \"%s\", \"%s\", %s),\n",
    208208                    pMsg->iCode,
    209209                    EscapeString(pMsg->pszMsgShort, s_szMsgTmp1, sizeof(s_szMsgTmp1)),
    210210                    EscapeString(pMsg->pszMsgFull, s_szMsgTmp2, sizeof(s_szMsgTmp2)),
    211211                    pMsg->pszDefine, pMsg->pszDefine);
     212
    212213        }
    213214
  • trunk/src/VBox/Runtime/common/err/errmsg.cpp

    r83745 r83984  
    3535#include <iprt/string.h>
    3636#include <VBox/err.h>
     37
     38
     39/*********************************************************************************************************************************
     40*   Defined Constants And Macros                                                                                                 *
     41*********************************************************************************************************************************/
     42#ifdef IPRT_ERRMSG_DEFINES_ONLY
     43# define ENTRY(a_pszMsgShort, a_pszMsgFull, a_pszDefine, a_iCode) \
     44    { a_pszDefine, a_pszDefine, a_pszDefine, a_iCode }
     45#elif defined(IN_RT_STATIC) /* Skip the full message in static builds to save space. */
     46# define ENTRY(a_pszMsgShort, a_pszMsgFull, a_pszDefine, a_iCode) \
     47    { a_pszMsgShort, a_pszMsgShort, a_pszDefine, a_iCode }
     48#else
     49# define ENTRY(a_pszMsgShort, a_pszMsgFull, a_pszDefine, a_iCode) \
     50    { a_pszMsgShort, a_pszMsgFull, a_pszDefine, a_iCode }
     51#endif
    3752
    3853
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