1 /****************************************************************************
\r
3 ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
\r
4 ** Contact: Qt Software Information (qt-info@nokia.com)
\r
6 ** This file is part of the qmake spec of the Qt Toolkit.
\r
9 ** Licensees holding valid Qt Commercial licenses may use this file in
\r
10 ** accordance with the Qt Commercial License Agreement provided with the
\r
11 ** Software or, alternatively, in accordance with the terms contained in
\r
12 ** a written agreement between you and Nokia.
\r
15 ** GNU General Public License Usage
\r
16 ** Alternatively, this file may be used under the terms of the GNU
\r
17 ** General Public License versions 2.0 or 3.0 as published by the Free
\r
18 ** Software Foundation and appearing in the file LICENSE.GPL included in
\r
19 ** the packaging of this file. Please review the following information
\r
20 ** to ensure GNU General Public Licensing requirements will be met:
\r
21 ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
\r
22 ** http://www.gnu.org/copyleft/gpl.html. In addition, as a special
\r
23 ** exception, Nokia gives you certain additional rights. These rights
\r
24 ** are described in the Nokia Qt GPL Exception version 1.3, included in
\r
25 ** the file GPL_EXCEPTION.txt in this package.
\r
27 ** Qt for Windows(R) Licensees
\r
28 ** As a special exception, Nokia, as the sole copyright holder for Qt
\r
29 ** Designer, grants users of the Qt/Eclipse Integration plug-in the
\r
30 ** right for the Qt/Eclipse Integration to link to functionality
\r
31 ** provided by Qt Designer and its related libraries.
\r
33 ** If you are unsure which license is appropriate for your use, please
\r
34 ** contact the sales department at qt-sales@nokia.com.
\r
36 ****************************************************************************/
\r
38 #ifndef QPLATFORMDEFS_H
\r
39 #define QPLATFORMDEFS_H
\r
47 // Get Qt defines/settings
\r
49 #include "qglobal.h"
\r
57 #include <sys/stat.h>
\r
59 #include <windows.h>
\r
62 #if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
\r
65 NameFullyQualifiedDN = 1,
\r
66 NameSamCompatible = 2,
\r
70 NameUserPrincipal = 8,
\r
71 NameCanonicalEx = 9,
\r
72 NameServicePrincipal = 10,
\r
74 } EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
\r
78 #ifdef QT_LARGEFILE_SUPPORT
\r
79 #define QT_STATBUF struct _stati64 // non-ANSI defs
\r
80 #define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
\r
81 #define QT_STAT ::_stati64
\r
82 #define QT_FSTAT ::_fstati64
\r
84 #define QT_STATBUF struct _stat // non-ANSI defs
\r
85 #define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
\r
86 #define QT_STAT ::_stat
\r
87 #define QT_FSTAT ::_fstat
\r
89 #define QT_STAT_REG _S_IFREG
\r
90 #define QT_STAT_DIR _S_IFDIR
\r
91 #define QT_STAT_MASK _S_IFMT
\r
92 #if defined(_S_IFLNK)
\r
93 # define QT_STAT_LNK _S_IFLNK
\r
95 #define QT_FILENO _fileno
\r
96 #define QT_OPEN ::_open
\r
97 #define QT_CLOSE ::_close
\r
98 #ifdef QT_LARGEFILE_SUPPORT
\r
99 #define QT_LSEEK ::_lseeki64
\r
101 #define QT_TSTAT ::_stati64
\r
103 #define QT_TSTAT ::_wstati64
\r
106 #define QT_LSEEK ::_lseek
\r
108 #define QT_TSTAT ::_stat
\r
110 #define QT_TSTAT ::_wstat
\r
113 #define QT_READ ::_read
\r
114 #define QT_WRITE ::_write
\r
115 #define QT_ACCESS ::_access
\r
116 #define QT_GETCWD ::_getcwd
\r
117 #define QT_CHDIR ::_chdir
\r
118 #define QT_MKDIR ::_mkdir
\r
119 #define QT_RMDIR ::_rmdir
\r
120 #define QT_OPEN_LARGEFILE 0
\r
121 #define QT_OPEN_RDONLY _O_RDONLY
\r
122 #define QT_OPEN_WRONLY _O_WRONLY
\r
123 #define QT_OPEN_RDWR _O_RDWR
\r
124 #define QT_OPEN_CREAT _O_CREAT
\r
125 #define QT_OPEN_TRUNC _O_TRUNC
\r
126 #define QT_OPEN_APPEND _O_APPEND
\r
127 #if defined(O_TEXT)
\r
128 # define QT_OPEN_TEXT _O_TEXT
\r
129 # define QT_OPEN_BINARY _O_BINARY
\r
132 #define QT_FOPEN ::fopen
\r
133 #ifdef QT_LARGEFILE_SUPPORT
\r
134 #define QT_FSEEK ::fseeko64
\r
135 #define QT_FTELL ::ftello64
\r
137 #define QT_FSEEK ::fseek
\r
138 #define QT_FTELL ::ftell
\r
140 #define QT_FGETPOS ::fgetpos
\r
141 #define QT_FSETPOS ::fsetpos
\r
142 #define QT_FPOS_T fpos_t
\r
143 #ifdef QT_LARGEFILE_SUPPORT
\r
144 #define QT_OFF_T off64_t
\r
146 #define QT_OFF_T long
\r
149 #define QT_SIGNAL_ARGS int
\r
151 #define QT_VSNPRINTF ::_vsnprintf
\r
152 #define QT_SNPRINTF ::_snprintf
\r
160 #endif // QPLATFORMDEFS_H
\r