c@261
|
1 /****************************************************************************
|
c@261
|
2 **
|
c@261
|
3 ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
c@261
|
4 **
|
c@261
|
5 ** This file is part of the qmake spec of the Qt Toolkit.
|
c@261
|
6 **
|
c@261
|
7 ** This file may be used under the terms of the GNU General Public
|
c@261
|
8 ** License version 2.0 as published by the Free Software Foundation
|
c@261
|
9 ** and appearing in the file LICENSE.GPL included in the packaging of
|
c@261
|
10 ** this file. Please review the following information to ensure GNU
|
c@261
|
11 ** General Public Licensing requirements will be met:
|
c@261
|
12 ** http://www.trolltech.com/products/qt/opensource.html
|
c@261
|
13 **
|
c@261
|
14 ** If you are unsure which license is appropriate for your use, please
|
c@261
|
15 ** review the following information:
|
c@261
|
16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
|
c@261
|
17 ** sales department at sales@trolltech.com.
|
c@261
|
18 **
|
c@261
|
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
c@261
|
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
c@261
|
21 **
|
c@261
|
22 ****************************************************************************/
|
c@261
|
23
|
c@261
|
24 #ifndef QPLATFORMDEFS_H
|
c@261
|
25 #define QPLATFORMDEFS_H
|
c@261
|
26
|
c@261
|
27 #ifdef UNICODE
|
c@261
|
28 #ifndef _UNICODE
|
c@261
|
29 #define _UNICODE
|
c@261
|
30 #endif
|
c@261
|
31 #endif
|
c@261
|
32
|
c@261
|
33 // Get Qt defines/settings
|
c@261
|
34
|
c@261
|
35 #include "qglobal.h"
|
c@261
|
36
|
c@261
|
37 #include <tchar.h>
|
c@261
|
38 #include <io.h>
|
c@261
|
39 #include <direct.h>
|
c@261
|
40 #include <stdio.h>
|
c@261
|
41 #include <fcntl.h>
|
c@261
|
42 #include <errno.h>
|
c@261
|
43 #include <sys/stat.h>
|
c@261
|
44 #include <stdlib.h>
|
c@261
|
45 #include <windows.h>
|
c@261
|
46 #include <limits.h>
|
c@261
|
47
|
c@261
|
48 #if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
|
c@261
|
49 typedef enum {
|
c@261
|
50 NameUnknown = 0,
|
c@261
|
51 NameFullyQualifiedDN = 1,
|
c@261
|
52 NameSamCompatible = 2,
|
c@261
|
53 NameDisplay = 3,
|
c@261
|
54 NameUniqueId = 6,
|
c@261
|
55 NameCanonical = 7,
|
c@261
|
56 NameUserPrincipal = 8,
|
c@261
|
57 NameCanonicalEx = 9,
|
c@261
|
58 NameServicePrincipal = 10,
|
c@261
|
59 NameDnsDomain = 12
|
c@261
|
60 } EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
|
c@261
|
61 #endif
|
c@261
|
62
|
c@261
|
63 #define Q_FS_FAT
|
c@261
|
64 #ifdef QT_LARGEFILE_SUPPORT
|
c@261
|
65 #define QT_STATBUF struct _stati64 // non-ANSI defs
|
c@261
|
66 #define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
|
c@261
|
67 #define QT_STAT ::_stati64
|
c@261
|
68 #define QT_FSTAT ::_fstati64
|
c@261
|
69 #else
|
c@261
|
70 #define QT_STATBUF struct _stat // non-ANSI defs
|
c@261
|
71 #define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
|
c@261
|
72 #define QT_STAT ::_stat
|
c@261
|
73 #define QT_FSTAT ::_fstat
|
c@261
|
74 #endif
|
c@261
|
75 #define QT_STAT_REG _S_IFREG
|
c@261
|
76 #define QT_STAT_DIR _S_IFDIR
|
c@261
|
77 #define QT_STAT_MASK _S_IFMT
|
c@261
|
78 #if defined(_S_IFLNK)
|
c@261
|
79 # define QT_STAT_LNK _S_IFLNK
|
c@261
|
80 #endif
|
c@261
|
81 #define QT_FILENO _fileno
|
c@261
|
82 #define QT_OPEN ::_open
|
c@261
|
83 #define QT_CLOSE ::_close
|
c@261
|
84 #ifdef QT_LARGEFILE_SUPPORT
|
c@261
|
85 #define QT_LSEEK ::_lseeki64
|
c@261
|
86 #ifndef UNICODE
|
c@261
|
87 #define QT_TSTAT ::_stati64
|
c@261
|
88 #else
|
c@261
|
89 #define QT_TSTAT ::_wstati64
|
c@261
|
90 #endif
|
c@261
|
91 #else
|
c@261
|
92 #define QT_LSEEK ::_lseek
|
c@261
|
93 #ifndef UNICODE
|
c@261
|
94 #define QT_TSTAT ::_stat
|
c@261
|
95 #else
|
c@261
|
96 #define QT_TSTAT ::_wstat
|
c@261
|
97 #endif
|
c@261
|
98 #endif
|
c@261
|
99 #define QT_READ ::_read
|
c@261
|
100 #define QT_WRITE ::_write
|
c@261
|
101 #define QT_ACCESS ::_access
|
c@261
|
102 #define QT_GETCWD ::_getcwd
|
c@261
|
103 #define QT_CHDIR ::_chdir
|
c@261
|
104 #define QT_MKDIR ::_mkdir
|
c@261
|
105 #define QT_RMDIR ::_rmdir
|
c@261
|
106 #define QT_OPEN_LARGEFILE 0
|
c@261
|
107 #define QT_OPEN_RDONLY _O_RDONLY
|
c@261
|
108 #define QT_OPEN_WRONLY _O_WRONLY
|
c@261
|
109 #define QT_OPEN_RDWR _O_RDWR
|
c@261
|
110 #define QT_OPEN_CREAT _O_CREAT
|
c@261
|
111 #define QT_OPEN_TRUNC _O_TRUNC
|
c@261
|
112 #define QT_OPEN_APPEND _O_APPEND
|
c@261
|
113 #if defined(O_TEXT)
|
c@261
|
114 # define QT_OPEN_TEXT _O_TEXT
|
c@261
|
115 # define QT_OPEN_BINARY _O_BINARY
|
c@261
|
116 #endif
|
c@261
|
117
|
c@261
|
118 #define QT_FOPEN ::fopen
|
c@261
|
119 #ifdef QT_LARGEFILE_SUPPORT
|
c@261
|
120 #define QT_FSEEK ::fseeko64
|
c@261
|
121 #define QT_FTELL ::ftello64
|
c@261
|
122 #else
|
c@261
|
123 #define QT_FSEEK ::fseek
|
c@261
|
124 #define QT_FTELL ::ftell
|
c@261
|
125 #endif
|
c@261
|
126 #define QT_FGETPOS ::fgetpos
|
c@261
|
127 #define QT_FSETPOS ::fsetpos
|
c@261
|
128 #define QT_FPOS_T fpos_t
|
c@261
|
129 #ifdef QT_LARGEFILE_SUPPORT
|
c@261
|
130 #define QT_OFF_T off64_t
|
c@261
|
131 #else
|
c@261
|
132 #define QT_OFF_T long
|
c@261
|
133 #endif
|
c@261
|
134
|
c@261
|
135 #define QT_SIGNAL_ARGS int
|
c@261
|
136
|
c@261
|
137 #define QT_VSNPRINTF ::_vsnprintf
|
c@261
|
138 #define QT_SNPRINTF ::_snprintf
|
c@261
|
139
|
c@261
|
140 # define F_OK 0
|
c@261
|
141 # define X_OK 1
|
c@261
|
142 # define W_OK 2
|
c@261
|
143 # define R_OK 4
|
c@261
|
144
|
c@261
|
145
|
c@261
|
146 #endif // QPLATFORMDEFS_H
|