Changeset 832


Ignore:
Timestamp:
Oct 12, 2003, 5:20:05 PM (22 years ago)
Author:
bird
Message:

Worked around error with DosSetFileLocksL on non JFS FSes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/sys/__fcntl.c

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r831 r832  
    66#include <limits.h>
    77#include <io.h>
     8#define INCL_ERRORS
    89#define INCL_FSMACROS
    910#include <os2emx.h>
     
    172173        /* Do work. */
    173174#if OFF_MAX > LONG_MAX
     175        rc = ERROR_INVALID_PARAMETER;
    174176        if (__pfnDosSetFileLocksL)
    175177        {
     
    182184            FS_RESTORE();
    183185        }
    184         else
     186        /* There is/was a bug in the large API which make it fail on non JFS
     187         * disks with ERROR_INVALID_PARAMETER. We need to work around this. */
     188        if (rc == ERROR_INVALID_PARAMETER)
    185189#endif
    186190        {
     
    188192#if OFF_MAX > LONG_MAX
    189193            if (    offStart > LONG_MAX
    190                 ||  cbRange > LONG_MAX
    191                 ||  offStart + cbRange > LONG_MAX
     194                ||  (   cbRange != OFF_MAX
     195                     && (   cbRange > LONG_MAX
     196                         || offStart + cbRange > LONG_MAX)
     197                     )
    192198                )
    193199              {
Note: See TracChangeset for help on using the changeset viewer.