# HG changeset patch # User John W. Eaton # Date 1435181556 14400 # Node ID a0fab64685ab2e61db95ecd0c211b832daf9d34f # Parent 5db7eea18d76efcf9c6ae2ccb529664a5c0dca09 Avoid HAVE_ macro in header file. * sparse-util.h, sparse-util.cc (SparseCholError, SparseCholPrint): Unconditionally declare and define functions. diff -r 5db7eea18d76 -r a0fab64685ab liboctave/util/sparse-util.cc --- a/liboctave/util/sparse-util.cc Wed Jun 24 14:40:22 2015 -0400 +++ b/liboctave/util/sparse-util.cc Wed Jun 24 17:32:36 2015 -0400 @@ -33,14 +33,14 @@ // FIXME: this overload is here due to API change in SuiteSparse (3.1 -> 3.2) -#ifdef HAVE_CHOLMOD - void SparseCholError (int status, char *file, int line, char *message) { SparseCholError (status, file, line, message); } +#ifdef HAVE_CHOLMOD + void SparseCholError (int status, const char *file, int line, const char *message) { @@ -53,6 +53,15 @@ status, line, file, message); } +#else + +void +SparseCholError (int status, const char *, int, const char *) +{ +} + +#endif //HAVE_CHOLMOD + int SparseCholPrint (const char *fmt, ...) { @@ -64,8 +73,6 @@ return ret; } -#endif //HAVE_CHOLMOD - bool sparse_indices_ok (octave_idx_type *r, octave_idx_type *c, octave_idx_type nrows, octave_idx_type ncols, diff -r 5db7eea18d76 -r a0fab64685ab liboctave/util/sparse-util.h --- a/liboctave/util/sparse-util.h Wed Jun 24 14:40:22 2015 -0400 +++ b/liboctave/util/sparse-util.h Wed Jun 24 17:32:36 2015 -0400 @@ -24,16 +24,18 @@ #if !defined (octave_sparse_util_h) #define octave_sparse_util_h 1 -#ifdef HAVE_CHOLMOD +// The next two functions don't do anything unless CHOLMOD is +// available // FIXME this overload is here due to API change in SuiteSparse (3.1 -> 3.2) -extern OCTAVE_API void SparseCholError (int status, char *file, - int line, char *message); -extern OCTAVE_API void SparseCholError (int status, const char *file, - int line, const char *message); -extern OCTAVE_API int SparseCholPrint (const char *fmt, ...); +extern OCTAVE_API void +SparseCholError (int status, char *file, int line, char *message); -#endif //HAVE_CHOLMOD +extern OCTAVE_API void +SparseCholError (int status, const char *file, int line, const char *message); + +extern OCTAVE_API int +SparseCholPrint (const char *fmt, ...); extern OCTAVE_API bool sparse_indices_ok (octave_idx_type *r, octave_idx_type *c,