Changeset 879


Ignore:
Timestamp:
Dec 8, 2003, 6:32:51 AM (22 years ago)
Author:
bird
Message:

Handle dual return values from methods.

File:
1 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r878 r879  
    5555/** Number of free handles in the preallocated array. */
    5656static unsigned             gcPreAllocatedAvail;
     57
     58extern int _fmode_bin;
    5759
    5860
     
    627629     * were successful or if the handle has become invalid.
    628630     */
    629     if (!rc || rc == ERROR_INVALID_HANDLE)
     631    if (!rc || rc == ERROR_INVALID_HANDLE || rc == -EBADF)
    630632    {
    631633        int rc2;
     
    658660
    659661    if (rc)
    660         _sys_set_errno(rc);
     662    {
     663        if (rc > 0)
     664            _sys_set_errno(rc);
     665        else
     666            errno = rc;
     667    }
    661668
    662669    return rc;
     
    735742                 * Textflag.
    736743                 */
    737                 extern int _fmode_bin;
    738744                if (!_fmode_bin)
    739745                    fLibc |= O_TEXT;
Note: See TracChangeset for help on using the changeset viewer.