source: trunk/mkspecs/os2-g++/qplatformdefs.h@ 202

Last change on this file since 202 was 155, checked in by Dmitry A. Kuminov, 16 years ago

os2-g++/qplatformdefs.h: Added missing network definitions.

File size: 3.9 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** Copyright (C) 2009 netlabs.org. OS/2 parts.
7**
8** This file is part of the qmake spec of the Qt Toolkit.
9**
10** $QT_BEGIN_LICENSE:LGPL$
11** Commercial Usage
12** Licensees holding valid Qt Commercial licenses may use this file in
13** accordance with the Qt Commercial License Agreement provided with the
14** Software or, alternatively, in accordance with the terms contained in
15** a written agreement between you and Nokia.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 2.1 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 2.1 requirements
23** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24**
25** In addition, as a special exception, Nokia gives you certain
26** additional rights. These rights are described in the Nokia Qt LGPL
27** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
28** 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 are unsure which license is appropriate for your use, please
39** contact the sales department 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#define QT_SOCKET_CONNECT ::connect
118#define QT_SOCKET_BIND ::bind
119#define QT_SOCKLEN_T int
120
121#endif // QPLATFORMDEFS_H
Note: See TracBrowser for help on using the repository browser.