VirtualBox

Changeset 2718 in kBuild for trunk/src/kmk/kbuild-read.c


Ignore:
Timestamp:
Dec 30, 2013 9:30:47 PM (11 years ago)
Author:
bird
Message:

kmk: Variable aliases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kbuild-read.c

    r2717 r2718  
    284284        && g_fKbObjCompMode)
    285285    {
    286         size_t  cchPrefixed = pObj->cchVarPrefix + cchName;
    287         char   *pszPrefixed = xmalloc(cchPrefixed + 1);
     286        struct variable *pAlias;
     287        size_t           cchPrefixed = pObj->cchVarPrefix + cchName;
     288        char            *pszPrefixed = xmalloc(cchPrefixed + 1);
    288289        memcpy(pszPrefixed, pObj->pszVarPrefix, pObj->cchVarPrefix);
    289290        memcpy(&pszPrefixed[pObj->cchVarPrefix], pszName, cchName);
    290291        pszPrefixed[cchPrefixed] = '\0';
    291292
    292         /** @todo implement variable aliases or something. */
    293         define_variable_in_set(pszPrefixed, cchPrefixed,
    294                                pchValue, cchValue, 1 /*duplicate_value*/,
    295                                enmOrigin, fRecursive,
    296                                &global_variable_set,
    297                                pFileLoc);
     293        pAlias = define_variable_alias_in_set(pszPrefixed, cchPrefixed, pVar, enmOrigin,
     294                                              &global_variable_set, pFileLoc);
     295        if (!pAlias->alias)
     296            error(pFileLoc, _("Error defining alias '%s'"), pszPrefixed);
    298297    }
    299298
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