source: branches/vendor/trolltech/qt/current/mkspecs/win32-g++/qplatformdefs.h @ 2

Last change on this file since 2 was 2, checked in by Dmitry A. Kuminov, 12 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 4.7 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 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** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file.  Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file.  Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at qt-sales@nokia.com.
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
55#include <tchar.h>
56#include <io.h>
57#include <direct.h>
58#include <stdio.h>
59#include <fcntl.h>
60#include <errno.h>
61#include <sys/stat.h>
62#include <stdlib.h>
63#include <windows.h>
64#include <limits.h>
65
66#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
67typedef enum {
68    NameUnknown           = 0, 
69    NameFullyQualifiedDN  = 1, 
70    NameSamCompatible     = 2, 
71    NameDisplay           = 3, 
72    NameUniqueId          = 6, 
73    NameCanonical         = 7, 
74    NameUserPrincipal     = 8, 
75    NameCanonicalEx       = 9, 
76    NameServicePrincipal  = 10, 
77    NameDnsDomain         = 12
78} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
79#endif
80
81#define Q_FS_FAT
82#ifdef QT_LARGEFILE_SUPPORT
83#define QT_STATBUF              struct _stati64         // non-ANSI defs
84#define QT_STATBUF4TSTAT        struct _stati64         // non-ANSI defs
85#define QT_STAT                 ::_stati64
86#define QT_FSTAT                ::_fstati64
87#else
88#define QT_STATBUF              struct _stat            // non-ANSI defs
89#define QT_STATBUF4TSTAT        struct _stat            // non-ANSI defs
90#define QT_STAT                 ::_stat
91#define QT_FSTAT                ::_fstat
92#endif
93#define QT_STAT_REG             _S_IFREG
94#define QT_STAT_DIR             _S_IFDIR
95#define QT_STAT_MASK            _S_IFMT
96#if defined(_S_IFLNK)
97#  define QT_STAT_LNK           _S_IFLNK
98#endif
99#define QT_FILENO               _fileno
100#define QT_OPEN                 ::_open
101#define QT_CLOSE                ::_close
102#ifdef QT_LARGEFILE_SUPPORT
103#define QT_LSEEK                ::_lseeki64
104#ifndef UNICODE
105#define QT_TSTAT                ::_stati64
106#else
107#define QT_TSTAT                ::_wstati64
108#endif
109#else
110#define QT_LSEEK                ::_lseek
111#ifndef UNICODE
112#define QT_TSTAT                ::_stat
113#else
114#define QT_TSTAT                ::_wstat
115#endif
116#endif
117#define QT_READ                 ::_read
118#define QT_WRITE                ::_write
119#define QT_ACCESS               ::_access
120#define QT_GETCWD               ::_getcwd
121#define QT_CHDIR                ::_chdir
122#define QT_MKDIR                ::_mkdir
123#define QT_RMDIR                ::_rmdir
124#define QT_OPEN_LARGEFILE       0
125#define QT_OPEN_RDONLY          _O_RDONLY
126#define QT_OPEN_WRONLY          _O_WRONLY
127#define QT_OPEN_RDWR            _O_RDWR
128#define QT_OPEN_CREAT           _O_CREAT
129#define QT_OPEN_TRUNC           _O_TRUNC
130#define QT_OPEN_APPEND          _O_APPEND
131#if defined(O_TEXT)
132# define QT_OPEN_TEXT           _O_TEXT
133# define QT_OPEN_BINARY         _O_BINARY
134#endif
135
136#define QT_FOPEN                ::fopen
137#ifdef QT_LARGEFILE_SUPPORT
138#define QT_FSEEK                ::fseeko64
139#define QT_FTELL                ::ftello64
140#else
141#define QT_FSEEK                ::fseek
142#define QT_FTELL                ::ftell
143#endif
144#define QT_FGETPOS              ::fgetpos
145#define QT_FSETPOS              ::fsetpos
146#define QT_FPOS_T               fpos_t
147#ifdef QT_LARGEFILE_SUPPORT
148#define QT_OFF_T                off64_t
149#else
150#define QT_OFF_T                long
151#endif
152
153#define QT_SIGNAL_ARGS          int
154
155#define QT_VSNPRINTF            ::_vsnprintf
156#define QT_SNPRINTF             ::_snprintf
157
158# define F_OK   0
159# define X_OK   1
160# define W_OK   2
161# define R_OK   4
162
163
164#endif // QPLATFORMDEFS_H
Note: See TracBrowser for help on using the repository browser.