Blender  V2.93
libc_compat.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2020 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 /* On Linux, precompiled libraries may be made with an glibc version that is
21  * incompatible with the system libraries that Blender is built on. To solve
22  * this we add a few -ffast-math symbols that can be missing. */
23 
24 #ifdef __linux__
25 # include <features.h>
26 # include <math.h>
27 
28 # if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
29 
30 double __exp_finite(double x);
31 double __exp2_finite(double x);
32 double __acos_finite(double x);
33 double __asin_finite(double x);
34 double __log2_finite(double x);
35 double __log10_finite(double x);
36 double __log_finite(double x);
37 double __pow_finite(double x, double y);
38 float __expf_finite(float x);
39 float __exp2f_finite(float x);
40 float __acosf_finite(float x);
41 float __asinf_finite(float x);
42 float __log2f_finite(float x);
43 float __log10f_finite(float x);
44 float __logf_finite(float x);
45 float __powf_finite(float x, float y);
46 
47 double __exp_finite(double x)
48 {
49  return exp(x);
50 }
51 
52 double __exp2_finite(double x)
53 {
54  return exp2(x);
55 }
56 
57 double __acos_finite(double x)
58 {
59  return acos(x);
60 }
61 
62 double __asin_finite(double x)
63 {
64  return asin(x);
65 }
66 
67 double __log2_finite(double x)
68 {
69  return log2(x);
70 }
71 
72 double __log10_finite(double x)
73 {
74  return log10(x);
75 }
76 
77 double __log_finite(double x)
78 {
79  return log(x);
80 }
81 
82 double __pow_finite(double x, double y)
83 {
84  return pow(x, y);
85 }
86 
87 float __expf_finite(float x)
88 {
89  return expf(x);
90 }
91 
92 float __exp2f_finite(float x)
93 {
94  return exp2f(x);
95 }
96 
97 float __acosf_finite(float x)
98 {
99  return acosf(x);
100 }
101 
102 float __asinf_finite(float x)
103 {
104  return asinf(x);
105 }
106 
107 float __log2f_finite(float x)
108 {
109  return log2f(x);
110 }
111 
112 float __log10f_finite(float x)
113 {
114  return log10f(x);
115 }
116 
117 float __logf_finite(float x)
118 {
119  return logf(x);
120 }
121 
122 float __powf_finite(float x, float y)
123 {
124  return powf(x, y);
125 }
126 
127 # endif /* __GLIBC_PREREQ */
128 #endif /* __linux__ */
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define logf(x)
#define expf(x)
#define powf(x, y)
#define asinf(x)
#define acosf(x)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
Definition: rall1d.h:359
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:303
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
Definition: rall1d.h:391
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
Definition: rall1d.h:399
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:295