1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** All rights reserved.
|
---|
5 | ** Contact: Nokia Corporation ([email protected])
|
---|
6 | **
|
---|
7 | ** Copyright (C) 2009 netlabs.org. OS/2 parts.
|
---|
8 | **
|
---|
9 | ** This file is part of the qmake spec of the Qt Toolkit.
|
---|
10 | **
|
---|
11 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
12 | ** Commercial Usage
|
---|
13 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
14 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
15 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
16 | ** a written agreement between you and Nokia.
|
---|
17 | **
|
---|
18 | ** GNU Lesser General Public License Usage
|
---|
19 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
20 | ** General Public License version 2.1 as published by the Free Software
|
---|
21 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
22 | ** packaging of this file. Please review the following information to
|
---|
23 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
24 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
25 | **
|
---|
26 | ** In addition, as a special exception, Nokia gives you certain additional
|
---|
27 | ** rights. These rights are described in the Nokia Qt LGPL Exception
|
---|
28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
---|
29 | **
|
---|
30 | ** GNU General Public License Usage
|
---|
31 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
32 | ** General Public License version 3.0 as published by the Free Software
|
---|
33 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
34 | ** packaging of this file. Please review the following information to
|
---|
35 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
36 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
37 | **
|
---|
38 | ** If you have questions regarding the use of this file, please contact
|
---|
39 | ** Nokia at [email protected].
|
---|
40 | ** $QT_END_LICENSE$
|
---|
41 | **
|
---|
42 | ****************************************************************************/
|
---|
43 |
|
---|
44 | #ifndef QPLATFORMDEFS_H
|
---|
45 | #define QPLATFORMDEFS_H
|
---|
46 |
|
---|
47 | // Get Qt defines/settings
|
---|
48 |
|
---|
49 | #include "qglobal.h"
|
---|
50 |
|
---|
51 | #include <io.h>
|
---|
52 | #include <stdio.h>
|
---|
53 | #include <fcntl.h>
|
---|
54 | #include <errno.h>
|
---|
55 | #include <sys/stat.h>
|
---|
56 | #include <sys/process.h>
|
---|
57 | #include <stdlib.h>
|
---|
58 |
|
---|
59 | // compiler-dependent network includes
|
---|
60 | #include <sys/socket.h>
|
---|
61 | #include <netinet/in.h>
|
---|
62 |
|
---|
63 | #define Q_FS_FAT
|
---|
64 | // @todo
|
---|
65 | //#ifdef QT_LARGEFILE_SUPPORT
|
---|
66 | // provide large file versions of functions?
|
---|
67 | //#endif
|
---|
68 | #define QT_STATBUF struct stat
|
---|
69 | #define QT_STATBUF4TSTAT struct stat
|
---|
70 | #define QT_STAT ::stat
|
---|
71 | #define QT_FSTAT ::fstat
|
---|
72 | #define QT_LSTAT ::lstat
|
---|
73 | #define QT_STAT_REG S_IFREG
|
---|
74 | #define QT_STAT_DIR S_IFDIR
|
---|
75 | #define QT_STAT_MASK S_IFMT
|
---|
76 | #if defined(_S_IFLNK)
|
---|
77 | # define QT_STAT_LNK S_IFLNK
|
---|
78 | #endif
|
---|
79 | #define QT_FILENO fileno
|
---|
80 | #define QT_OPEN ::open
|
---|
81 | #define QT_TRUNCATE ::truncate
|
---|
82 | #define QT_FTRUNCATE ::ftruncate
|
---|
83 | #define QT_CLOSE ::close
|
---|
84 | #define QT_LSEEK ::lseek
|
---|
85 | #define QT_READ ::read
|
---|
86 | #define QT_WRITE ::write
|
---|
87 | #define QT_ACCESS ::access
|
---|
88 | #define QT_GETCWD ::_getcwd2 // returns the drive letter with path
|
---|
89 | #define QT_CHDIR ::_chdir2 // change the current drive if present
|
---|
90 | #define QT_MKDIR(name) ::mkdir(name,0)
|
---|
91 | #define QT_RMDIR ::rmdir
|
---|
92 | #define QT_OPEN_LARGEFILE 0
|
---|
93 | #define QT_OPEN_RDONLY O_RDONLY
|
---|
94 | #define QT_OPEN_WRONLY O_WRONLY
|
---|
95 | #define QT_OPEN_RDWR O_RDWR
|
---|
96 | #define QT_OPEN_CREAT O_CREAT
|
---|
97 | #define QT_OPEN_TRUNC O_TRUNC
|
---|
98 | #define QT_OPEN_APPEND O_APPEND
|
---|
99 | #if defined(O_TEXT)
|
---|
100 | # define QT_OPEN_TEXT O_TEXT
|
---|
101 | # define QT_OPEN_BINARY O_BINARY
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | #define QT_FOPEN ::fopen
|
---|
105 | #define QT_FSEEK ::fseek
|
---|
106 | #define QT_FTELL ::ftell
|
---|
107 | #define QT_FGETPOS ::fgetpos
|
---|
108 | #define QT_FSETPOS ::fsetpos
|
---|
109 | #define QT_FPOS_T fpos_t
|
---|
110 | #define QT_OFF_T long
|
---|
111 |
|
---|
112 | #define QT_SIGNAL_ARGS int
|
---|
113 |
|
---|
114 | #define QT_VSNPRINTF ::vsnprintf
|
---|
115 | #define QT_SNPRINTF ::snprintf
|
---|
116 |
|
---|
117 | #endif // QPLATFORMDEFS_H
|
---|