diff options
author | Mark Janes <[email protected]> | 2015-03-04 16:37:29 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-03-05 10:21:40 -0800 |
commit | 237dcb4aa7c39c59bfd225ae3d73caf709be216d (patch) | |
tree | 9139b596ac2383fa3e4ada351b94000ba9319e5f /src/gallium/auxiliary/util/u_math.h | |
parent | 2e4c95dfe2cb205c327ceaa12b44a9273bdb20dc (diff) |
Fix invalid extern "C" around header inclusion.
System headers may contain C++ declarations, which cannot be given C
linkage. For this reason, include statements should never occur
inside extern "C".
This patch moves the C linkage statements to enclose only the
declarations within a single header.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_math.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_math.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 5400fcead59..8f62cac664e 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -41,12 +41,6 @@ #include "pipe/p_compiler.h" - -#ifdef __cplusplus -extern "C" { -#endif - - #include "c99_math.h" #include <float.h> #include <stdarg.h> @@ -56,6 +50,11 @@ extern "C" { #endif +#ifdef __cplusplus +extern "C" { +#endif + + #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 #endif |