From 29cb47fc06ce8e81c39a8ecc19964053033b21ed Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 12 Jan 2015 21:27:52 -0500 Subject: [PATCH] Move #include statements outside extern "C" blocks --- lapack-netlib/lapacke/include/lapacke_config.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lapack-netlib/lapacke/include/lapacke_config.h b/lapack-netlib/lapacke/include/lapacke_config.h index 561b2736b..d46ed98e5 100644 --- a/lapack-netlib/lapacke/include/lapacke_config.h +++ b/lapack-netlib/lapacke/include/lapacke_config.h @@ -38,7 +38,6 @@ #if defined(LAPACK_COMPLEX_CPP) #include #endif -extern "C" { #endif /* __cplusplus */ #include @@ -63,8 +62,14 @@ extern "C" { #if defined(LAPACK_COMPLEX_STRUCTURE) +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ typedef struct { float real, imag; } _lapack_complex_float; typedef struct { double real, imag; } _lapack_complex_double; +#ifdef __cplusplus +} +#endif /* __cplusplus */ #define lapack_complex_float _lapack_complex_float #define lapack_complex_double _lapack_complex_double #define lapack_complex_float_real(z) ((z).real) @@ -103,8 +108,14 @@ typedef struct { double real, imag; } _lapack_complex_double; #endif +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ lapack_complex_float lapack_make_complex_float( float re, float im ); lapack_complex_double lapack_make_complex_double( double re, double im ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif @@ -116,8 +127,4 @@ lapack_complex_double lapack_make_complex_double( double re, double im ); #define LAPACK_free( p ) free( p ) #endif -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* _LAPACKE_CONFIG_H_ */