summaryrefslogtreecommitdiff
path: root/src/mesa/main/compiler.h
AgeCommit message (Collapse)AuthorFilesLines
2013-04-04Avoid spurious GCC warnings in STATIC_ASSERT() macro.Paul Berry1-1/+1
GCC 4.8 now warns about typedefs that are local to a scope and not used anywhere within that scope. This produced spurious warnings with the STATIC_ASSERT() macro (which used a typedef to provoke a compile error in the event of an assertion failure). This patch switches to a simpler technique that avoids the warning. v2: Avoid GCC-specific syntax. Also update p_compiler.h. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-03-19mesa: use ieee fp on s390 and m68kAndreas Boll1-1/+2
Taken from downstream: http://anonscm.debian.org/gitweb/?p=pkg-xorg/lib/mesa.git;a=blob;f=debian/patches/02_use-ieee-fp-on-s390-and-m68k.patch;h=d3d6c1d7fec3c72ecf320706167deb61c52636c3;hb=refs/heads/ubuntu%2B1 Fixes Debian bug #349437. Patch written by David Nusinow. NOTE: This is a candidate for stable branches. Acked-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Matt Turner <mattst88@gmail.com>
2013-03-12mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.José Fonseca1-51/+5
We were in four already... NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-16Remove OpenVMS supportMatt Turner1-4/+2
Not maintained since 2008. Doubtful that it's worked in quite a while. Also see commit 32ac8cb05 which removed VMS stuff from Makefile in 2009. Cc: Jouk Jansen <j.jansen@tudelft.nl> Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
2012-09-05Use the correct macro _WIN32 for Windows.Vinson Lee1-3/+3
The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-05mesa: remove now unused CONST macroBrian Paul1-11/+0
Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-08-29mesa: Define CPU_TO_LE32 to work on OpenBSDMartin Pieuchot1-0/+3
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-05-18mesa: Remove undefinition of _P symbol.Vinson Lee1-6/+0
IRIX isn't used anymore. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-30mesa: add STATIC_ASSERT() macro for compile-time assertionsBrian Paul1-0/+12
This can be used to check that tables have the right number of entries, etc. at compile-time. This will hopefully catch things that are missed if particular drivers aren't tested, for example. v2: Simplify the macro to omit the extra line number info (the compiler already indicates the line number). And wrap the macro for readability.
2011-10-24Only use gcc visibility support with gcc4+.Tom Fogal1-1/+1
I had a colleague hitting issues compiling with an old gcc3.2 system. These patches got them through. NOTE: This is a candidate for the 7.11 branch. Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-08Define INLINE macro in terms of inline.José Fonseca1-15/+16
2011-08-16mesa: Remove use of fpu_control.hChad Versace1-3/+0
Remove the inclusion of fpu_control.h from compiler.h. Since Bionic lacks fpu_control.h, this fixes the Android build. Also remove the sole use of the fpu_control bits, which was in debug.c. Those were brianp's debug bits, and he approved of their removal. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-08-04mesa: Remove MSVC stdint typedefs from compiler.h.Vinson Lee1-23/+1
MSVC can now include the stdint.h at include/c99/stdint.h.
2011-07-22mesa: Add an ifndef guard around the definition of the INLINE macroPaul Berry1-20/+22
Several Mesa headers redundantly define the INLINE macro. Adding this guard prevents the compiler from complaining about macro redefinition. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-05-06mesa: add precision to M_PI constantMatt Turner1-1/+1
Value found in my math.h header. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-06mesa: replace ONE_DIV_LN2 constant with M_LOG2EMatt Turner1-4/+0
1/ln(2) is equivalent to log2(e), so define it as such. log2(e) = ln(e)/ln(2) = 1/ln(2) Worst of all, the definitions for M_LOG2E and ONE_DIV_LN2 (right beside each other!) weren't the same. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-03-25mesa: Avoid redefining PUBLIC/USE/likely/unlikely macros.José Fonseca1-13/+17
2010-12-01glsl: Use M_LOG2E constant instead of calling log2Ian Romanick1-0/+4
2010-09-06mesa: Define C99's __func__ macro on MSVC.José Fonseca1-0/+12
2010-09-01mesa: Add __printf__ attribute to printf-like functions to get warnings.Eric Anholt1-0/+5
2010-05-31Always define int32_t in compiler headers.Chia-I Wu1-3/+1
eglplatform.h no longer defines int32_t.
2010-05-11mesa: Optimize get.c by using a table-driven approachKristian Høgsberg1-0/+7
2010-03-03Fix unmatched parenthesis introduce by previous commitsIan Romanick1-1/+1
I wasn't careful enough when removing support for GCC versions earlier than 3.3.0. I could have sworn that I compile tested before pushing, but apparently not. FAIL. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03Remove support for GCC older than 3.3.0Ian Romanick1-6/+4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-01-20mesa: replace questionable CPU_TO_LE32 macro with functionBrian Paul1-6/+9
2010-01-19Sun compilers now support some gcc __attribute__ valuesAlan Coopersmith1-1/+2
Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ calls for aligned, always_inline, noinline, pure, const, and malloc. This commit includes updates to files that were regenerated by gl_XML.py after adding the __SUNPRO_C checks to it Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2009-12-16Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick1-1/+1
Conflicts: src/mesa/drivers/dri/unichrome/via_ioctl.c src/mesa/drivers/dri/unichrome/via_screen.c src/mesa/main/version.h src/mesa/state_tracker/st_atom.c
2009-12-16mesa: test for __blrts for CPU_TO_LE32()Brian Paul1-1/+1
See bug 25663.
2009-11-30Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick1-1/+6
Conflicts: progs/util/shaderutil.c src/mesa/drivers/dri/r600/r600_context.c src/mesa/main/version.h
2009-11-19mesa: define 32bit byteswap for AIX.Tom Fogal1-1/+6
Fixes `xlib' driver build on AIX. Signed-off-by: Brian Paul <brianp@vmware.com>
2009-09-24mesa: Fix missing finite symbol error on Windows.José Fonseca1-2/+1
Caused by some weird logic regarding the __WIN32__ define which made the finite definition dependent on the header include order.
2009-07-27mesa: separate some finite/pragma Watcom stuffBrian Paul1-3/+5
2009-06-18mesa: protect Elements against multiple definitionsKeith Whitwell1-2/+2
Mesa and gallium both have a definition of this macro
2009-03-31Updated CPU_TO_LE32 to work on darwinJeremy Huddleston1-1/+4
2009-02-22mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul1-0/+479
This trims down and cleans up imports.h and glheader.h quite a bit.