From e6411157cb4a3c568105088d99c3974f29d43c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 1 Sep 2021 14:43:21 +0200 Subject: [PATCH] Fix CBLAS xerbla following hidden strlen argument changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commits 2d9fbdeecca906d7abb89e9cc16b02ed5286298e and 628a2095c24021ab07904e036389ebc4feb3e67a changed the function prototypes in the cblas_f77.h. However, the F77_xerbla case was not treated in the same way as the others. In particular, the consequence is now that the xerbla function provided by the CBLAS/src/xerbla.c file is never called at runtime (because it is identified as “F77_xerbla” in the symbol table, instead of simply “xerbla”, since F77_xerbla is *not* a macro). This patch restores the symmetry between xerbla and the other functions. --- CBLAS/include/cblas_f77.h | 6 +++++- CBLAS/src/xerbla.c | 11 +++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CBLAS/include/cblas_f77.h b/CBLAS/include/cblas_f77.h index 9c87428ace..e4ae8125e2 100644 --- a/CBLAS/include/cblas_f77.h +++ b/CBLAS/include/cblas_f77.h @@ -527,7 +527,11 @@ extern "C" { #endif -void F77_xerbla(FCHAR, void *); +#ifdef BLAS_FORTRAN_STRLEN_END + #define F77_xerbla(...) F77_xerbla_base(__VA_ARGS__, 1) +#else + #define F77_xerbla(...) F77_xerbla_base(__VA_ARGS__) +#endif void F77_xerbla_base(FCHAR, void * #ifdef BLAS_FORTRAN_STRLEN_END , size_t diff --git a/CBLAS/src/xerbla.c b/CBLAS/src/xerbla.c index 1857e92e84..fbe4415042 100644 --- a/CBLAS/src/xerbla.c +++ b/CBLAS/src/xerbla.c @@ -10,13 +10,16 @@ void #ifdef HAS_ATTRIBUTE_WEAK_SUPPORT __attribute__((weak)) #endif -F77_xerbla +F77_xerbla_base #ifdef F77_CHAR -(F77_CHAR F77_srname, void *vinfo) +(F77_CHAR F77_srname, void *vinfo #else -(char *srname, void *vinfo) +(char *srname, void *vinfo #endif - +#ifdef BLAS_FORTRAN_STRLEN_END +, size_t len +#endif +) { #ifdef F77_CHAR char *srname;