Skip to content

Commit 63c6fcf

Browse files
committed
Merge pull request #490 from eschnett/develop
Move #include statements outside extern "C" blocks
2 parents 4e6c404 + 29cb47f commit 63c6fcf

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

lapack-netlib/lapacke/include/lapacke_config.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#if defined(LAPACK_COMPLEX_CPP)
3939
#include <complex>
4040
#endif
41-
extern "C" {
4241
#endif /* __cplusplus */
4342

4443
#include <stdlib.h>
@@ -63,8 +62,14 @@ extern "C" {
6362

6463
#if defined(LAPACK_COMPLEX_STRUCTURE)
6564

65+
#ifdef __cplusplus
66+
extern "C" {
67+
#endif /* __cplusplus */
6668
typedef struct { float real, imag; } _lapack_complex_float;
6769
typedef struct { double real, imag; } _lapack_complex_double;
70+
#ifdef __cplusplus
71+
}
72+
#endif /* __cplusplus */
6873
#define lapack_complex_float _lapack_complex_float
6974
#define lapack_complex_double _lapack_complex_double
7075
#define lapack_complex_float_real(z) ((z).real)
@@ -103,8 +108,14 @@ typedef struct { double real, imag; } _lapack_complex_double;
103108

104109
#endif
105110

111+
#ifdef __cplusplus
112+
extern "C" {
113+
#endif /* __cplusplus */
106114
lapack_complex_float lapack_make_complex_float( float re, float im );
107115
lapack_complex_double lapack_make_complex_double( double re, double im );
116+
#ifdef __cplusplus
117+
}
118+
#endif /* __cplusplus */
108119

109120
#endif
110121

@@ -116,8 +127,4 @@ lapack_complex_double lapack_make_complex_double( double re, double im );
116127
#define LAPACK_free( p ) free( p )
117128
#endif
118129

119-
#ifdef __cplusplus
120-
}
121-
#endif /* __cplusplus */
122-
123130
#endif /* _LAPACKE_CONFIG_H_ */

0 commit comments

Comments
 (0)