--- SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.orig 2023-01-08 20:43:25.056391141 +0100 +++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.h 2023-01-08 20:44:40.592648593 +0100 @@ -38,13 +38,13 @@ #ifndef SUITESPARSE_CONFIG_H #define SUITESPARSE_CONFIG_H +#include +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - /* ========================================================================== */ /* === SuiteSparse_long ===================================================== */ /* ========================================================================== */ --- SuiteSparse/AMD/Include/amd.h.orig 2014-03-21 20:21:57.000000000 +0100 +++ SuiteSparse/AMD/Include/amd.h 2023-01-04 20:58:16.230505798 +0100 @@ -35,16 +35,16 @@ #ifndef AMD_H #define AMD_H +/* get the definition of size_t: */ +#include + +#include "SuiteSparse_config.h" + /* make it easy for C++ programs to include AMD */ #ifdef __cplusplus extern "C" { #endif -/* get the definition of size_t: */ -#include - -#include "SuiteSparse_config.h" - int amd_order /* returns AMD_OK, AMD_OK_BUT_JUMBLED, * AMD_INVALID, or AMD_OUT_OF_MEMORY */ ( --- SuiteSparse/BTF/Include/btf.h.orig 2023-01-05 21:42:08.734841990 +0100 +++ SuiteSparse/BTF/Include/btf.h 2023-01-05 21:42:11.574826604 +0100 @@ -88,13 +88,13 @@ #ifndef _BTF_H #define _BTF_H +#include "SuiteSparse_config.h" + /* make it easy for C++ programs to include BTF */ #ifdef __cplusplus extern "C" { #endif -#include "SuiteSparse_config.h" - int btf_maxtrans /* returns # of columns matched */ ( /* --- input, not modified: --- */ --- SuiteSparse/CAMD/Include/camd.h.orig 2014-03-21 20:21:51.000000000 +0100 +++ SuiteSparse/CAMD/Include/camd.h 2023-01-07 11:34:30.942879513 +0100 @@ -23,16 +23,16 @@ #ifndef CAMD_H #define CAMD_H -/* make it easy for C++ programs to include CAMD */ -#ifdef __cplusplus -extern "C" { -#endif - /* get the definition of size_t: */ #include #include "SuiteSparse_config.h" +/* make it easy for C++ programs to include CAMD */ +#ifdef __cplusplus +extern "C" { +#endif + int camd_order /* returns CAMD_OK, CAMD_OK_BUT_JUMBLED, * CAMD_INVALID, or CAMD_OUT_OF_MEMORY */ ( --- SuiteSparse/CCOLAMD/Include/ccolamd.h.orig 2014-03-21 20:21:07.000000000 +0100 +++ SuiteSparse/CCOLAMD/Include/ccolamd.h 2023-01-07 14:56:06.067354598 +0100 @@ -16,14 +16,14 @@ #ifndef CCOLAMD_H #define CCOLAMD_H +/* for size_t definition: */ +#include + /* make it easy for C++ programs to include CCOLAMD */ #ifdef __cplusplus extern "C" { #endif -/* for size_t definition: */ -#include - /* ========================================================================== */ /* === CCOLAMD version ====================================================== */ /* ========================================================================== */ --- SuiteSparse/COLAMD/Include/colamd.h.orig 2014-03-21 20:13:38.000000000 +0100 +++ SuiteSparse/COLAMD/Include/colamd.h 2023-01-07 16:11:41.276118597 +0100 @@ -44,17 +44,17 @@ #ifndef COLAMD_H #define COLAMD_H -/* make it easy for C++ programs to include COLAMD */ -#ifdef __cplusplus -extern "C" { -#endif - /* ========================================================================== */ /* === Include files ======================================================== */ /* ========================================================================== */ #include +/* make it easy for C++ programs to include COLAMD */ +#ifdef __cplusplus +extern "C" { +#endif + /* ========================================================================== */ /* === COLAMD version ======================================================= */ /* ========================================================================== */ --- SuiteSparse/CHOLMOD/Include/cholmod_blas.h.orig 2023-01-07 17:06:54.181504381 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_blas.h 2023-01-07 17:06:58.504814293 +0100 @@ -15,6 +15,11 @@ #ifndef CHOLMOD_BLAS_H #define CHOLMOD_BLAS_H +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* ========================================================================== */ /* === Architecture ========================================================= */ /* ========================================================================== */ @@ -452,4 +457,8 @@ void BLAS_ZGER (BLAS_INT *m, BLAS_INT *n } \ } +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_camd.h.orig 2014-03-21 20:11:21.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_camd.h 2023-01-07 17:07:49.154539900 +0100 @@ -31,6 +31,10 @@ #include "cholmod_core.h" +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_ccolamd */ /* -------------------------------------------------------------------------- */ @@ -99,4 +103,8 @@ int cholmod_camd int cholmod_l_camd (cholmod_sparse *, SuiteSparse_long *, size_t, SuiteSparse_long *, SuiteSparse_long *, cholmod_common *) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_check.h.orig 2014-03-21 20:11:21.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_check.h 2023-01-07 17:08:22.791024342 +0100 @@ -69,6 +69,11 @@ #include "cholmod_core.h" #include +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_check_common: check the Common object */ /* -------------------------------------------------------------------------- */ @@ -424,4 +429,9 @@ int cholmod_write_dense int cholmod_l_write_dense (FILE *, cholmod_dense *, const char *, cholmod_common *) ; + +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_cholesky.h.orig 2014-06-04 21:33:21.000000000 +0200 +++ SuiteSparse/CHOLMOD/Include/cholmod_cholesky.h 2023-01-07 17:09:00.270821296 +0100 @@ -67,6 +67,11 @@ #include "cholmod_supernodal.h" #endif +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_analyze: order and analyze (simplicial or supernodal) */ /* -------------------------------------------------------------------------- */ @@ -584,4 +589,8 @@ SuiteSparse_long cholmod_postorder /* re SuiteSparse_long cholmod_l_postorder (SuiteSparse_long *, size_t, SuiteSparse_long *, SuiteSparse_long *, cholmod_common *) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_core.h.orig 2015-07-15 05:18:18.000000000 +0200 +++ SuiteSparse/CHOLMOD/Include/cholmod_core.h 2023-01-08 20:50:15.337501791 +0100 @@ -289,6 +289,11 @@ #define CHOLMOD_HOST_SUPERNODE_BUFFERS 8 #define CHOLMOD_DEVICE_STREAMS 2 +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* ========================================================================== */ /* === CHOLMOD objects ====================================================== */ /* ========================================================================== */ @@ -2447,4 +2452,8 @@ int cholmod_l_version (int version [3]) #endif +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_gpu.h.orig 2014-03-24 15:11:20.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_gpu.h 2023-01-07 17:13:58.369206359 +0100 @@ -23,6 +23,11 @@ #include #endif +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* CHOLMOD_GPU_PRINTF: for printing GPU debug error messages */ /* #define CHOLMOD_GPU_PRINTF(args) printf args @@ -77,4 +82,8 @@ void cholmod_l_gpu_end ( cholmod_common int cholmod_gpu_allocate ( cholmod_common *Common ) ; int cholmod_l_gpu_allocate ( cholmod_common *Common ) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_gpu_kernels.h.orig 2014-03-23 01:15:27.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_gpu_kernels.h 2023-01-07 17:14:19.432425583 +0100 @@ -19,13 +19,13 @@ #ifndef CHOLMODGPUKERNELS_H #define CHOLMODGPUKERNELS_H +#include "SuiteSparse_config.h" + /* make it easy for C++ programs to include CHOLMOD */ #ifdef __cplusplus extern "C" { #endif -#include "SuiteSparse_config.h" - int createMapOnDevice ( Int *d_Map, Int *d_Ls, Int psi, Int nsrow ); int createRelativeMapOnDevice ( Int *d_Map, Int *d_Ls, Int *d_RelativeMap, --- SuiteSparse/CHOLMOD/Include/cholmod_matrixops.h.orig 2014-03-21 20:11:19.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_matrixops.h 2023-01-07 17:19:34.947382958 +0100 @@ -37,6 +37,11 @@ #include "cholmod_core.h" +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_drop: drop entries with small absolute value */ /* -------------------------------------------------------------------------- */ @@ -234,4 +239,8 @@ int cholmod_l_symmetry (cholmod_sparse * SuiteSparse_long *, SuiteSparse_long *, SuiteSparse_long *, cholmod_common *) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_modify.h.orig 2014-06-04 21:44:15.000000000 +0200 +++ SuiteSparse/CHOLMOD/Include/cholmod_modify.h 2023-01-07 17:20:07.183874985 +0100 @@ -47,6 +47,11 @@ #include "cholmod_core.h" +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_updown: multiple rank update/downdate */ /* -------------------------------------------------------------------------- */ @@ -324,4 +329,8 @@ int cholmod_l_rowdel_mark (size_t, cholm SuiteSparse_long *, cholmod_factor *, cholmod_dense *, cholmod_dense *, cholmod_common *) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_partition.h.orig 2014-03-21 20:11:21.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_partition.h 2023-01-07 17:20:32.837069343 +0100 @@ -40,6 +40,11 @@ #include "cholmod_core.h" #include "cholmod_camd.h" +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_nested_dissection */ /* -------------------------------------------------------------------------- */ @@ -163,4 +168,8 @@ SuiteSparse_long cholmod_collapse_septre SuiteSparse_long cholmod_l_collapse_septree (size_t, size_t, double, size_t, SuiteSparse_long *, SuiteSparse_long *, cholmod_common *) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod_supernodal.h.orig 2014-03-21 20:11:21.000000000 +0100 +++ SuiteSparse/CHOLMOD/Include/cholmod_supernodal.h 2023-01-07 17:21:07.966879028 +0100 @@ -49,6 +49,11 @@ #include "cholmod_core.h" +/* make it easy for C++ programs to include CHOLMOD */ +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* cholmod_super_symbolic */ /* -------------------------------------------------------------------------- */ @@ -169,4 +174,8 @@ int cholmod_super_ltsolve int cholmod_l_super_ltsolve (cholmod_factor *, cholmod_dense *, cholmod_dense *, cholmod_common *) ; +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CHOLMOD/Include/cholmod.h.orig 2014-09-16 22:27:35.000000000 +0200 +++ SuiteSparse/CHOLMOD/Include/cholmod.h 2023-01-08 20:50:28.674096207 +0100 @@ -75,11 +75,6 @@ #ifndef CHOLMOD_H #define CHOLMOD_H -/* make it easy for C++ programs to include CHOLMOD */ -#ifdef __cplusplus -extern "C" { -#endif - /* assume large file support. If problems occur, compile with -DNLARGEFILE */ #include "cholmod_io64.h" @@ -123,8 +118,4 @@ extern "C" { #include "cholmod_gpu.h" #endif -#ifdef __cplusplus -} -#endif - #endif --- SuiteSparse/CSparse/Include/cs.h.orig 2014-10-09 22:01:10.000000000 +0200 +++ SuiteSparse/CSparse/Include/cs.h 2023-01-08 20:53:36.066414349 +0100 @@ -14,6 +14,10 @@ #define CS_DATE "Oct 10, 2014" /* CSparse release date */ #define CS_COPYRIGHT "Copyright (c) Timothy A. Davis, 2006-2014" +#ifdef __cplusplus +extern "C" { +#endif + #ifdef MATLAB_MEX_FILE #undef csi #define csi mwSignedIndex @@ -149,4 +153,9 @@ csn *cs_ndone (csn *N, cs *C, void *w, v #define CS_MARK(w,j) { w [j] = CS_FLIP (w [j]) ; } #define CS_CSC(A) (A && (A->nz == -1)) #define CS_TRIPLET(A) (A && (A->nz >= 0)) + +#ifdef __cplusplus +} +#endif + #endif --- SuiteSparse/CXSparse/Include/cs.h.orig 2014-03-25 15:57:05.000000000 +0100 +++ SuiteSparse/CXSparse/Include/cs.h 2023-01-07 20:23:44.164190879 +0100 @@ -14,7 +14,6 @@ #include typedef std::complex cs_complex_t ; #endif -extern "C" { #else #ifndef NCOMPLEX #include @@ -34,6 +33,10 @@ extern "C" { #define cs_long_t_id SuiteSparse_long_id #define cs_long_t_max SuiteSparse_long_max +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* double/int version of CXSparse */ /* -------------------------------------------------------------------------- */ --- SuiteSparse/KLU/Include/klu.h.orig 2014-03-21 20:21:26.000000000 +0100 +++ SuiteSparse/KLU/Include/klu.h 2023-01-07 19:11:09.271116694 +0100 @@ -7,15 +7,15 @@ #ifndef _KLU_H #define _KLU_H +#include "amd.h" +#include "colamd.h" +#include "btf.h" + /* make it easy for C++ programs to include KLU */ #ifdef __cplusplus extern "C" { #endif -#include "amd.h" -#include "colamd.h" -#include "btf.h" - /* -------------------------------------------------------------------------- */ /* Symbolic object - contains the pre-ordering computed by klu_analyze */ /* -------------------------------------------------------------------------- */ --- SuiteSparse/LDL/Include/ldl.h.orig 2014-10-09 22:29:41.000000000 +0200 +++ SuiteSparse/LDL/Include/ldl.h 2023-01-08 20:54:57.482639946 +0100 @@ -38,6 +38,10 @@ #endif +#ifdef __cplusplus +extern "C" { +#endif + /* ========================================================================== */ /* === int version ========================================================== */ /* ========================================================================== */ @@ -110,3 +114,6 @@ SuiteSparse_long ldl_l_valid_matrix ( Su #define LDL_SUBSUB_VERSION 1 #define LDL_VERSION LDL_VERSION_CODE(LDL_MAIN_VERSION,LDL_SUB_VERSION) +#ifdef __cplusplus +} +#endif --- SuiteSparse/RBio/Include/RBio.h.orig 2014-03-21 20:22:01.000000000 +0100 +++ SuiteSparse/RBio/Include/RBio.h 2023-01-07 20:55:56.607055271 +0100 @@ -46,10 +46,6 @@ #include "SuiteSparse_config.h" -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include @@ -60,6 +56,10 @@ extern "C" { #include "mex.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + /* -------------------------------------------------------------------------- */ /* error codes */ /* -------------------------------------------------------------------------- */ --- SuiteSparse/SPQR/Include/SuiteSparseQR_C.h.orig 2012-05-28 01:00:20.000000000 +0200 +++ SuiteSparse/SPQR/Include/SuiteSparseQR_C.h 2023-01-07 21:28:30.366470847 +0100 @@ -11,7 +11,6 @@ /* If included by a C++ program, the Complex type is std::complex */ #include #define Complex std::complex -extern "C" { #endif #include "cholmod.h" @@ -22,6 +21,8 @@ extern "C" { size n, which the C code must then interpret as double array of size 2*n, with real and imaginary parts interleaved. */ #define Complex double +#else +extern "C" { #endif /* ========================================================================== */ --- SuiteSparse/SPQR/Include/SuiteSparseQR.hpp.orig 2023-01-08 20:55:20.329182842 +0100 +++ SuiteSparse/SPQR/Include/SuiteSparseQR.hpp 2023-01-08 20:56:01.678958831 +0100 @@ -11,11 +11,8 @@ // include files // ----------------------------------------------------------------------------- -extern "C" -{ #include "SuiteSparseQR_definitions.h" #include "cholmod.h" -} // ============================================================================= // === spqr_gpu ================================================================ --- SuiteSparse/SPQR/Include/spqr.hpp.orig 2014-03-19 20:39:23.000000000 +0100 +++ SuiteSparse/SPQR/Include/spqr.hpp 2023-01-07 21:29:30.076147372 +0100 @@ -1015,9 +1015,7 @@ inline Long spqr_mult (Long a, Long b, i // To compile SuiteSparseQR with 64-bit BLAS, use -DBLAS64. See also // CHOLMOD/Include/cholmod_blas.h -extern "C" { #include "cholmod_blas.h" -} #undef CHECK_BLAS_INT #undef EQ --- SuiteSparse/UMFPACK/Include/umfpack.h.orig 2014-03-21 20:16:08.000000000 +0100 +++ SuiteSparse/UMFPACK/Include/umfpack.h 2023-01-07 21:59:54.662929404 +0100 @@ -22,10 +22,6 @@ /* Make it easy for C++ programs to include UMFPACK */ /* -------------------------------------------------------------------------- */ -#ifdef __cplusplus -extern "C" { -#endif - #include "SuiteSparse_config.h" /* -------------------------------------------------------------------------- */ @@ -42,6 +38,13 @@ extern "C" { /* User-callable routines */ /* -------------------------------------------------------------------------- */ +/* AMD */ +#include "amd.h" + +#ifdef __cplusplus +extern "C" { +#endif + /* Primary routines: */ #include "umfpack_symbolic.h" #include "umfpack_numeric.h" @@ -85,9 +88,6 @@ extern "C" { #include "umfpack_timer.h" #include "umfpack_tictoc.h" -/* AMD */ -#include "amd.h" - /* global function pointers */ #include "umfpack_global.h"