author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 15:10:48 +0300 | |
changeset 30 | 5dc02b23752f |
parent 18 | 2f34d5167611 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the qmake spec of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#ifndef QPLATFORMDEFS_H |
|
43 |
#define QPLATFORMDEFS_H |
|
44 |
||
45 |
#ifdef UNICODE |
|
46 |
#ifndef _UNICODE |
|
47 |
#define _UNICODE |
|
48 |
#endif |
|
49 |
#endif |
|
50 |
||
51 |
// Get Qt defines/settings |
|
52 |
||
53 |
#include "qglobal.h" |
|
54 |
#define Q_FS_FAT |
|
55 |
||
56 |
#define _POSIX_ |
|
57 |
#include <limits.h> |
|
58 |
#undef _POSIX_ |
|
59 |
||
60 |
#include <tchar.h> |
|
61 |
#include <io.h> |
|
62 |
#include <direct.h> |
|
63 |
#include <stdio.h> |
|
64 |
#include <fcntl.h> |
|
65 |
#include <errno.h> |
|
66 |
#include <sys/stat.h> |
|
67 |
#include <dos.h> |
|
68 |
#include <stdlib.h> |
|
69 |
#include <search.h> |
|
70 |
#include <windows.h> |
|
71 |
||
72 |
#if __BORLANDC__ >= 0x550 |
|
73 |
// Borland Builder 6 |
|
74 |
||
75 |
#ifdef QT_LARGEFILE_SUPPORT |
|
76 |
# define QT_STATBUF struct stati64 // non-ANSI defs |
|
77 |
# define QT_STATBUF4TSTAT struct stati64 // non-ANSI defs |
|
78 |
# define QT_STAT ::_stati64 |
|
79 |
# define QT_FSTAT ::fstati64 |
|
80 |
# define QT_LSEEK ::_lseeki64 |
|
81 |
# define QT_TSTAT ::_tstati64 |
|
82 |
#else |
|
83 |
# define QT_STATBUF struct stat // non-ANSI defs |
|
84 |
# define QT_STATBUF4TSTAT struct _stat // non-ANSI defs |
|
85 |
# define QT_STAT ::stat |
|
86 |
# define QT_FSTAT ::fstat |
|
87 |
# define QT_LSEEK ::_lseek |
|
88 |
# define QT_TSTAT ::_tstat |
|
89 |
#endif |
|
90 |
||
91 |
#define QT_STAT_REG _S_IFREG |
|
92 |
#define QT_STAT_DIR _S_IFDIR |
|
93 |
#define QT_STAT_MASK _S_IFMT |
|
94 |
||
95 |
#if defined(_S_IFLNK) |
|
96 |
# define QT_STAT_LNK _S_IFLNK |
|
97 |
#endif |
|
98 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
99 |
#include "../common/c89/qplatformdefs.h" |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
100 |
|
0 | 101 |
#ifdef QT_LARGEFILE_SUPPORT |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
102 |
#undef QT_FSEEK |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
103 |
#undef QT_FTELL |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
104 |
#undef QT_OFF_T |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
105 |
|
0 | 106 |
#define QT_FSEEK ::_fseeki64 |
107 |
#define QT_FTELL ::_ftelli64 |
|
108 |
#define QT_OFF_T __int64 |
|
109 |
#endif |
|
110 |
||
111 |
#define QT_FILENO _fileno |
|
112 |
#define QT_OPEN ::open |
|
113 |
#define QT_CLOSE ::_close |
|
114 |
||
115 |
#define QT_READ ::_read |
|
116 |
#define QT_WRITE ::_write |
|
117 |
#define QT_ACCESS ::_access |
|
118 |
#define QT_GETCWD ::_getcwd |
|
119 |
#define QT_CHDIR ::chdir |
|
120 |
#define QT_MKDIR ::_mkdir |
|
121 |
#define QT_RMDIR ::_rmdir |
|
122 |
#define QT_OPEN_LARGEFILE O_LARGEFILE |
|
123 |
#define QT_OPEN_RDONLY _O_RDONLY |
|
124 |
#define QT_OPEN_WRONLY _O_WRONLY |
|
125 |
#define QT_OPEN_RDWR _O_RDWR |
|
126 |
#define QT_OPEN_CREAT _O_CREAT |
|
127 |
#define QT_OPEN_TRUNC _O_TRUNC |
|
128 |
#define QT_OPEN_APPEND _O_APPEND |
|
129 |
||
130 |
#if defined(O_TEXT) |
|
131 |
# define QT_OPEN_TEXT _O_TEXT |
|
132 |
# define QT_OPEN_BINARY _O_BINARY |
|
133 |
#endif |
|
134 |
||
135 |
#else |
|
136 |
// Borland Builder 5 |
|
137 |
||
138 |
#ifdef QT_LARGEFILE_SUPPORT |
|
139 |
# define QT_STATBUF struct stati64 // non-ANSI defs |
|
140 |
# define QT_STATBUF4TSTAT struct stati64 // non-ANSI defs |
|
141 |
# define QT_STAT ::stati64 |
|
142 |
# define QT_FSTAT ::fstati64 |
|
143 |
# define QT_LSEEK ::lseeki64 |
|
144 |
# define QT_TSTAT ::tstati64 |
|
145 |
#else |
|
146 |
# define QT_STATBUF struct stat // non-ANSI defs |
|
147 |
# define QT_STATBUF4TSTAT struct stat // non-ANSI defs |
|
148 |
# define QT_STAT ::stat |
|
149 |
# define QT_FSTAT ::fstat |
|
150 |
# define QT_LSEEK ::lseek |
|
151 |
# define QT_TSTAT ::tstat |
|
152 |
#endif |
|
153 |
||
154 |
#define QT_STAT_REG S_IFREG |
|
155 |
#define QT_STAT_DIR S_IFDIR |
|
156 |
#define QT_STAT_MASK S_IFMT |
|
157 |
||
158 |
#if defined(S_IFLNK) |
|
159 |
# define QT_STAT_LNK S_IFLNK |
|
160 |
#endif |
|
161 |
||
162 |
#define QT_FILENO fileno |
|
163 |
#define QT_OPEN ::open |
|
164 |
#define QT_CLOSE ::close |
|
165 |
||
166 |
#define QT_READ ::read |
|
167 |
#define QT_WRITE ::write |
|
168 |
#define QT_ACCESS ::access |
|
169 |
||
170 |
#if defined(Q_OS_OS2EMX) |
|
171 |
// This is documented in the un*x to OS/2-EMX Porting FAQ: |
|
172 |
// http://homepages.tu-darmstadt.de/~st002279/os2/porting.html |
|
173 |
# define QT_GETCWD ::_getcwd2 |
|
174 |
# define QT_CHDIR ::_chdir2 |
|
175 |
#else |
|
176 |
# define QT_GETCWD ::getcwd |
|
177 |
# define QT_CHDIR ::chdir |
|
178 |
#endif |
|
179 |
||
180 |
#define QT_MKDIR ::mkdir |
|
181 |
#define QT_RMDIR ::rmdir |
|
182 |
#define QT_OPEN_LARGEFILE O_LARGEFILE |
|
183 |
#define QT_OPEN_RDONLY O_RDONLY |
|
184 |
#define QT_OPEN_WRONLY O_WRONLY |
|
185 |
#define QT_OPEN_RDWR O_RDWR |
|
186 |
#define QT_OPEN_CREAT O_CREAT |
|
187 |
#define QT_OPEN_TRUNC O_TRUNC |
|
188 |
#define QT_OPEN_APPEND O_APPEND |
|
189 |
||
190 |
#if defined(O_TEXT) |
|
191 |
# define QT_OPEN_TEXT O_TEXT |
|
192 |
# define QT_OPEN_BINARY O_BINARY |
|
193 |
#endif |
|
194 |
||
195 |
#endif // __BORLANDC__ >= 0x550 |
|
196 |
||
197 |
// Borland Builder 5 and 6 |
|
198 |
||
199 |
#define QT_SIGNAL_ARGS int |
|
200 |
||
201 |
#define QT_VSNPRINTF ::_vsnprintf |
|
202 |
#define QT_SNPRINTF ::_snprintf |
|
203 |
||
204 |
# define F_OK 0 |
|
205 |
# define X_OK 1 |
|
206 |
# define W_OK 2 |
|
207 |
# define R_OK 4 |
|
208 |
||
209 |
||
210 |
#endif // QPLATFORMDEFS_H |