summaryrefslogtreecommitdiffstats
path: root/include/c99_compat.h
Commit message (Collapse)AuthorAgeFilesLines
* include: Require MSVC 2013 Update 4.Jose Fonseca2016-06-231-2/+2
| | | | | | | | Earlier MSVC 2013 releases have troubles compiling some of our C99 code, so make sure we have Update 4 to avoid confusion. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Move fallback HAVE_* definitions to headers.Jose Fonseca2016-04-261-0/+44
| | | | | | | | | | | | | | | | | | These were being defined in SCons, but it's not practical: - we actually need to include Gallium headers from external source trees, with completely disjoint build infrastructure, and it's unsustainable to replicate the HAVE_xxx checks or even hard-coded defines across everywhere. - checking compiler version via command line doesn't really work due to Clang essentially being like a cameleon which can fake either GCC or MSVC There's no change for autoconf. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* include,gallium: Remove pre-MSVC 2013 compatibility.Jose Fonseca2016-02-111-4/+4
| | | | | Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* Remove Sun CC specific code.Jose Fonseca2015-12-021-6/+0
| | | | | Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* include: Add helper header to help trap includes inside extern C.José Fonseca2015-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just to help repro and fixing these issues with any C++ compiler -- Commiting this will of course wait until all issues are addressed. $ scons src/glsl/ scons: Reading SConscript files ... Checking for GCC ... yes Checking for Clang ... no Checking for X11 (x11 xext xdamage xfixes glproto >= 1.4.13)... yes Checking for XCB (x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8)... yes Checking for XF86VIDMODE (xxf86vm)... yes Checking for DRM (libdrm >= 2.4.38)... yes Checking for UDEV (libudev >= 151)... yes warning: LLVM disabled: not building llvmpipe scons: done reading SConscript files. scons: Building targets ... scons: building associated VariantDir targets: build/linux-x86_64-debug/glsl Compiling src/glsl/ast_array_index.cpp ... Compiling src/glsl/ast_expr.cpp ... Compiling src/glsl/ast_function.cpp ... Compiling src/glsl/ast_to_hir.cpp ... Compiling src/glsl/ast_type.cpp ... Compiling src/glsl/builtin_functions.cpp ... In file included from include/c99_compat.h:28:0, from src/mapi/u_compiler.h:4, from src/mapi/u_thread.h:47, from src/mapi/glapi/glapi.h:47, from src/mesa/main/mtypes.h:42, from src/mesa/main/errors.h:47, from src/mesa/main/imports.h:41, from src/mesa/main/core.h:44, from src/glsl/builtin_functions.cpp:58: include/no_extern_c.h:48:1: error: template with C linkage template<class T> class _IncludeInsideExternCNotPortable; ^ In file included from include/c99_compat.h:28:0, from include/c11/threads.h:38, from src/mapi/u_thread.h:49, from src/mapi/glapi/glapi.h:47, from src/mesa/main/mtypes.h:42, from src/mesa/main/errors.h:47, from src/mesa/main/imports.h:41, from src/mesa/main/core.h:44, from src/glsl/builtin_functions.cpp:58: include/no_extern_c.h:48:1: error: template with C linkage template<class T> class _IncludeInsideExternCNotPortable; ^ Compiling src/glsl/builtin_types.cpp ... Compiling src/glsl/builtin_variables.cpp ... scons: *** [build/linux-x86_64-debug/glsl/builtin_functions.os] Error 1 scons: building terminated because of errors. Reviewed-by: Mark Janes <mark.a.janes@intel.com>
* include,auxiliary: Remove support for MSVC older then 2008.Jose Fonseca2015-02-261-5/+6
| | | | | | | | | | 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 <brianp@vmware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* mesa: move math-related function into new c99_math.h fileBrian Paul2015-02-231-143/+0
| | | | | | | | | | | | 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 <mattst88@gmail.com>
* mesa: Move C99 MSVC compatibility code from u_math.h to c99_compat.h.Matt Turner2015-02-231-0/+143
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: remove support for GCC older than 3.3.0Timothy Arceri2014-12-171-5/+1
| | | | | | | | | GCC >=3.3 has been required since 9aa3aa71386394725ce88df463d6183f62777ee5 Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-By: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* scons: Define _ALLOW_KEYWORD_MACROS on MSVC builds.José Fonseca2013-03-141-5/+3
| | | | | | | | | | scons/llvm.py defines inline globally to workaround issues with LLVM C binding headers, so the only way to is to avoid aggravating xkeycheck.h errors is to set _ALLOW_KEYWORD_MACROS. This fixes MSVC 2012 build with LLVM. Reviewed-by: Brian Paul <brianp@vmware.com>
* include: Fix build with VS 11 (i.e, 2012).José Fonseca2013-03-121-0/+42
| | | | | | NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.José Fonseca2013-03-121-0/+105
We were in four already... NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com>