summaryrefslogtreecommitdiffstats
path: root/include/c99_math.h
Commit message (Collapse)AuthorAgeFilesLines
* math: Import isinf and others to global namespacePierre Moreau2016-04-181-0/+23
| | | | | | | | | | | | | | | | | | | Starting from C++11, several math functions, like isinf, moved into the std namespace. Since cmath undefines those functions before redefining them inside the namespace, and glibc 2.23 defines the C variants as macros, the C variants in global namespace are not accessible any longer. v2: Move the fix outside of Nouveau, as suggested by Jose Fonseca, since anyone might need it when GCC switches to C++14 by default with GCC 6.0. v3: * Put the code directly inside c99_math.h rather than creating a new header file, as asked by Jose Fonseca; * Guard the code behind glibc version checks, as only glibc > =2.23 defines isinf & co. as functions, as suggested by Jose Fonseca. Signed-off-by: Pierre Moreau <[email protected]> Signed-off-by: Jose Fonseca <[email protected]>
* include,gallium: Remove pre-MSVC 2013 compatibility.Jose Fonseca2016-02-111-44/+5
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* c99_math: (trivial) implement exp2 for MSVC tooRoland Scheidegger2015-07-291-0/+6
| | | | Unsurprisingly doesn't build otherwise with old msvc.
* c99_math: Implement exp2f for MSVC.Matt Turner2015-07-291-0/+6
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium: fix gcc compile errors when using _XOPEN_SOURCE=600 but not std=c99Jose Fonseca2015-04-031-1/+6
| | | | | | The fpclassify stuff either needs std=c99 or _XOPEN_SOURCE=600 passed to gcc, but when using the latter the lrint family of function will be defined too.
* c99_math: Don't reimplement lrint and friends on MSVC 2013.Jose Fonseca2015-03-251-1/+2
| | | | | | | | MSVC 2013 declares these functions, both for C and C++ source files. This was caught with MSVC in analyze mode. Reviewed-by: Brian Paul <[email protected]>
* include: Ensure float.h is included for DBL_MAX.Jose Fonseca2015-03-221-0/+1
| | | | | | | I didn't actually hit the issue in practice, but just happen to notice while looking at the code. Reviewed-by: Brian Paul <[email protected]>
* mesa: move fpclassify work-arounds into c99_math.hBrian Paul2015-03-121-0/+44
| | | | | | v2: Use #error in the #else clause, per Jose. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: move FLT_MAX_EXP to c99_math.hBrian Paul2015-02-281-0/+4
| | | | Reviewed-by: Ian Romanick <[email protected]>
* c99_math.h: add defines for M_PI, M_E, M_LOG2EBrian Paul2015-02-271-0/+13
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89342 Signed-off-by: Brian Paul <[email protected]>
* c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVCBrian Paul2015-02-261-0/+5
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* include,auxiliary: Remove support for MSVC older then 2008.Jose Fonseca2015-02-261-71/+0
| | | | | | | | | | MSVC 2008 (shipped with Windows SDK 7.0.7600) is the oldest we need to support. At least on llvmpipe, gallium/auxiliary, and util modules. For the remaining modules (particular all OpenGL specific code) can be built with MSVC 2013. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: move signbit() macro to c99_math.hBrian Paul2015-02-241-0/+8
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace LOGF, EXPF with logf, expfBrian Paul2015-02-241-0/+10
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FREXPF, LDEXPF with frexpf, ldexpfBrian Paul2015-02-241-0/+11
| | | | | | Start getting rid of some imports.h macros. Use the c99 functions instead. Reviewed-by: Matt Turner <[email protected]>
* mesa: move math-related function into new c99_math.h fileBrian Paul2015-02-231-0/+184
The alternative would be to include math.h in c99_compat.h but that seems heavy-handed. This patch also replaces INLINE with inline in the c99 math function wrappers. Fixes MSVC build. Acked-by: Matt Turner <[email protected]>