VirtualBox

Changeset 76512 in vbox


Ignore:
Timestamp:
Dec 30, 2018 5:14:08 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127813
Message:

scm,asm*watcom*.h: Added scm option to omit the #pragma once for the multipass watcom inline assembly files. bugref:9344

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/.scm-settings

    r76508 r76512  
    7373/iprt/runtime-loader.h:                 --no-fix-header-guards
    7474/iprt/bldprog-strtab-template.cpp.h:    --no-fix-header-guards
     75/iprt/asm*watcom*.h:                    --no-pragma-once
    7576
  • trunk/include/iprt/asm-amd64-x86-watcom-16.h

    r76507 r76512  
    2626#ifndef ___iprt_asm_amd64_x86_watcom_16_h
    2727#define ___iprt_asm_amd64_x86_watcom_16_h
    28 #ifndef RT_WITHOUT_PRAGMA_ONCE
    29 # pragma once
    30 #endif
     28/* no pragma once */
    3129
    3230#ifndef ___iprt_asm_amd64_x86_h
  • trunk/include/iprt/asm-amd64-x86-watcom-32.h

    r76507 r76512  
    2626#ifndef ___iprt_asm_amd64_x86_watcom_32_h
    2727#define ___iprt_asm_amd64_x86_watcom_32_h
    28 #ifndef RT_WITHOUT_PRAGMA_ONCE
    29 # pragma once
    30 #endif
     28/* no pragma once */
    3129
    3230#ifndef ___iprt_asm_amd64_x86_h
  • trunk/include/iprt/asm-watcom-x86-16.h

    r76507 r76512  
    2626#ifndef ___iprt_asm_watcom_x86_16_h
    2727#define ___iprt_asm_watcom_x86_16_h
    28 #ifndef RT_WITHOUT_PRAGMA_ONCE
    29 # pragma once
    30 #endif
     28/* no pragma once */
    3129
    3230#ifndef ___iprt_asm_h
  • trunk/include/iprt/asm-watcom-x86-32.h

    r76507 r76512  
    2626#ifndef ___iprt_asm_watcom_x86_32_h
    2727#define ___iprt_asm_watcom_x86_32_h
    28 #ifndef RT_WITHOUT_PRAGMA_ONCE
    29 # pragma once
    30 #endif
     28/* no pragma once */
    3129
    3230#ifndef ___iprt_asm_h
  • trunk/src/bldprogs/scm.cpp

    r76506 r76512  
    7777    SCMOPT_FIX_HEADER_GUARDS,
    7878    SCMOPT_NO_FIX_HEADER_GUARDS,
     79    SCMOPT_PRAGMA_ONCE,
     80    SCMOPT_NO_PRAGMA_ONCE,
    7981    SCMOPT_FIX_TODOS,
    8082    SCMOPT_NO_FIX_TODOS,
     
    178180    /* .cMinBlankLinesBeforeFlowerBoxMakers = */    2,
    179181    /* .fFixHeaderGuards = */                       false, /** @todo fFixHeaderGuards = true */
     182    /* .fPragmaOnce = */                            true,
    180183    /* .fFixTodos = */                              true,
    181184    /* .fFixErrH = */                               true,
     
    220223    { "--fix-header-guards",                SCMOPT_FIX_HEADER_GUARDS,               RTGETOPT_REQ_NOTHING },
    221224    { "--no-fix-header-guards",             SCMOPT_NO_FIX_HEADER_GUARDS,            RTGETOPT_REQ_NOTHING },
     225    { "--pragma-once",                      SCMOPT_PRAGMA_ONCE,                     RTGETOPT_REQ_NOTHING },
     226    { "--no-pragma-once",                   SCMOPT_NO_PRAGMA_ONCE,                  RTGETOPT_REQ_NOTHING },
    222227    { "--fix-todos",                        SCMOPT_FIX_TODOS,                       RTGETOPT_REQ_NOTHING },
    223228    { "--no-fix-todos",                     SCMOPT_NO_FIX_TODOS,                    RTGETOPT_REQ_NOTHING },
     
    10201025        case SCMOPT_NO_FIX_HEADER_GUARDS:
    10211026            pSettings->fFixHeaderGuards = false;
     1027            return VINF_SUCCESS;
     1028
     1029        case SCMOPT_PRAGMA_ONCE:
     1030            pSettings->fPragmaOnce = true;
     1031            return VINF_SUCCESS;
     1032        case SCMOPT_NO_PRAGMA_ONCE:
     1033            pSettings->fPragmaOnce = false;
    10221034            return VINF_SUCCESS;
    10231035
     
    26932705                RTPrintf("      Fix header guards and #pragma once.  Default: %RTbool\n", g_Defaults.fFixHeaderGuards);
    26942706                break;
     2707            case SCMOPT_PRAGMA_ONCE:
     2708                RTPrintf("      Whether to include #pragma once with the header guard.  Default: %RTbool\n", g_Defaults.fPragmaOnce);
     2709                break;
    26952710            case SCMOPT_FIX_TODOS:
    26962711                RTPrintf("      Fix @todo statements so doxygen sees them.  Default: %RTbool\n", g_Defaults.fFixTodos);
  • trunk/src/bldprogs/scm.h

    r76506 r76512  
    334334    /** Whether to fix C/C++ header guards and \#pragma once directives. */
    335335    bool            fFixHeaderGuards;
     336    /** Whether to include a pragma once statement with the header guard. */
     337    bool            fPragmaOnce;
    336338
    337339    /** Whether to fix C/C++ todos. */
  • trunk/src/bldprogs/scmrw.cpp

    r76509 r76512  
    30193019                            iPragmaOnce + 3, ErrInfo.Core.pszMsg, cchLine, pchLine);
    30203020        ScmVerbose(pState, 3, "Found pragma once\n");
     3021        fRet |= !pSettings->fPragmaOnce;
    30213022    }
    30223023    else
     
    30253026        if (RT_FAILURE(rc))
    30263027            return ScmError(pState, rc, "seek error\n");
    3027         fRet = true;
     3028        fRet = pSettings->fPragmaOnce;
    30283029        ScmVerbose(pState, 2, "Missing #pragma once\n");
    30293030    }
     
    30323033     * Write the pragma once stuff.
    30333034     */
    3034     ScmStreamPutLine(pOut, RT_STR_TUPLE("#ifndef RT_WITHOUT_PRAGMA_ONCE"), enmEol);
    3035     ScmStreamPutLine(pOut, RT_STR_TUPLE("# pragma once"), enmEol);
    3036     rc = ScmStreamPutLine(pOut, RT_STR_TUPLE("#endif"), enmEol);
    3037     if (RT_FAILURE(rc))
    3038         return false;
     3035    if (pSettings->fPragmaOnce)
     3036    {
     3037        ScmStreamPutLine(pOut, RT_STR_TUPLE("#ifndef RT_WITHOUT_PRAGMA_ONCE"), enmEol);
     3038        ScmStreamPutLine(pOut, RT_STR_TUPLE("# pragma once"), enmEol);
     3039        rc = ScmStreamPutLine(pOut, RT_STR_TUPLE("#endif"), enmEol);
     3040        if (RT_FAILURE(rc))
     3041            return false;
     3042    }
    30393043
    30403044    /*
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