octave-iso2mesh/octave-iso2mesh-c99.patch

37 lines
1.3 KiB
Diff

Avoid implicit function declarations: Declare lsame_ and
xerbla_. Include <slu_ddefs.h> for dCreate_CompCol_Matrix,
dCreate_Dense_Matrix, dgssv. Prevents build failures with future
compilers.
Submitted upstream: <https://github.com/fangq/meshfix/pull/1>
diff -ur iso2mesh-1.9.6.orig/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c iso2mesh-1.9.6/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c
--- iso2mesh-1.9.6.orig/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c 2020-06-20 18:44:57.000000000 +0200
+++ iso2mesh-1.9.6/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c 2023-04-14 09:02:52.027673795 +0200
@@ -1480,6 +1480,8 @@
typedef NLboolean logical ;
typedef NLint ftnlen ;
+int NL_FORTRAN_WRAP(lsame)(char *ca, char *cb);
+int NL_FORTRAN_WRAP(xerbla)(char *srname, int *info);
#ifndef max
#define max(x,y) ((x) > (y) ? (x) : (y))
@@ -3437,6 +3439,16 @@
/* SuperLU includes */
#include <slu_cdefs.h>
+
+/* Hide the dgemv, gemv_ prototypes because the local definition is
+ different (the n, m arguments are integers, not pointers to
+ integers here). */
+#define dgemv dgemv_hidden
+#define dgemv_ dgemv__hidden
+#include <slu_ddefs.h>
+#undef dgemv
+#undef dgemv_
+
#include <supermatrix.h>
/* Note: SuperLU is difficult to call, but it is worth it. */