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