VirtualBox

Changeset 3140 in kBuild for trunk/src/kmk/kbuild.c


Ignore:
Timestamp:
Mar 14, 2018 9:28:10 PM (7 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

  • trunk/src/kmk/kbuild.c

    r3068 r3140  
    3030*******************************************************************************/
    3131#define NO_MEMCOPY_HACK
    32 #include "make.h"
     32#include "makeint.h"
    3333#include "filedef.h"
    3434#include "variable.h"
     
    116116        g_pszInitialCwd = xstrdup(szTmp);
    117117    else
    118         fatal(NILF, _("getcwd failed"));
     118        O(fatal, NILF, _("getcwd failed"));
    119119
    120120    /*
     
    282282                strcat(strcpy(pszTmp2, get_kbuild_bin_path()), "/../..");
    283283                if (!my_abspath(pszTmp2, szTmpPath))
    284                     fatal(NILF, _("failed to determin KBUILD_PATH"));
     284                    O(fatal, NILF, _("failed to determin KBUILD_PATH"));
    285285#endif
    286286            }
     
    332332
    333333                if (!my_abspath(pszTmp2, szTmpPath))
    334                     fatal(NILF, _("failed to determin KBUILD_BIN_PATH (pszTmp2=%s szTmpPath=%s)"), pszTmp2, szTmpPath);
     334                    OSS(fatal, NILF, _("failed to determin KBUILD_BIN_PATH (pszTmp2=%s szTmpPath=%s)"), pszTmp2, szTmpPath);
    335335#endif /* !KBUILD_PATH */
    336336            }
     
    506506    struct variable *pVar = lookup_variable(pszName, cchName);
    507507    if (!pVar)
    508         fatal(NILF, _("variable `%.*s' isn't defined!"), (int)cchName, pszName);
     508        fatal(NILF, cchName, _("variable `%.*s' isn't defined!"), (int)cchName, pszName);
    509509    if (pVar->recursive)
    510         fatal(NILF, _("variable `%.*s' is defined as `recursive' instead of `simple'!"), (int)cchName, pszName);
     510        fatal(NILF, cchName, _("variable `%.*s' is defined as `recursive' instead of `simple'!"), (int)cchName, pszName);
    511511
    512512    MY_ASSERT_MSG(strlen(pVar->value) == pVar->value_length,
     
    528528    struct variable *pVar = lookup_variable(pszName, strlen(pszName));
    529529    if (!pVar)
    530         fatal(NILF, _("variable `%s' isn't defined!"), pszName);
     530        OS(fatal, NILF, _("variable `%s' isn't defined!"), pszName);
    531531
    532532    MY_ASSERT_MSG(strlen(pVar->value) == pVar->value_length,
     
    980980        psz = pVar->value;
    981981        pszEnd = psz + pVar->value_length;
    982         while (isblank((unsigned char)*psz))
     982        while (ISBLANK(*psz))
    983983            psz++;
    984         while (pszEnd > psz && isblank((unsigned char)pszEnd[-1]))
     984        while (pszEnd > psz && ISBLANK(pszEnd[-1]))
    985985            pszEnd--;
    986986        if (pszEnd > psz)
     
    10351035                                              pszVarName);
    10361036    if (!pVar)
    1037         fatal(NILF, _("no tool for source `%s' in target `%s'!"), pSource->value, pTarget->value);
     1037        OSS(fatal, NILF, _("no tool for source `%s' in target `%s'!"), pSource->value, pTarget->value);
    10381038    return pVar;
    10391039}
     
    10841084                                              pszVarName);
    10851085    if (!pVar)
    1086         fatal(NILF, _("no OBJSUFF attribute or SUFF_OBJ default for source `%s' in target `%s'!"), pSource->value, pTarget->value);
     1086        OSS(fatal, NILF, _("no OBJSUFF attribute or SUFF_OBJ default for source `%s' in target `%s'!"),
     1087            pSource->value, pTarget->value);
    10871088    return pVar;
    10881089}
     
    18411842        iDirection = -1;
    18421843    else
    1843         fatal(NILF, _("incorrect direction argument `%s'!"), argv[2]);
     1844        OS(fatal, NILF, _("incorrect direction argument `%s'!"), argv[2]);
    18441845    if (argv[3])
    18451846    {
    18461847        const char *psz = argv[3];
    1847         while (isspace(*psz))
     1848        while (ISSPACE(*psz))
    18481849            psz++;
    18491850        if (*psz)
     
    19191920        psz--;
    19201921        if (psz <= pszResult)
    1921             fatal(NULL, "whut!?! no path? result=`%s'", pszResult);
     1922            OS(fatal, NULL, "whut!?! no path? result=`%s'", pszResult);
    19221923#ifdef HAVE_DOS_PATHS
    19231924        if (*psz == ':')
     
    20422043                iVer = 0;
    20432044                psz = argv[0];
    2044                 while (isblank((unsigned char)*psz))
     2045                while (ISBLANK(*psz))
    20452046                    psz++;
    20462047                if (*psz)
     
    22642265
    22652266    install_variable_buffer(&pszSavedVarBuf, &cchSavedVarBuf);
    2266     eval_buffer(pszVal, psz);
     2267    eval_buffer(pszVal, NULL, psz);
    22672268    restore_variable_buffer(pszSavedVarBuf, cchSavedVarBuf);
    22682269
     
    25022503     */
    25032504    if (pszVersion[0] != '1' || pszVersion[1])
    2504       fatal(NULL, "%s: Unsupported version `%s'", pszFuncName, pszVersion);
     2505      OSS(fatal, NULL, "%s: Unsupported version `%s'", pszFuncName, pszVersion);
    25052506
    25062507    if (!cchBldTrg)
    2507       fatal(NULL, "%s: missing bldtrg", pszFuncName);
     2508      OS(fatal, NULL, "%s: missing bldtrg", pszFuncName);
    25082509
    25092510    if (!cchBldTrgArch)
    2510       fatal(NULL, "%s: missing bld_trg_arch", pszFuncName);
     2511      OS(fatal, NULL, "%s: missing bld_trg_arch", pszFuncName);
    25112512
    25122513    if (!cchBldTrgCpu)
    2513       fatal(NULL, "%s: missing bld_trg_cpu", pszFuncName);
     2514      OS(fatal, NULL, "%s: missing bld_trg_cpu", pszFuncName);
    25142515
    25152516    if (!cchBldType)
    2516       fatal(NULL, "%s: missing bld_type", pszFuncName);
     2517      OS(fatal, NULL, "%s: missing bld_type", pszFuncName);
    25172518
    25182519    /*
     
    26332634    {
    26342635        if (   pDefTemplate->value_length
    2635             && (   isspace(pDefTemplate->value[0])
    2636                 || isspace(pDefTemplate->value[pDefTemplate->value_length - 1])))
     2636            && (   ISSPACE(pDefTemplate->value[0])
     2637                || ISSPACE(pDefTemplate->value[pDefTemplate->value_length - 1])))
    26372638        {
    26382639            unsigned int off;
    26392640            if (pDefTemplate->rdonly_val)
    2640                 fatal(NULL, "%s: TEMPLATE is read-only", pszFuncName);
     2641                OS(fatal, NULL, "%s: TEMPLATE is read-only", pszFuncName);
    26412642
    26422643            /* head */
    2643             for (off = 0; isspace(pDefTemplate->value[off]); off++)
     2644            for (off = 0; ISSPACE(pDefTemplate->value[off]); off++)
    26442645                /* nothing */;
    26452646            if (off)
     
    26512652            /* tail */
    26522653            off = pDefTemplate->value_length;
    2653             while (off > 0 && isspace(pDefTemplate->value[off - 1]))
     2654            while (off > 0 && ISSPACE(pDefTemplate->value[off - 1]))
    26542655                off--;
    26552656            pDefTemplate->value_length = off;
     
    27062707            pszTmpl = pTmpl->value;
    27072708            cchTmpl = pTmpl->value_length;
    2708             while (isspace(*pszTmpl))
     2709            while (ISSPACE(*pszTmpl))
    27092710                cchTmpl--, pszTmpl++;
    27102711            if (!cchTmpl)
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