1 | #ifndef QPLATFORMDEFS_H
|
---|
2 | #define QPLATFORMDEFS_H
|
---|
3 |
|
---|
4 | // Get Qt defines/settings
|
---|
5 |
|
---|
6 | #include "qglobal.h"
|
---|
7 |
|
---|
8 | #include <io.h>
|
---|
9 | #include <stdio.h>
|
---|
10 | #include <fcntl.h>
|
---|
11 | #include <errno.h>
|
---|
12 | #include <sys/stat.h>
|
---|
13 | #include <stdlib.h>
|
---|
14 |
|
---|
15 | #define Q_FS_FAT
|
---|
16 | /// @todo (dmik) remove?
|
---|
17 | //#ifdef QT_LARGEFILE_SUPPORT
|
---|
18 | //#define QT_STATBUF struct _stati64 // non-ANSI defs
|
---|
19 | //#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
|
---|
20 | //#define QT_STAT ::_stati64
|
---|
21 | //#define QT_FSTAT ::_fstati64
|
---|
22 | //#else
|
---|
23 | #define QT_STATBUF struct stat
|
---|
24 | #define QT_STATBUF4TSTAT struct stat
|
---|
25 | #define QT_STAT ::stat
|
---|
26 | #define QT_FSTAT ::fstat
|
---|
27 | //#endif
|
---|
28 | #define QT_STAT_REG S_IFREG
|
---|
29 | #define QT_STAT_DIR S_IFDIR
|
---|
30 | #define QT_STAT_MASK S_IFMT
|
---|
31 | #if defined(S_IFLNK)
|
---|
32 | # define QT_STAT_LNK S_IFLNK
|
---|
33 | #endif
|
---|
34 | #define QT_FILENO fileno
|
---|
35 | #define QT_OPEN ::open
|
---|
36 | #define QT_CLOSE ::close
|
---|
37 | /// @todo (dmik) remove?
|
---|
38 | //#ifdef QT_LARGEFILE_SUPPORT
|
---|
39 | //#define QT_LSEEK ::lseeki64
|
---|
40 | //#define QT_TSTAT ::tstati64
|
---|
41 | //#else
|
---|
42 | #define QT_LSEEK ::lseek
|
---|
43 | #define QT_TSTAT ::tstat
|
---|
44 | //#endif
|
---|
45 | #define QT_READ ::read
|
---|
46 | #define QT_WRITE ::write
|
---|
47 | #define QT_ACCESS ::access
|
---|
48 | // QT_GETCWD must return the drive letter with the path
|
---|
49 | #define QT_GETCWD ::_getcwd2
|
---|
50 | // QT_CHDIR should change the current drive if present in the path
|
---|
51 | #define QT_CHDIR ::_chdir2
|
---|
52 | #define QT_MKDIR(name) ::mkdir(name,0777)
|
---|
53 | #define QT_RMDIR ::rmdir
|
---|
54 | #define QT_OPEN_RDONLY O_RDONLY
|
---|
55 | #define QT_OPEN_WRONLY O_WRONLY
|
---|
56 | #define QT_OPEN_RDWR O_RDWR
|
---|
57 | #define QT_OPEN_CREAT O_CREAT
|
---|
58 | #define QT_OPEN_TRUNC O_TRUNC
|
---|
59 | #define QT_OPEN_APPEND O_APPEND
|
---|
60 | #if defined(O_TEXT)
|
---|
61 | # define QT_OPEN_TEXT O_TEXT
|
---|
62 | # define QT_OPEN_BINARY O_BINARY
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | #define QT_SIGNAL_ARGS int
|
---|
66 | /// @todo (dmik) find where these are used
|
---|
67 | //#define QT_SIGNAL_RETTYPE void
|
---|
68 | //#define QT_SIGNAL_IGNORE SIG_IGN
|
---|
69 |
|
---|
70 | #define QT_VSNPRINTF ::vsnprintf
|
---|
71 | #define QT_SNPRINTF ::snprintf
|
---|
72 |
|
---|
73 | #endif // QPLATFORMDEFS_H
|
---|