Skip to content

Commit f272216

Browse files
committed
lapack/laed3: fix MinGW build for slaed3
common_interface.h declares slamc3 as returning FLOATRET when NEED_F2CCONV is enabled, but laed3_single.c and laed3_parallel.c redeclared LAMC3 as returning FLOAT. This causes conflicting-type errors in MinGW builds. Use FLOATRET for the local LAMC3 prototype so it matches the shared declaration. Also undefine the Windows max macro before the local max definition in laed3_parallel.c to avoid macro redefinition warnings.
1 parent 9b3cc78 commit f272216

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lapack/laed3/laed3_parallel.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
#include <stdio.h>
3434
#include "common.h"
3535

36+
#ifdef max
37+
#undef max
38+
#endif
3639
#define max(a,b) ((a) > (b) ? (a) : (b))
3740
#define copysign(x,y) ((y) < 0 ? ((x) < 0 ? (x) : -(x)) : ((x) < 0 ? -(x) : (x)))
3841

@@ -54,7 +57,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5457
#define LASET BLASFUNC(slaset)
5558
#endif
5659

57-
FLOAT LAMC3(FLOAT *, FLOAT *);
60+
FLOATRET LAMC3(FLOAT *, FLOAT *);
5861
void LAED4(blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, blasint *);
5962
void LACPY(char *, blasint *, blasint *, FLOAT *, blasint *, FLOAT *, blasint *);
6063
void LASET(char *, blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, blasint *);

lapack/laed3/laed3_single.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5353
#define LASET BLASFUNC(slaset)
5454
#endif
5555

56-
FLOAT LAMC3(FLOAT *, FLOAT *);
56+
FLOATRET LAMC3(FLOAT *, FLOAT *);
5757
void LAED4(blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, blasint *);
5858
void LACPY(char *, blasint *, blasint *, FLOAT *, blasint *, FLOAT *, blasint *);
5959
void LASET(char *, blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, blasint *);

0 commit comments

Comments
 (0)