VirtualBox

忽略:
時間撮記:
2011-6-22 下午08:54:05 (13 年 以前)
作者:
vboxsync
訊息:

darwin build fix

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Runtime/r3/darwin/filelock-darwin.cpp

    r28800 r37597  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5050
    5151
    52 RTR3DECL(int)  RTFileLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock)
     52RTR3DECL(int)  RTFileLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock)
    5353{
    5454    Assert(offLock >= 0);
     
    8383
    8484    Assert(RTFILE_LOCK_WAIT);
    85     if (fcntl(File, (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0)
     85    if (fcntl(RTFileToNative(hFile), (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0)
    8686        return VINF_SUCCESS;
    8787    int iErr = errno;
     
    102102        else
    103103            f |= LOCK_SH;
    104         if (!flock(File, f))
     104        if (!flock(RTFileToNative(hFile), f))
    105105            return VINF_SUCCESS;
    106106        iErr = errno;
     
    117117
    118118
    119 RTR3DECL(int)  RTFileChangeLock(RTFILE File, unsigned fLock, int64_t offLock, uint64_t cbLock)
     119RTR3DECL(int)  RTFileChangeLock(RTFILE hFile, unsigned fLock, int64_t offLock, uint64_t cbLock)
    120120{
    121121    /** @todo We never returns VERR_FILE_NOT_LOCKED for now. */
    122     return RTFileLock(File, fLock, offLock, cbLock);
     122    return RTFileLock(hFile, fLock, offLock, cbLock);
    123123}
    124124
    125125
    126 RTR3DECL(int)  RTFileUnlock(RTFILE File, int64_t offLock, uint64_t cbLock)
     126RTR3DECL(int)  RTFileUnlock(RTFILE hFile, int64_t offLock, uint64_t cbLock)
    127127{
    128128    Assert(offLock >= 0);
     
    148148    fl.l_pid    = 0;
    149149
    150     if (fcntl(File, F_SETLK, &fl) >= 0)
     150    if (fcntl(RTFileToNative(hFile), F_SETLK, &fl) >= 0)
    151151        return VINF_SUCCESS;
    152152
     
    155155    {
    156156        /* A SMB hack, see RTFileLock. */
    157         if (!flock(File, LOCK_UN))
     157        if (!flock(RTFileToNative(hFile), LOCK_UN))
    158158            return VINF_SUCCESS;
    159159    }
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette