This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Let C++ always use inline functions (patch)


Hi,

attached is a patch against current CVS that will always use the
inline-d versions when using a C++ compiler.

It replaces the old test for "HAVE_INLINE" by a test for that macro
/or/ C++:
,----
| -#ifdef HAVE_INLINE
| +#if (defined HAVE_INLINE) || (defined __cplusplus)
`----

This is ok, as a C++ compiler is required by the standard to handle
"inline".

It helps, because C++ programs then always use the faster inline
versions automatically. 
(C++ programs often don't define HAVE_INLINE at all and it is an
unnecessary burden on the programmer.)

A few Makefiles had to be adopted to link test-binaries against
libgslcomplex.la, this is included in the patch.

It would be great if this could make it into the next release;)

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)
? c++-inline.diff
Index: gsl_math.h
===================================================================
RCS file: /cvs/gsl/gsl/gsl_math.h,v
retrieving revision 1.64
diff -u -u -r1.64 gsl_math.h
--- gsl_math.h	26 Jun 2005 13:26:59 -0000	1.64
+++ gsl_math.h	11 Jun 2006 09:52:15 -0000
@@ -127,7 +127,7 @@
 double gsl_min (double a, double b);
 
 /* inline-friendly strongly typed versions */
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline int GSL_MAX_INT (int a, int b);
 extern inline int GSL_MIN_INT (int a, int b);
Index: gsl_mode.h
===================================================================
RCS file: /cvs/gsl/gsl/gsl_mode.h,v
retrieving revision 1.11
diff -u -u -r1.11 gsl_mode.h
--- gsl_mode.h	26 Jun 2005 13:26:59 -0000	1.11
+++ gsl_mode.h	11 Jun 2006 09:52:15 -0000
@@ -66,7 +66,7 @@
 #define GSL_PREC_SINGLE  1
 #define GSL_PREC_APPROX  2
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline unsigned int GSL_MODE_PREC(gsl_mode_t mt);
 
 extern inline unsigned int
Index: gsl_pow_int.h
===================================================================
RCS file: /cvs/gsl/gsl/gsl_pow_int.h,v
retrieving revision 1.5
diff -u -u -r1.5 gsl_pow_int.h
--- gsl_pow_int.h	26 Jun 2005 13:26:59 -0000	1.5
+++ gsl_pow_int.h	11 Jun 2006 09:52:15 -0000
@@ -32,7 +32,7 @@
 
 __BEGIN_DECLS
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline double gsl_pow_2(const double x);
 extern inline double gsl_pow_3(const double x);
 extern inline double gsl_pow_4(const double x);
Index: cdf/Makefile.am
===================================================================
RCS file: /cvs/gsl/gsl/cdf/Makefile.am,v
retrieving revision 1.8
diff -u -u -r1.8 Makefile.am
--- cdf/Makefile.am	9 Mar 2006 15:53:32 -0000	1.8
+++ cdf/Makefile.am	11 Jun 2006 09:52:15 -0000
@@ -14,4 +14,4 @@
 check_PROGRAMS = test
 
 test_SOURCES = test.c
-test_LDADD = libgslcdf.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslcdf.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../complex/libgslcomplex.la
Index: combination/gsl_combination.h
===================================================================
RCS file: /cvs/gsl/gsl/combination/gsl_combination.h,v
retrieving revision 1.7
diff -u -u -r1.7 gsl_combination.h
--- combination/gsl_combination.h	26 Jun 2005 13:27:00 -0000	1.7
+++ combination/gsl_combination.h	11 Jun 2006 09:52:16 -0000
@@ -69,7 +69,7 @@
 int gsl_combination_next (gsl_combination * c);
 int gsl_combination_prev (gsl_combination * c);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 size_t
Index: complex/gsl_complex_math.h
===================================================================
RCS file: /cvs/gsl/gsl/complex/gsl_complex_math.h,v
retrieving revision 1.13
diff -u -u -r1.13 gsl_complex_math.h
--- complex/gsl_complex_math.h	26 Jun 2005 13:27:00 -0000	1.13
+++ complex/gsl_complex_math.h	11 Jun 2006 09:52:16 -0000
@@ -38,7 +38,7 @@
 gsl_complex gsl_complex_rect (double x, double y);  /* r= real+i*imag */
 gsl_complex gsl_complex_polar (double r, double theta); /* r= r e^(i theta) */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline gsl_complex
 gsl_complex_rect (double x, double y)
 {                               /* return z = x + i y */
Index: dht/Makefile.am
===================================================================
RCS file: /cvs/gsl/gsl/dht/Makefile.am,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile.am
--- dht/Makefile.am	29 Jul 2004 13:11:19 -0000	1.12
+++ dht/Makefile.am	11 Jun 2006 09:52:16 -0000
@@ -8,7 +8,7 @@
 
 check_PROGRAMS = test
 
-test_LDADD = libgsldht.la ../specfunc/libgslspecfunc.la  ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgsldht.la ../specfunc/libgslspecfunc.la  ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../complex/libgslcomplex.la
 
 test_SOURCES = test.c
 
Index: doc/.cvsignore
===================================================================
RCS file: /cvs/gsl/gsl/doc/.cvsignore,v
retrieving revision 1.5
diff -u -u -r1.5 .cvsignore
--- doc/.cvsignore	23 Jul 2004 16:55:12 -0000	1.5
+++ doc/.cvsignore	11 Jun 2006 09:52:16 -0000
@@ -11,6 +11,7 @@
 *.ky
 *.la
 *.log
+*.pdf
 *.pg
 *.ps
 *.toc
Index: interpolation/bsearch.h
===================================================================
RCS file: /cvs/gsl/gsl/interpolation/bsearch.h,v
retrieving revision 1.12
diff -u -u -r1.12 bsearch.h
--- interpolation/bsearch.h	26 Jun 2005 13:27:03 -0000	1.12
+++ interpolation/bsearch.h	11 Jun 2006 09:52:16 -0000
@@ -52,7 +52,7 @@
   );
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern
 inline
 size_t
Index: interpolation/gsl_interp.h
===================================================================
RCS file: /cvs/gsl/gsl/interpolation/gsl_interp.h,v
retrieving revision 1.26
diff -u -u -r1.26 gsl_interp.h
--- interpolation/gsl_interp.h	26 Jun 2005 13:27:03 -0000	1.26
+++ interpolation/gsl_interp.h	11 Jun 2006 09:52:16 -0000
@@ -151,7 +151,7 @@
 size_t gsl_interp_bsearch(const double x_array[], double x,
                           size_t index_lo, size_t index_hi);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline size_t
 gsl_interp_bsearch(const double x_array[], double x,
                    size_t index_lo, size_t index_hi);
@@ -174,7 +174,7 @@
 }
 #endif
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline size_t
 gsl_interp_accel_find(gsl_interp_accel * a, const double xa[], size_t len, double x)
 {
Index: matrix/gsl_matrix_char.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_char.h,v
retrieving revision 1.51
diff -u -u -r1.51 gsl_matrix_char.h
--- matrix/gsl_matrix_char.h	26 Jun 2005 13:27:03 -0000	1.51
+++ matrix/gsl_matrix_char.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 char
 gsl_matrix_char_get(const gsl_matrix_char * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_complex_double.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_complex_double.h,v
retrieving revision 1.51
diff -u -u -r1.51 gsl_matrix_complex_double.h
--- matrix/gsl_matrix_complex_double.h	26 Jun 2005 13:27:03 -0000	1.51
+++ matrix/gsl_matrix_complex_double.h	11 Jun 2006 09:52:16 -0000
@@ -228,7 +228,7 @@
 int gsl_matrix_complex_set_row(gsl_matrix_complex * m, const size_t i, const gsl_vector_complex * v);
 int gsl_matrix_complex_set_col(gsl_matrix_complex * m, const size_t j, const gsl_vector_complex * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline 
 gsl_complex
Index: matrix/gsl_matrix_complex_float.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_complex_float.h,v
retrieving revision 1.52
diff -u -u -r1.52 gsl_matrix_complex_float.h
--- matrix/gsl_matrix_complex_float.h	26 Jun 2005 13:27:03 -0000	1.52
+++ matrix/gsl_matrix_complex_float.h	11 Jun 2006 09:52:16 -0000
@@ -228,7 +228,7 @@
 int gsl_matrix_complex_float_set_row(gsl_matrix_complex_float * m, const size_t i, const gsl_vector_complex_float * v);
 int gsl_matrix_complex_float_set_col(gsl_matrix_complex_float * m, const size_t j, const gsl_vector_complex_float * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline 
 gsl_complex_float
Index: matrix/gsl_matrix_complex_long_double.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_complex_long_double.h,v
retrieving revision 1.51
diff -u -u -r1.51 gsl_matrix_complex_long_double.h
--- matrix/gsl_matrix_complex_long_double.h	26 Jun 2005 13:27:03 -0000	1.51
+++ matrix/gsl_matrix_complex_long_double.h	11 Jun 2006 09:52:16 -0000
@@ -228,7 +228,7 @@
 int gsl_matrix_complex_long_double_set_row(gsl_matrix_complex_long_double * m, const size_t i, const gsl_vector_complex_long_double * v);
 int gsl_matrix_complex_long_double_set_col(gsl_matrix_complex_long_double * m, const size_t j, const gsl_vector_complex_long_double * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline 
 gsl_complex_long_double
Index: matrix/gsl_matrix_double.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_double.h,v
retrieving revision 1.50
diff -u -u -r1.50 gsl_matrix_double.h
--- matrix/gsl_matrix_double.h	26 Jun 2005 13:27:03 -0000	1.50
+++ matrix/gsl_matrix_double.h	11 Jun 2006 09:52:16 -0000
@@ -1,17 +1,17 @@
 /* matrix/gsl_matrix_double.h
- * 
+ *
  * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or (at
  * your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -38,7 +38,7 @@
 
 __BEGIN_DECLS
 
-typedef struct 
+typedef struct
 {
   size_t size1;
   size_t size2;
@@ -64,31 +64,31 @@
 
 /* Allocation */
 
-gsl_matrix * 
+gsl_matrix *
 gsl_matrix_alloc (const size_t n1, const size_t n2);
 
-gsl_matrix * 
+gsl_matrix *
 gsl_matrix_calloc (const size_t n1, const size_t n2);
 
-gsl_matrix * 
-gsl_matrix_alloc_from_block (gsl_block * b, 
-                                   const size_t offset, 
-                                   const size_t n1, 
-                                   const size_t n2, 
+gsl_matrix *
+gsl_matrix_alloc_from_block (gsl_block * b,
+                                   const size_t offset,
+                                   const size_t n1,
+                                   const size_t n2,
                                    const size_t d2);
 
-gsl_matrix * 
+gsl_matrix *
 gsl_matrix_alloc_from_matrix (gsl_matrix * m,
-                                    const size_t k1, 
+                                    const size_t k1,
                                     const size_t k2,
-                                    const size_t n1, 
+                                    const size_t n1,
                                     const size_t n2);
 
-gsl_vector * 
+gsl_vector *
 gsl_vector_alloc_row_from_matrix (gsl_matrix * m,
                                         const size_t i);
 
-gsl_vector * 
+gsl_vector *
 gsl_vector_alloc_col_from_matrix (gsl_matrix * m,
                                         const size_t j);
 
@@ -96,93 +96,93 @@
 
 /* Views */
 
-_gsl_matrix_view 
-gsl_matrix_submatrix (gsl_matrix * m, 
-                            const size_t i, const size_t j, 
+_gsl_matrix_view
+gsl_matrix_submatrix (gsl_matrix * m,
+                            const size_t i, const size_t j,
                             const size_t n1, const size_t n2);
 
-_gsl_vector_view 
+_gsl_vector_view
 gsl_matrix_row (gsl_matrix * m, const size_t i);
 
-_gsl_vector_view 
+_gsl_vector_view
 gsl_matrix_column (gsl_matrix * m, const size_t j);
 
-_gsl_vector_view 
+_gsl_vector_view
 gsl_matrix_diagonal (gsl_matrix * m);
 
-_gsl_vector_view 
+_gsl_vector_view
 gsl_matrix_subdiagonal (gsl_matrix * m, const size_t k);
 
-_gsl_vector_view 
+_gsl_vector_view
 gsl_matrix_superdiagonal (gsl_matrix * m, const size_t k);
 
 _gsl_matrix_view
 gsl_matrix_view_array (double * base,
-                             const size_t n1, 
+                             const size_t n1,
                              const size_t n2);
 
 _gsl_matrix_view
-gsl_matrix_view_array_with_tda (double * base, 
-                                      const size_t n1, 
+gsl_matrix_view_array_with_tda (double * base,
+                                      const size_t n1,
                                       const size_t n2,
                                       const size_t tda);
 
 
 _gsl_matrix_view
 gsl_matrix_view_vector (gsl_vector * v,
-                              const size_t n1, 
+                              const size_t n1,
                               const size_t n2);
 
 _gsl_matrix_view
 gsl_matrix_view_vector_with_tda (gsl_vector * v,
-                                       const size_t n1, 
+                                       const size_t n1,
                                        const size_t n2,
                                        const size_t tda);
 
 
-_gsl_matrix_const_view 
-gsl_matrix_const_submatrix (const gsl_matrix * m, 
-                                  const size_t i, const size_t j, 
+_gsl_matrix_const_view
+gsl_matrix_const_submatrix (const gsl_matrix * m,
+                                  const size_t i, const size_t j,
                                   const size_t n1, const size_t n2);
 
-_gsl_vector_const_view 
-gsl_matrix_const_row (const gsl_matrix * m, 
+_gsl_vector_const_view
+gsl_matrix_const_row (const gsl_matrix * m,
                             const size_t i);
 
-_gsl_vector_const_view 
-gsl_matrix_const_column (const gsl_matrix * m, 
+_gsl_vector_const_view
+gsl_matrix_const_column (const gsl_matrix * m,
                                const size_t j);
 
 _gsl_vector_const_view
 gsl_matrix_const_diagonal (const gsl_matrix * m);
 
-_gsl_vector_const_view 
-gsl_matrix_const_subdiagonal (const gsl_matrix * m, 
+_gsl_vector_const_view
+gsl_matrix_const_subdiagonal (const gsl_matrix * m,
                                     const size_t k);
 
-_gsl_vector_const_view 
-gsl_matrix_const_superdiagonal (const gsl_matrix * m, 
+_gsl_vector_const_view
+gsl_matrix_const_superdiagonal (const gsl_matrix * m,
                                       const size_t k);
 
 _gsl_matrix_const_view
 gsl_matrix_const_view_array (const double * base,
-                                   const size_t n1, 
+                                   const size_t n1,
                                    const size_t n2);
 
 _gsl_matrix_const_view
-gsl_matrix_const_view_array_with_tda (const double * base, 
-                                            const size_t n1, 
+gsl_matrix_const_view_array_with_tda (const double * base,
+                                            const size_t n1,
                                             const size_t n2,
                                             const size_t tda);
 
 _gsl_matrix_const_view
 gsl_matrix_const_view_vector (const gsl_vector * v,
-                                    const size_t n1, 
+                                    const size_t n1,
                                     const size_t n2);
 
 _gsl_matrix_const_view
 gsl_matrix_const_view_vector_with_tda (const gsl_vector * v,
-                                             const size_t n1, 
+                                             const size_t n1,
                                              const size_t n2,
                                              const size_t tda);
 
@@ -202,7 +202,7 @@
 int gsl_matrix_fwrite (FILE * stream, const gsl_matrix * m) ;
 int gsl_matrix_fscanf (FILE * stream, gsl_matrix * m);
 int gsl_matrix_fprintf (FILE * stream, const gsl_matrix * m, const char * format);
- 
+
 int gsl_matrix_memcpy(gsl_matrix * dest, const gsl_matrix * src);
 int gsl_matrix_swap(gsl_matrix * m1, gsl_matrix * m2);
 
@@ -240,8 +240,8 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
-extern inline 
+#if (defined HAVE_INLINE) || (defined __cplusplus)
+extern inline
 double
 gsl_matrix_get(const gsl_matrix * m, const size_t i, const size_t j)
 {
@@ -256,9 +256,9 @@
     }
 #endif
   return m->data[i * m->tda + j] ;
-} 
+}
 
-extern inline 
+extern inline
 void
 gsl_matrix_set(gsl_matrix * m, const size_t i, const size_t j, const double x)
 {
@@ -275,7 +275,7 @@
   m->data[i * m->tda + j] = x ;
 }
 
-extern inline 
+extern inline
 double *
 gsl_matrix_ptr(gsl_matrix * m, const size_t i, const size_t j)
 {
@@ -290,9 +290,9 @@
     }
 #endif
   return (double *) (m->data + (i * m->tda + j)) ;
-} 
+}
 
-extern inline 
+extern inline
 const double *
 gsl_matrix_const_ptr(const gsl_matrix * m, const size_t i, const size_t j)
 {
@@ -307,7 +307,7 @@
     }
 #endif
   return (const double *) (m->data + (i * m->tda + j)) ;
-} 
+}
 
 #endif
 
Index: matrix/gsl_matrix_float.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_float.h,v
retrieving revision 1.55
diff -u -u -r1.55 gsl_matrix_float.h
--- matrix/gsl_matrix_float.h	26 Jun 2005 13:27:03 -0000	1.55
+++ matrix/gsl_matrix_float.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 float
 gsl_matrix_float_get(const gsl_matrix_float * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_int.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_int.h,v
retrieving revision 1.55
diff -u -u -r1.55 gsl_matrix_int.h
--- matrix/gsl_matrix_int.h	26 Jun 2005 13:27:03 -0000	1.55
+++ matrix/gsl_matrix_int.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 int
 gsl_matrix_int_get(const gsl_matrix_int * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_long.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_long.h,v
retrieving revision 1.51
diff -u -u -r1.51 gsl_matrix_long.h
--- matrix/gsl_matrix_long.h	26 Jun 2005 13:27:03 -0000	1.51
+++ matrix/gsl_matrix_long.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 long
 gsl_matrix_long_get(const gsl_matrix_long * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_long_double.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_long_double.h,v
retrieving revision 1.50
diff -u -u -r1.50 gsl_matrix_long_double.h
--- matrix/gsl_matrix_long_double.h	26 Jun 2005 13:27:03 -0000	1.50
+++ matrix/gsl_matrix_long_double.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 long double
 gsl_matrix_long_double_get(const gsl_matrix_long_double * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_short.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_short.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_matrix_short.h
--- matrix/gsl_matrix_short.h	26 Jun 2005 13:27:03 -0000	1.49
+++ matrix/gsl_matrix_short.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 short
 gsl_matrix_short_get(const gsl_matrix_short * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_uchar.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_uchar.h,v
retrieving revision 1.50
diff -u -u -r1.50 gsl_matrix_uchar.h
--- matrix/gsl_matrix_uchar.h	26 Jun 2005 13:27:03 -0000	1.50
+++ matrix/gsl_matrix_uchar.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 unsigned char
 gsl_matrix_uchar_get(const gsl_matrix_uchar * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_uint.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_uint.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_matrix_uint.h
--- matrix/gsl_matrix_uint.h	26 Jun 2005 13:27:03 -0000	1.49
+++ matrix/gsl_matrix_uint.h	11 Jun 2006 09:52:16 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 unsigned int
 gsl_matrix_uint_get(const gsl_matrix_uint * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_ulong.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_ulong.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_matrix_ulong.h
--- matrix/gsl_matrix_ulong.h	26 Jun 2005 13:27:03 -0000	1.49
+++ matrix/gsl_matrix_ulong.h	11 Jun 2006 09:52:17 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 unsigned long
 gsl_matrix_ulong_get(const gsl_matrix_ulong * m, const size_t i, const size_t j)
Index: matrix/gsl_matrix_ushort.h
===================================================================
RCS file: /cvs/gsl/gsl/matrix/gsl_matrix_ushort.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_matrix_ushort.h
--- matrix/gsl_matrix_ushort.h	26 Jun 2005 13:27:03 -0000	1.49
+++ matrix/gsl_matrix_ushort.h	11 Jun 2006 09:52:17 -0000
@@ -240,7 +240,7 @@
 
 /* inline functions if you are using GCC */
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline 
 unsigned short
 gsl_matrix_ushort_get(const gsl_matrix_ushort * m, const size_t i, const size_t j)
Index: permutation/gsl_permutation.h
===================================================================
RCS file: /cvs/gsl/gsl/permutation/gsl_permutation.h,v
retrieving revision 1.22
diff -u -u -r1.22 gsl_permutation.h
--- permutation/gsl_permutation.h	26 Jun 2005 13:27:05 -0000	1.22
+++ permutation/gsl_permutation.h	11 Jun 2006 09:52:17 -0000
@@ -76,7 +76,7 @@
 size_t gsl_permutation_linear_cycles (const gsl_permutation * p);
 size_t gsl_permutation_canonical_cycles (const gsl_permutation * q);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 size_t
Index: poly/gsl_poly.h
===================================================================
RCS file: /cvs/gsl/gsl/poly/gsl_poly.h,v
retrieving revision 1.20
diff -u -u -r1.20 gsl_poly.h
--- poly/gsl_poly.h	26 Jun 2005 13:27:05 -0000	1.20
+++ poly/gsl_poly.h	11 Jun 2006 09:52:17 -0000
@@ -45,7 +45,7 @@
 double gsl_poly_eval(const double c[], const int len, const double x);
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline
 double gsl_poly_eval(const double c[], const int len, const double x)
 {
@@ -65,7 +65,7 @@
 double
 gsl_poly_dd_eval (const double dd[], const double xa[], const size_t size, const double x);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline
 double gsl_poly_dd_eval(const double dd[], const double xa[], const size_t size, const double x)
 {
Index: qrng/gsl_qrng.h
===================================================================
RCS file: /cvs/gsl/gsl/qrng/gsl_qrng.h,v
retrieving revision 1.9
diff -u -u -r1.9 gsl_qrng.h
--- qrng/gsl_qrng.h	21 Apr 2006 12:09:43 -0000	1.9
+++ qrng/gsl_qrng.h	11 Jun 2006 09:52:17 -0000
@@ -94,7 +94,7 @@
 int gsl_qrng_get (const gsl_qrng * q, double x[]);
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline int gsl_qrng_get (const gsl_qrng * q, double x[]);
 extern inline int gsl_qrng_get (const gsl_qrng * q, double x[])
 {
Index: randist/Makefile.am
===================================================================
RCS file: /cvs/gsl/gsl/randist/Makefile.am,v
retrieving revision 1.47
diff -u -u -r1.47 Makefile.am
--- randist/Makefile.am	1 Feb 2006 16:55:25 -0000	1.47
+++ randist/Makefile.am	11 Jun 2006 09:52:17 -0000
@@ -11,6 +11,6 @@
 check_PROGRAMS = test
 
 test_SOURCES = test.c
-test_LDADD = libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../complex/libgslcomplex.la
 
 
Index: rng/gsl_rng.h
===================================================================
RCS file: /cvs/gsl/gsl/rng/gsl_rng.h,v
retrieving revision 1.58
diff -u -u -r1.58 gsl_rng.h
--- rng/gsl_rng.h	17 Dec 2005 16:48:58 -0000	1.58
+++ rng/gsl_rng.h	11 Jun 2006 09:52:17 -0000
@@ -152,7 +152,7 @@
 unsigned long int gsl_rng_uniform_int (const gsl_rng * r, unsigned long int n);
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline unsigned long int gsl_rng_get (const gsl_rng * r);
 
 extern inline unsigned long int
Index: specfunc/Makefile.am
===================================================================
RCS file: /cvs/gsl/gsl/specfunc/Makefile.am,v
retrieving revision 1.100
diff -u -u -r1.100 Makefile.am
--- specfunc/Makefile.am	1 Jun 2006 00:05:22 -0000	1.100
+++ specfunc/Makefile.am	11 Jun 2006 09:52:17 -0000
@@ -12,7 +12,7 @@
 
 check_PROGRAMS = test
 
-test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la  ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+test_LDADD = libgslspecfunc.la ../complex/libgslcomplex.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la  ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la  ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
 
 test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
   
Index: specfunc/gsl_sf_exp.h
===================================================================
RCS file: /cvs/gsl/gsl/specfunc/gsl_sf_exp.h,v
retrieving revision 1.30
diff -u -u -r1.30 gsl_sf_exp.h
--- specfunc/gsl_sf_exp.h	26 Jun 2005 13:27:08 -0000	1.30
+++ specfunc/gsl_sf_exp.h	11 Jun 2006 09:52:17 -0000
@@ -130,7 +130,7 @@
 __END_DECLS
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 #include <gsl/gsl_math.h>
 #include <gsl/gsl_errno.h>
 
Index: specfunc/gsl_sf_legendre.h
===================================================================
RCS file: /cvs/gsl/gsl/specfunc/gsl_sf_legendre.h,v
retrieving revision 1.43
diff -u -u -r1.43 gsl_sf_legendre.h
--- specfunc/gsl_sf_legendre.h	26 Jun 2005 13:27:08 -0000	1.43
+++ specfunc/gsl_sf_legendre.h	11 Jun 2006 09:52:17 -0000
@@ -311,7 +311,7 @@
 int gsl_sf_legendre_H3d_array(const int lmax, const double lambda, const double eta, double * result_array);
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 extern inline
 int
 gsl_sf_legendre_array_size(const int lmax, const int m)
Index: specfunc/gsl_sf_log.h
===================================================================
RCS file: /cvs/gsl/gsl/specfunc/gsl_sf_log.h,v
retrieving revision 1.24
diff -u -u -r1.24 gsl_sf_log.h
--- specfunc/gsl_sf_log.h	26 Jun 2005 13:27:08 -0000	1.24
+++ specfunc/gsl_sf_log.h	11 Jun 2006 09:52:17 -0000
@@ -78,7 +78,7 @@
 double gsl_sf_log_1plusx_mx(const double x);
 
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 #include <gsl/gsl_math.h>
 #include <gsl/gsl_errno.h>
 
Index: vector/gsl_vector_char.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_char.h,v
retrieving revision 1.51
diff -u -u -r1.51 gsl_vector_char.h
--- vector/gsl_vector_char.h	26 Jun 2005 13:27:11 -0000	1.51
+++ vector/gsl_vector_char.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_char_isnull (const gsl_vector_char * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 char
Index: vector/gsl_vector_complex_double.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_complex_double.h,v
retrieving revision 1.46
diff -u -u -r1.46 gsl_vector_complex_double.h
--- vector/gsl_vector_complex_double.h	26 Jun 2005 13:27:11 -0000	1.46
+++ vector/gsl_vector_complex_double.h	11 Jun 2006 09:52:17 -0000
@@ -178,7 +178,7 @@
 
 int gsl_vector_complex_isnull (const gsl_vector_complex * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 gsl_complex
Index: vector/gsl_vector_complex_float.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_complex_float.h,v
retrieving revision 1.51
diff -u -u -r1.51 gsl_vector_complex_float.h
--- vector/gsl_vector_complex_float.h	26 Jun 2005 13:27:11 -0000	1.51
+++ vector/gsl_vector_complex_float.h	11 Jun 2006 09:52:17 -0000
@@ -178,7 +178,7 @@
 
 int gsl_vector_complex_float_isnull (const gsl_vector_complex_float * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 gsl_complex_float
Index: vector/gsl_vector_complex_long_double.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_complex_long_double.h,v
retrieving revision 1.53
diff -u -u -r1.53 gsl_vector_complex_long_double.h
--- vector/gsl_vector_complex_long_double.h	26 Jun 2005 13:27:11 -0000	1.53
+++ vector/gsl_vector_complex_long_double.h	11 Jun 2006 09:52:17 -0000
@@ -178,7 +178,7 @@
 
 int gsl_vector_complex_long_double_isnull (const gsl_vector_complex_long_double * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 gsl_complex_long_double
Index: vector/gsl_vector_double.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_double.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_double.h
--- vector/gsl_vector_double.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_double.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_isnull (const gsl_vector * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 double
Index: vector/gsl_vector_float.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_float.h,v
retrieving revision 1.56
diff -u -u -r1.56 gsl_vector_float.h
--- vector/gsl_vector_float.h	26 Jun 2005 13:27:11 -0000	1.56
+++ vector/gsl_vector_float.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_float_isnull (const gsl_vector_float * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 float
Index: vector/gsl_vector_int.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_int.h,v
retrieving revision 1.57
diff -u -u -r1.57 gsl_vector_int.h
--- vector/gsl_vector_int.h	26 Jun 2005 13:27:11 -0000	1.57
+++ vector/gsl_vector_int.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_int_isnull (const gsl_vector_int * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 int
Index: vector/gsl_vector_long.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_long.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_long.h
--- vector/gsl_vector_long.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_long.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_long_isnull (const gsl_vector_long * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 long
Index: vector/gsl_vector_long_double.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_long_double.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_long_double.h
--- vector/gsl_vector_long_double.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_long_double.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_long_double_isnull (const gsl_vector_long_double * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 long double
Index: vector/gsl_vector_short.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_short.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_short.h
--- vector/gsl_vector_short.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_short.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_short_isnull (const gsl_vector_short * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 short
Index: vector/gsl_vector_uchar.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_uchar.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_uchar.h
--- vector/gsl_vector_uchar.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_uchar.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_uchar_isnull (const gsl_vector_uchar * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 unsigned char
Index: vector/gsl_vector_uint.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_uint.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_uint.h
--- vector/gsl_vector_uint.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_uint.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_uint_isnull (const gsl_vector_uint * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 unsigned int
Index: vector/gsl_vector_ulong.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_ulong.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_ulong.h
--- vector/gsl_vector_ulong.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_ulong.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_ulong_isnull (const gsl_vector_ulong * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 unsigned long
Index: vector/gsl_vector_ushort.h
===================================================================
RCS file: /cvs/gsl/gsl/vector/gsl_vector_ushort.h,v
retrieving revision 1.49
diff -u -u -r1.49 gsl_vector_ushort.h
--- vector/gsl_vector_ushort.h	26 Jun 2005 13:27:11 -0000	1.49
+++ vector/gsl_vector_ushort.h	11 Jun 2006 09:52:17 -0000
@@ -162,7 +162,7 @@
 
 int gsl_vector_ushort_isnull (const gsl_vector_ushort * v);
 
-#ifdef HAVE_INLINE
+#if (defined HAVE_INLINE) || (defined __cplusplus)
 
 extern inline
 unsigned short

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]