Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qfunctions_vxworks.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#ifndef QFUNCTIONS_VXWORKS_H
5
#define QFUNCTIONS_VXWORKS_H
6
7
#include <QtCore/qglobal.h>
8
9
#ifdef Q_OS_VXWORKS
10
11
#include <unistd.h>
12
#include <pthread.h>
13
#include <dirent.h>
14
#include <signal.h>
15
#include <string.h>
16
#include <strings.h>
17
#include <errno.h>
18
#include <sys/types.h>
19
#include <sys/ioctl.h>
20
#if defined(_WRS_KERNEL)
21
#include <sys/times.h>
22
#else
23
#include <sys/time.h>
24
#endif
25
#include <sys/socket.h>
26
#include <sys/stat.h>
27
#include <sys/wait.h>
28
#include <netinet/in.h>
29
30
// VxWorks has public header mbuf.h which defines following variables for DKM.
31
// Let's undef those to because they overlap with Qt variable names-
32
// File mbuf.h is included in headers <netinet/in.h> <net/if.h>, so make sure
33
// that those are included before undef's.
34
#if defined(mbuf)
35
# undef mbuf
36
#endif
37
#if defined(m_data)
38
# undef m_data
39
#endif
40
#if defined(m_type)
41
# undef m_type
42
#endif
43
#if defined(m_next)
44
# undef m_next
45
#endif
46
#if defined(m_len)
47
# undef m_len
48
#endif
49
#if defined(m_flags)
50
# undef m_flags
51
#endif
52
#if defined(m_hdr)
53
# undef m_hdr
54
#endif
55
#if defined(m_ext)
56
# undef m_ext
57
#endif
58
#if defined(m_act)
59
# undef m_act
60
#endif
61
#if defined(m_nextpkt)
62
# undef m_nextpkt
63
#endif
64
#if defined(m_pkthdr)
65
# undef m_pkthdr
66
#endif
67
68
QT_BEGIN_NAMESPACE
69
70
#ifdef QT_BUILD_CORE_LIB
71
#endif
72
73
QT_END_NAMESPACE
74
75
#ifndef RTLD_LOCAL
76
#define RTLD_LOCAL 0
77
#endif
78
79
#ifndef NSIG
80
#define NSIG _NSIGS
81
#endif
82
83
#ifdef __cplusplus
84
extern
"C"
{
85
#endif
86
87
// isascii is missing (sometimes!!)
88
#ifndef isascii
89
inline
int
isascii(
int
c
) {
return
(
c
& 0x7f); }
90
#endif
91
92
// no lfind() - used by the TIF image format
93
void
*lfind(
const
void
*
key
,
const
void
*
base
,
size_t
*
elements
,
size_t
size
,
94
int
(*
compare
)(
const
void
*,
const
void
*));
95
96
// no rand_r(), but rand()
97
// NOTE: this implementation is wrong for multi threaded applications,
98
// but there is no way to get it right on VxWorks (in kernel mode)
99
#if defined(_WRS_KERNEL)
100
int
rand_r(
unsigned
int
*
/*seedp*/
);
101
#endif
102
103
// no usleep() support
104
int
usleep(
unsigned
int
);
105
106
#if defined(VXWORKS_DKM) || defined(VXWORKS_RTP)
107
int
gettimeofday(
struct
timeval *,
void
*);
108
#else
109
// gettimeofday() is declared, but is missing from the library.
110
// It IS however defined in the Curtis-Wright X11 libraries, so
111
// we have to make the symbol 'weak'
112
int
gettimeofday(
struct
timeval *tv,
void
/*struct timezone*/
*)
__attribute__
((weak));
113
#endif
114
115
// getpagesize() not available
116
int
getpagesize();
117
118
// symlinks are not supported (lstat is now just a call to stat - see qplatformdefs.h)
119
int
symlink(
const
char
*,
const
char
*);
120
ssize_t readlink(
const
char
*,
char
*,
size_t
);
121
122
// there's no truncate(), but ftruncate() support...
123
int
truncate(
const
char
*
path
, off_t
length
);
124
125
// VxWorks doesn't know about passwd & friends.
126
// in order to avoid patching the unix fs path everywhere
127
// we introduce some dummy functions that simulate a single
128
// 'root' user on the system.
129
130
uid_t getuid();
131
gid_t getgid();
132
uid_t geteuid();
133
134
struct
passwd {
135
char
*pw_name;
/* user name */
136
char
*pw_passwd;
/* user password */
137
uid_t pw_uid;
/* user ID */
138
gid_t pw_gid;
/* group ID */
139
char
*pw_gecos;
/* real name */
140
char
*pw_dir;
/* home directory */
141
char
*pw_shell;
/* shell program */
142
};
143
144
struct
group
{
145
char
*gr_name;
/* group name */
146
char
*gr_passwd;
/* group password */
147
gid_t gr_gid;
/* group ID */
148
char
**gr_mem;
/* group members */
149
};
150
151
struct
passwd *getpwuid(uid_t uid);
152
struct
group
*getgrgid(gid_t gid);
153
154
#ifdef __cplusplus
155
}
// extern "C"
156
#endif
157
158
#endif
// Q_OS_VXWORKS
159
#endif
// QFUNCTIONS_VXWORKS_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
key
GLuint64 key
Definition
qopengles2ext.h:2268
size
GLenum GLuint GLintptr GLsizeiptr size
[1]
Definition
qopengles2ext.h:660
length
GLenum GLuint GLenum GLsizei length
Definition
qopengles2ext.h:151
group
GLboolean GLuint group
Definition
qopengles2ext.h:855
c
const GLubyte * c
Definition
qopenglext.h:12701
path
GLsizei const GLchar *const * path
Definition
qopenglext.h:4283
elements
static const QTextHtmlElement elements[Html_NumElements]
Definition
qtexthtmlparser.cpp:354
compare
static int compare(quint64 a, quint64 b)
Definition
qtriangulator.cpp:68
base
QString base
Definition
src_corelib_io_qfileinfo.cpp:49
__attribute__
Definition
bluez_data_p.h:99
qtbase
src
corelib
kernel
qfunctions_vxworks.h
Generated by
1.9.7