Changeset 1043 in kBuild
- Timestamp:
- Jun 8, 2007 10:36:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kObjCache/kObjCache.c
r1042 r1043 1454 1454 * @param cArgv The number of arguments in the vector. 1455 1455 */ 1456 static void kOCEntrySpawn(PCKOCENTRY pEntry, const char * *papszArgv, unsigned cArgv, const char *pszMsg, const char *pszStdOut)1456 static void kOCEntrySpawn(PCKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, const char *pszMsg, const char *pszStdOut) 1457 1457 { 1458 1458 #if defined(__OS2__) || defined(__WIN__) … … 1545 1545 * @param pszMsg Message to start the info/error messages with. 1546 1546 */ 1547 static pid_t kOCEntrySpawnChild(PCKOCENTRY pEntry, const char * *papszArgv, unsigned cArgv, int fdStdIn, int fdStdOut, const char *pszMsg)1547 static pid_t kOCEntrySpawnChild(PCKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, int fdStdIn, int fdStdOut, const char *pszMsg) 1548 1548 { 1549 1549 pid_t pid; … … 1680 1680 * for servicing the child output and closing the pipe. 1681 1681 */ 1682 static void kOCEntrySpawnProducer(PKOCENTRY pEntry, const char * *papszArgv, unsigned cArgv, const char *pszMsg,1682 static void kOCEntrySpawnProducer(PKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, const char *pszMsg, 1683 1683 void (*pfnConsumer)(PKOCENTRY, int)) 1684 1684 { … … 1704 1704 * for serving the child input and closing the pipe. 1705 1705 */ 1706 static void kOCEntrySpawnConsumer(PKOCENTRY pEntry, const char * *papszArgv, unsigned cArgv, const char *pszMsg,1706 static void kOCEntrySpawnConsumer(PKOCENTRY pEntry, const char * const *papszArgv, unsigned cArgv, const char *pszMsg, 1707 1707 void (*pfnProducer)(PKOCENTRY, int)) 1708 1708 { … … 1729 1729 * for servicing the child output and closing the pipe. 1730 1730 */ 1731 static void kOCEntrySpawnTee(PKOCENTRY pEntry, const char * *papszProdArgv, unsigned cProdArgv,1732 const char * *papszConsArgv, unsigned cConsArgv,1731 static void kOCEntrySpawnTee(PKOCENTRY pEntry, const char * const *papszProdArgv, unsigned cProdArgv, 1732 const char * const *papszConsArgv, unsigned cConsArgv, 1733 1733 const char *pszMsg, void (*pfnTeeConsumer)(PKOCENTRY, int, int)) 1734 1734 { … … 1877 1877 * @param cArgvPreComp The number of arguments. 1878 1878 */ 1879 static void kOCEntryPreCompile(PKOCENTRY pEntry, const char * *papszArgvPreComp, unsigned cArgvPreComp)1879 static void kOCEntryPreCompile(PKOCENTRY pEntry, const char * const *papszArgvPreComp, unsigned cArgvPreComp) 1880 1880 { 1881 1881 /* … … 2041 2041 kOCEntryReadCppOutput(pEntry, &pEntry->New, 0 /* fatal */); 2042 2042 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, 2044 2044 "compile", kOCEntryCompileProducer); 2045 2045 } … … 2049 2049 kOCEntryWriteCppOutput(pEntry, 1 /* free it */); 2050 2050 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); 2052 2052 } 2053 2053 } … … 2145 2145 * @param cArgvPreComp The number of arguments. 2146 2146 */ 2147 static void kOCEntryPreCompileAndCompile(PKOCENTRY pEntry, const char * *papszArgvPreComp, unsigned cArgvPreComp)2147 static void kOCEntryPreCompileAndCompile(PKOCENTRY pEntry, const char * const *papszArgvPreComp, unsigned cArgvPreComp) 2148 2148 { 2149 2149 if ( pEntry->fPipedCompile … … 2166 2166 */ 2167 2167 kOCEntrySpawnTee(pEntry, papszArgvPreComp, cArgvPreComp, 2168 pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile,2168 (const char * const *)pEntry->New.papszArgvCompile, pEntry->New.cArgvCompile, 2169 2169 "precompile|compile", kOCEntryTeeConsumer); 2170 2170 } … … 2584 2584 if (errno == EINTR) 2585 2585 continue; 2586 if (eof(fdSrc))2587 break;2588 2586 FatalDie("read '%s' failed: %s\n", pszSrc, strerror(errno)); 2589 2587 } 2588 if (!cbRead) 2589 break; /* eof */ 2590 2590 2591 2591 /* write the chunk. */ … … 3285 3285 FatalDie("Failed to lock the cache file: Windows Error %d\n", GetLastError()); 3286 3286 #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)); 3288 3289 #endif 3289 3290 pCache->fLocked = 1; … … 3337 3338 FatalDie("Failed to unlock the cache file: Windows Error %d\n", GetLastError()); 3338 3339 #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)); 3340 3342 #endif 3341 3343 pCache->fLocked = 0;
Note:
See TracChangeset
for help on using the changeset viewer.