diff libinterp/dldfcn/amd.cc @ 19173:afd6179d2616

allow building with new version of SuiteSparse (bug #43063) * oct-sparse.h (SUITESPARSE_ASSIGN_FPTR, SUITESPARSE_ASSIGN_FPTR2): New macros. * amd.cc, symbfact.cc, CSparse.cc, dSparse.cc, sparse-base-chol.cc: Use as needed. From Andre da Costa Barros <andre.cbarros@yahoo.com>.
author John W. Eaton <jwe@octave.org>
date Sun, 21 Sep 2014 15:45:08 -0400
parents c53e11fab75f
children e99d7a2e7367
line wrap: on
line diff
--- a/libinterp/dldfcn/amd.cc	Sun Sep 21 15:42:09 2014 -0400
+++ b/libinterp/dldfcn/amd.cc	Sun Sep 21 15:45:08 2014 -0400
@@ -164,11 +164,11 @@
 
               // FIXME: how can we manage the memory allocation of amd
               //        in a cleaner manner?
-              amd_malloc = malloc;
-              amd_free = free;
-              amd_calloc = calloc;
-              amd_realloc = realloc;
-              amd_printf = printf;
+              SUITESPARSE_ASSIGN_FPTR (malloc_func, amd_malloc, malloc);
+              SUITESPARSE_ASSIGN_FPTR (free_func, amd_free, free);
+              SUITESPARSE_ASSIGN_FPTR (calloc_func, amd_calloc, calloc);
+              SUITESPARSE_ASSIGN_FPTR (realloc_func, amd_realloc, realloc);
+              SUITESPARSE_ASSIGN_FPTR (printf_func, amd_printf, printf);
 
               octave_idx_type result = AMD_NAME (_order) (n_col, cidx, ridx, P,
                                                           Control, Info);