Changeset 18 for trunk/src/corelib


Ignore:
Timestamp:
Jun 6, 2009, 11:27:15 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib/io: Adopted QFSFileEngine for OS/2 (posix-style).

Location:
trunk/src/corelib/io
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/io/io.pri

    r2 r18  
    6060        HEADERS += io/qwindowspipewriter_p.h
    6161        SOURCES += io/qwindowspipewriter.cpp
     62
     63
     64
     65
     66
     67
     68
     69
    6270} else:unix {
    6371        SOURCES += io/qfsfileengine_unix.cpp
  • trunk/src/corelib/io/qfsfileengine_iterator_os2.cpp

    r17 r18  
    4444
    4545#include <QtCore/qvariant.h>
     46
     47
     48
    4649
    4750#ifndef QT_NO_FSFILEENGINE
  • trunk/src/corelib/io/qfsfileengine_os2.cpp

    r17 r18  
    5959#include <limits.h>
    6060#include <errno.h>
    61 #if !defined(QWS) && defined(Q_OS_MAC)
    62 # include <private/qcore_mac_p.h>
    63 #endif
     61#include <unistd.h>
     62
     63#include <pwd.h>
     64#include <grp.h>
    6465
    6566QT_BEGIN_NAMESPACE
     
    119120    }
    120121
    121 #ifdef O_CLOEXEC
    122     // supported on Linux >= 2.6.23; avoids one extra system call
    123     // and avoids a race condition: if another thread forks, we could
    124     // end up leaking a file descriptor...
    125     oflags |= O_CLOEXEC;
    126 #endif
    127122    return oflags;
    128123}
     
    178173        }
    179174
    180 #ifndef O_CLOEXEC
    181         // not needed on Linux >= 2.6.23
    182175        setCloseOnExec(fd);     // ignore failure
    183 #endif
    184176
    185177        // Seek to the end when in Append mode.
     
    956948uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags)
    957949{
     950
     951
     952
     953
    958954    Q_Q(QFSFileEngine);
    959955    Q_UNUSED(flags);
     
    997993    }
    998994    return 0;
     995
    999996}
    1000997
    1001998bool QFSFileEnginePrivate::unmap(uchar *ptr)
    1002999{
     1000
     1001
     1002
     1003
    10031004    Q_Q(QFSFileEngine);
    10041005    if (!maps.contains(ptr)) {
     
    10151016    maps.remove(ptr);
    10161017    return true;
     1018
    10171019}
    10181020
  • trunk/src/corelib/io/qfsfileengine_p.h

    r2 r18  
    139139    mutable uint could_stat : 1;
    140140    mutable uint tried_stat : 1;
    141 #ifdef Q_OS_UNIX
     141#if
    142142    mutable uint need_lstat : 1;
    143143    mutable uint is_link : 1;
Note: See TracChangeset for help on using the changeset viewer.