1 #ifndef QPLATFORMDEFS_H
2 #define QPLATFORMDEFS_H
3 
4 #ifdef UNICODE
5 #ifndef _UNICODE
6 #define _UNICODE
7 #endif
8 #endif
9 
10 // Get Qt defines/settings
11 
12 #include "qglobal.h"
13 
14 #include <tchar.h>
15 #include <io.h>
16 #include <direct.h>
17 #include <stdio.h>
18 #include <fcntl.h>
19 #include <errno.h>
20 #include <sys/stat.h>
21 #include <stdlib.h>
22 #include <windows.h>
23 
24 #if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
25 typedef enum {
26     NameUnknown		  = 0,
27     NameFullyQualifiedDN  = 1,
28     NameSamCompatible	  = 2,
29     NameDisplay		  = 3,
30     NameUniqueId	  = 6,
31     NameCanonical	  = 7,
32     NameUserPrincipal	  = 8,
33     NameCanonicalEx	  = 9,
34     NameServicePrincipal  = 10,
35     NameDnsDomain	  = 12
36 } EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
37 #endif
38 
39 #define Q_FS_FAT
40 #ifdef QT_LARGEFILE_SUPPORT
41 #define QT_STATBUF		struct _stati64		// non-ANSI defs
42 #define QT_STATBUF4TSTAT	struct _stati64		// non-ANSI defs
43 #define QT_STAT			::_stati64
44 #define QT_FSTAT		::_fstati64
45 #else
46 #define QT_STATBUF		struct _stat		// non-ANSI defs
47 #define QT_STATBUF4TSTAT	struct _stat		// non-ANSI defs
48 #define QT_STAT			::_stat
49 #define QT_FSTAT		::_fstat
50 #endif
51 #define QT_STAT_REG		_S_IFREG
52 #define QT_STAT_DIR		_S_IFDIR
53 #define QT_STAT_MASK		_S_IFMT
54 #if defined(_S_IFLNK)
55 #  define QT_STAT_LNK		_S_IFLNK
56 #endif
57 #define QT_FILENO		_fileno
58 #define QT_OPEN			::_open
59 #define QT_CLOSE		::_close
60 #ifdef QT_LARGEFILE_SUPPORT
61 #define QT_LSEEK		::_lseeki64
62 #define QT_TSTAT		::_tstati64
63 #else
64 #define QT_LSEEK		::_lseek
65 #define QT_TSTAT		::_tstat
66 #endif
67 #define QT_READ			::_read
68 #define QT_WRITE		::_write
69 #define QT_ACCESS		::_access
70 #define QT_GETCWD		::_getcwd
71 #define QT_CHDIR		::_chdir
72 #define QT_MKDIR		::_mkdir
73 #define QT_RMDIR		::_rmdir
74 #define QT_OPEN_RDONLY		_O_RDONLY
75 #define QT_OPEN_WRONLY		_O_WRONLY
76 #define QT_OPEN_RDWR		_O_RDWR
77 #define QT_OPEN_CREAT		_O_CREAT
78 #define QT_OPEN_TRUNC		_O_TRUNC
79 #define QT_OPEN_APPEND		_O_APPEND
80 #if defined(O_TEXT)
81 # define QT_OPEN_TEXT		_O_TEXT
82 # define QT_OPEN_BINARY		_O_BINARY
83 #endif
84 
85 #define QT_SIGNAL_ARGS		int
86 
87 #define QT_VSNPRINTF		::_vsnprintf
88 #define QT_SNPRINTF		::_snprintf
89 
90 # define F_OK	0
91 # define X_OK	1
92 # define W_OK	2
93 # define R_OK	4
94 
95 
96 #endif // QPLATFORMDEFS_H
97