Changeset 1089 in kBuild
- Timestamp:
- Sep 5, 2007 8:50:59 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kObjCache/kObjCache.c
r1087 r1089 3370 3370 if (!LockFileEx((HANDLE)_get_osfhandle(pCache->fd), LOCKFILE_EXCLUSIVE_LOCK, 0, ~0, 0, &OverLapped)) 3371 3371 FatalDie("Failed to lock the cache file: Windows Error %d\n", GetLastError()); 3372 #elif defined(__sun__) 3373 { 3374 struct flock fl; 3375 fl.l_whence = 0; 3376 fl.l_start = 0; 3377 fl.l_len = 0; 3378 fl.l_type = F_WRLCK; 3379 if (fcntl(pCache->fd, F_SETLKW, &fl) != 0) 3380 FatalDie("Failed to lock the cache file: %s\n", strerror(errno)); 3381 } 3372 3382 #else 3373 3383 if (flock(pCache->fd, LOCK_EX) != 0) … … 3426 3436 if (!UnlockFileEx((HANDLE)_get_osfhandle(pCache->fd), 0, ~0U, 0, &OverLapped)) 3427 3437 FatalDie("Failed to unlock the cache file: Windows Error %d\n", GetLastError()); 3438 #elif defined(__sun__) 3439 { 3440 struct flock fl; 3441 fl.l_whence = 0; 3442 fl.l_start = 0; 3443 fl.l_len = 0; 3444 fl.l_type = F_UNLCK; 3445 if (fcntl(pCache->fd, F_SETLKW, &fl) != 0) 3446 FatalDie("Failed to lock the cache file: %s\n", strerror(errno)); 3447 } 3428 3448 #else 3429 3449 if (flock(pCache->fd, LOCK_UN) != 0)
Note:
See TracChangeset
for help on using the changeset viewer.