summaryrefslogtreecommitdiff
path: root/include/c99_compat.h
AgeCommit message (Collapse)AuthorFilesLines
2021-03-30Remove Scons leftoversMatt Turner1-45/+0
Fixes: 6e6cd7d93cc54fc8c279 ("scons: Remove.") Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9738>
2019-10-16c99_compat.h: Don't try to use 'restrict' in C++ codeAlan Coopersmith1-1/+1
Fixes build failures on Solaris in C++ files using gcc: ../src/util/u_math.h:628:41: error: expected ‘,’ or ‘...’ before ‘dest’ 628 | util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n) | ^~~~ ../src/util/u_math.h: In function ‘void* util_memcpy_cpu_to_le32(void*)’: ../src/util/u_math.h:641:18: error: ‘dest’ was not declared in this scope 641 | return memcpy(dest, src, n); | ^~~~ ../src/util/u_math.h:641:24: error: ‘src’ was not declared in this scope 641 | return memcpy(dest, src, n); | ^~~ ../src/util/u_math.h:641:29: error: ‘n’ was not declared in this scope; did you mean ‘yn’? 641 | return memcpy(dest, src, n); | ^ | yn Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2019-07-04scons: s/HAVE_NO_AUTOCONF/HAVE_SCONS/Eric Engestrom1-4/+3
Back when autotools and scons were the two build systems, it kinda made sense to call scons "not autoconf", but autoconf's been gone for a while now and other build systems have been added (android.mk and meson), so the name really doesn't make any sense anymore. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-09-10Require Visual Studio 2015.Jose Fonseca1-2/+2
We no longer need or use Visual Studio 2013. https://ci.appveyor.com/project/jrfonseca/mesa/build/52 Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-01-12util: fix NORETURN for msvc, add HAVE_FUNC_ATTRIBUTE_NORETURN to c99_compat.hRoland Scheidegger1-0/+1
We've seen some problems internally due to macro redefinition. Fix this by adding HAVE_FUNC_ATTRIBUTE_NORETURN to c99_compat.h, and defining it for msvc. And avoid redefinition just in case. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-01-18scons: set HAVE_FUNC_ATTRIBUTE_ALIASEmil Velikov1-0/+1
Analogoust to the previous commit were we did so for autotools Cc: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-06-23include: Require MSVC 2013 Update 4.Jose Fonseca1-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>
2016-04-26scons: Move fallback HAVE_* definitions to headers.Jose Fonseca1-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>
2016-02-11include,gallium: Remove pre-MSVC 2013 compatibility.Jose Fonseca1-4/+4
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-12-02Remove Sun CC specific code.Jose Fonseca1-6/+0
Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-03-06include: Add helper header to help trap includes inside extern C.José Fonseca1-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>
2015-02-26include,auxiliary: Remove support for MSVC older then 2008.Jose Fonseca1-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>
2015-02-23mesa: move math-related function into new c99_math.h fileBrian Paul1-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>
2015-02-23mesa: Move C99 MSVC compatibility code from u_math.h to c99_compat.h.Matt Turner1-0/+143
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-12-17mesa: remove support for GCC older than 3.3.0Timothy Arceri1-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>
2013-03-14scons: Define _ALLOW_KEYWORD_MACROS on MSVC builds.José Fonseca1-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>
2013-03-12include: Fix build with VS 11 (i.e, 2012).José Fonseca1-0/+42
NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-03-12mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.José Fonseca1-0/+105
We were in four already... NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com>