Qt 4.8
qfunctions_nacl.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
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, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "qfunctions_nacl.h"
43 #include <pthread.h>
44 #include <qglobal.h>
45 
46 /*
47  The purpose of this file is to stub out certain functions
48  that are not provided by the Native Client SDK. This is
49  done as an alterative to sprinkling the Qt sources with
50  NACL ifdefs.
51 
52  There are two main classes of functions:
53 
54  - Functions that are called but can have no effect:
55  For these we simply give an empty implementation
56 
57  - Functions that are referenced in the source code, but
58  is not/must not be called at run-time:
59  These we either leave undefined or implement with a
60  qFatal.
61 
62  This is a work in progress.
63 */
64 
65 extern "C" {
66 
67 void pthread_cleanup_push(void (*)(void *), void *)
68 {
69 
70 }
71 
73 {
74 
75 }
76 
77 int pthread_setcancelstate(int, int *)
78 {
79  return 0;
80 }
81 
82 int pthread_setcanceltype(int, int *)
83 {
84  return 0;
85 }
86 
88 {
89 
90 }
91 
92 
93 int pthread_cancel(pthread_t)
94 {
95  return 0;
96 }
97 
98 int pthread_attr_setinheritsched(pthread_attr_t *,int)
99 {
100  return 0;
101 }
102 
103 
104 int pthread_attr_getinheritsched(const pthread_attr_t *, int *)
105 {
106  return 0;
107 }
108 
109 // event dispatcher, select
110 //struct fd_set;
111 //struct timeval;
112 
113 int fcntl(int, int, ...)
114 {
115  return 0;
116 }
117 
118 int sigaction(int, const struct sigaction *, struct sigaction *)
119 {
120  return 0;
121 }
122 
123 int open(const char *, int, ...)
124 {
125  return 0;
126 }
127 
128 int open64(const char *, int, ...)
129 {
130  return 0;
131 }
132 
133 int access(const char *, int)
134 {
135  return 0;
136 }
137 
138 typedef long off64_t;
139 off64_t ftello64(void *)
140 {
141  qFatal("ftello64 called");
142  return 0;
143 }
144 
145 off64_t lseek64(int, off_t, int)
146 {
147  qFatal("lseek64 called");
148  return 0;
149 }
150 
151 } // Extern C
152 
153 int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
154 {
155  return 0;
156 }
off64_t lseek64(int, off_t, int)
int open64(const char *, int,...)
int pthread_setcanceltype(int, int *)
void pthread_cleanup_pop(int)
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
off64_t ftello64(void *)
int pthread_cancel(pthread_t)
int access(const char *, int)
int pthread_setcancelstate(int, int *)
void pthread_testcancel(void)
Q_CORE_EXPORT void qFatal(const char *,...)
int fcntl(int, int,...)
void pthread_cleanup_push(void(*)(void *), void *)
int sigaction(int, const struct sigaction *, struct sigaction *)
long off64_t
int pthread_attr_getinheritsched(const pthread_attr_t *, int *)
int open(const char *, int,...)
int pthread_attr_setinheritsched(pthread_attr_t *, int)