VirtualBox

Changeset 1043 in kBuild


Ignore:
Timestamp:
Jun 8, 2007 10:36:21 PM (18 years ago)
Author:
bird
Message:

made it build on darwin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kObjCache/kObjCache.c

    r1042 r1043  
    14541454 * @param   cArgv           The number of arguments in the vector.
    14551455 */
    1456 static void kOCEntrySpawn(PCKOCENTRY pEntry, const char **papszArgv, unsigned cArgv, const char *pszMsg, const char *pszStdOut)
     1456static void kOCEntrySpawn(PCKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, const char *pszMsg, const char *pszStdOut)
    14571457{
    14581458#if defined(__OS2__) || defined(__WIN__)
     
    15451545 * @param   pszMsg          Message to start the info/error messages with.
    15461546 */
    1547 static pid_t kOCEntrySpawnChild(PCKOCENTRY pEntry, const char **papszArgv, unsigned cArgv, int fdStdIn, int fdStdOut, const char *pszMsg)
     1547static pid_t kOCEntrySpawnChild(PCKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, int fdStdIn, int fdStdOut, const char *pszMsg)
    15481548{
    15491549    pid_t pid;
     
    16801680 *                          for servicing the child output and closing the pipe.
    16811681 */
    1682 static void kOCEntrySpawnProducer(PKOCENTRY pEntry, const char **papszArgv, unsigned cArgv, const char *pszMsg,
     1682static void kOCEntrySpawnProducer(PKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, const char *pszMsg,
    16831683                                  void (*pfnConsumer)(PKOCENTRY, int))
    16841684{
     
    17041704 *                          for serving the child input and closing the pipe.
    17051705 */
    1706 static void kOCEntrySpawnConsumer(PKOCENTRY pEntry, const char **papszArgv, unsigned cArgv, const char *pszMsg,
     1706static void kOCEntrySpawnConsumer(PKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, const char *pszMsg,
    17071707                                  void (*pfnProducer)(PKOCENTRY, int))
    17081708{
     
    17291729 *                          for servicing the child output and closing the pipe.
    17301730 */
    1731 static void kOCEntrySpawnTee(PKOCENTRY pEntry, const char **papszProdArgv, unsigned cProdArgv,
    1732                              const char **papszConsArgv, unsigned cConsArgv,
     1731static void kOCEntrySpawnTee(PKOCENTRY pEntry, const char * const *papszProdArgv, unsigned cProdArgv,
     1732                             const char * const *papszConsArgv, unsigned cConsArgv,
    17331733                             const char *pszMsg, void (*pfnTeeConsumer)(PKOCENTRY, int, int))
    17341734{
     
    18771877 * @param   cArgvPreComp        The number of arguments.
    18781878 */
    1879 static void kOCEntryPreCompile(PKOCENTRY pEntry, const char **papszArgvPreComp, unsigned cArgvPreComp)
     1879static void kOCEntryPreCompile(PKOCENTRY pEntry, const char * const *papszArgvPreComp, unsigned cArgvPreComp)
    18801880{
    18811881    /*
     
    20412041            kOCEntryReadCppOutput(pEntry, &pEntry->New, 0 /* fatal */);
    20422042        InfoMsg(1, "compiling -> '%s'...\n", pEntry->New.pszObjName);
    2043         kOCEntrySpawnConsumer(pEntry, pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile,
     2043        kOCEntrySpawnConsumer(pEntry, (const char * const *)pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile,
    20442044                              "compile", kOCEntryCompileProducer);
    20452045    }
     
    20492049            kOCEntryWriteCppOutput(pEntry, 1 /* free it */);
    20502050        InfoMsg(1, "compiling -> '%s'...\n", pEntry->New.pszObjName);
    2051         kOCEntrySpawn(pEntry, pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile, "compile", NULL);
     2051        kOCEntrySpawn(pEntry, (const char * const *)pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile, "compile", NULL);
    20522052    }
    20532053}
     
    21452145 * @param   cArgvPreComp        The number of arguments.
    21462146 */
    2147 static void kOCEntryPreCompileAndCompile(PKOCENTRY pEntry, const char **papszArgvPreComp, unsigned cArgvPreComp)
     2147static void kOCEntryPreCompileAndCompile(PKOCENTRY pEntry, const char * const *papszArgvPreComp, unsigned cArgvPreComp)
    21482148{
    21492149    if (    pEntry->fPipedCompile
     
    21662166         */
    21672167        kOCEntrySpawnTee(pEntry, papszArgvPreComp, cArgvPreComp,
    2168                          pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile,
     2168                         (const char * const *)pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile,
    21692169                         "precompile|compile", kOCEntryTeeConsumer);
    21702170    }
     
    25842584            if (errno == EINTR)
    25852585                continue;
    2586             if (eof(fdSrc))
    2587                 break;
    25882586            FatalDie("read '%s' failed: %s\n", pszSrc, strerror(errno));
    25892587        }
     2588        if (!cbRead)
     2589            break; /* eof */
    25902590
    25912591        /* write the chunk. */
     
    32853285        FatalDie("Failed to lock the cache file: Windows Error %d\n", GetLastError());
    32863286#else
    3287 # error port me....
     3287    if (flock(pCache->fd, LOCK_EX) != 0)
     3288        FatalDie("Failed to lock the cache file: %s\n", strerror(errno));
    32883289#endif
    32893290    pCache->fLocked = 1;
     
    33373338        FatalDie("Failed to unlock the cache file: Windows Error %d\n", GetLastError());
    33383339#else
    3339 # error port me....
     3340    if (flock(pCache->fd, LOCK_UN) != 0)
     3341        FatalDie("Failed to unlock the cache file: %s\n", strerror(errno));
    33403342#endif
    33413343    pCache->fLocked = 0;
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