Changeset 1016 in kBuild
- Timestamp:
- Jun 2, 2007 6:58:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kObjCache/kObjCache.c
r1008 r1016 555 555 if (pszStdOut) 556 556 { 557 int fdReDir; 558 557 559 close(1); 558 560 fdReDir = open(pszStdOut, O_CREAT | O_TRUNC | O_WRONLY, 0777); … … 568 570 } 569 571 570 execvp(papszArgv[0], papszArgv);571 kObjCacheFatal(pEntry, "%s - execvp failed rc=%d errno=%d%s\n",572 pszMsg, rc, errno,strerror(errno));572 execvp(papszArgv[0], (char **)papszArgv); 573 kObjCacheFatal(pEntry, "%s - execvp failed: %s\n", 574 pszMsg, strerror(errno)); 573 575 } 574 576 if (pid == -1) 575 577 kObjCacheFatal(pEntry, "%s - fork() failed: %s\n", pszMsg, strerror(errno)); 576 578 577 pidWait = waitpid(pid, &iStatus );579 pidWait = waitpid(pid, &iStatus, 0); 578 580 while (pidWait < 0 && errno == EINTR) 579 pidWait = waitpid(pid, &iStatus );581 pidWait = waitpid(pid, &iStatus, 0); 580 582 if (pidWait != pid) 581 583 kObjCacheFatal(pEntry, "%s - waitpid failed rc=%d: %s\n", … … 644 646 if (!pid) 645 647 { 646 execvp(papszArgv[0], papszArgv);647 kObjCacheFatal(pEntry, "%s - execvp failed rc=%d errno=%d%s\n",648 pszMsg, rc, errno,strerror(errno));648 execvp(papszArgv[0], (char **)papszArgv); 649 kObjCacheFatal(pEntry, "%s - execvp failed: %s\n", 650 pszMsg, strerror(errno)); 649 651 } 650 652 if (pid == -1) … … 661 663 * Read data from the child. 662 664 */ 663 cbAlloc = pEntry->cbOldCpp ? (pEntry->cbOldCpp + 4*1024*1024 ) & ~(4*1024*1024 - 1) : 4*1024*1024;665 cbAlloc = pEntry->cbOldCpp ? (pEntry->cbOldCpp + 4*1024*1024 + 4096) & ~(4*1024*1024 - 1) : 4*1024*1024; 664 666 cbLeft = cbAlloc; 665 667 *ppszOutput = psz = xmalloc(cbAlloc); 666 668 for (;;) 667 669 { 668 long cbRead = _read(fds[0], psz, cbLeft);670 long cbRead = read(fds[0], psz, cbLeft); 669 671 if (!cbRead) 670 672 break; … … 699 701 kObjCacheFatal(pEntry, "%s - failed with rc %d\n", pszMsg, iStatus); 700 702 #else 701 pidWait = waitpid(pid, &iStatus );703 pidWait = waitpid(pid, &iStatus, 0); 702 704 while (pidWait < 0 && errno == EINTR) 703 pidWait = waitpid(pid, &iStatus );705 pidWait = waitpid(pid, &iStatus, 0); 704 706 if (pidWait != pid) 705 707 kObjCacheFatal(pEntry, "%s - waitpid failed rc=%d: %s\n", … … 745 747 pEntry->NewSum.crc32 = crc32(0, pEntry->pszNewCppMapping, pEntry->cbNewCpp); 746 748 MD5Init(&MD5Ctx); 747 MD5Update(&MD5Ctx, pEntry->pszNewCppMapping, pEntry->cbNewCpp);749 MD5Update(&MD5Ctx, (unsigned char *)pEntry->pszNewCppMapping, pEntry->cbNewCpp); 748 750 MD5Final(&pEntry->NewSum.md5[0], &MD5Ctx); 749 751 kObjCacheVerbose(pEntry, "crc32=%#lx md5=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
Note:
See TracChangeset
for help on using the changeset viewer.