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