Skip to content

Commit e641115

Browse files
committed
Fix CBLAS xerbla following hidden strlen argument changes
Commits 2d9fbde and 628a209 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.
1 parent c8cb980 commit e641115

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CBLAS/include/cblas_f77.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,11 @@
527527
extern "C" {
528528
#endif
529529

530-
void F77_xerbla(FCHAR, void *);
530+
#ifdef BLAS_FORTRAN_STRLEN_END
531+
#define F77_xerbla(...) F77_xerbla_base(__VA_ARGS__, 1)
532+
#else
533+
#define F77_xerbla(...) F77_xerbla_base(__VA_ARGS__)
534+
#endif
531535
void F77_xerbla_base(FCHAR, void *
532536
#ifdef BLAS_FORTRAN_STRLEN_END
533537
, size_t

CBLAS/src/xerbla.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ void
1010
#ifdef HAS_ATTRIBUTE_WEAK_SUPPORT
1111
__attribute__((weak))
1212
#endif
13-
F77_xerbla
13+
F77_xerbla_base
1414
#ifdef F77_CHAR
15-
(F77_CHAR F77_srname, void *vinfo)
15+
(F77_CHAR F77_srname, void *vinfo
1616
#else
17-
(char *srname, void *vinfo)
17+
(char *srname, void *vinfo
1818
#endif
19-
19+
#ifdef BLAS_FORTRAN_STRLEN_END
20+
, size_t len
21+
#endif
22+
)
2023
{
2124
#ifdef F77_CHAR
2225
char *srname;

0 commit comments

Comments
 (0)