mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-05-31 00:45:48 +08:00
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.
This commit is contained in:
@@ -33,6 +33,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <stdio.h>
|
||||
#include "common.h"
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define copysign(x,y) ((y) < 0 ? ((x) < 0 ? (x) : -(x)) : ((x) < 0 ? -(x) : (x)))
|
||||
|
||||
@@ -54,7 +57,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define LASET BLASFUNC(slaset)
|
||||
#endif
|
||||
|
||||
FLOAT LAMC3(FLOAT *, FLOAT *);
|
||||
FLOATRET LAMC3(FLOAT *, FLOAT *);
|
||||
void LAED4(blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, blasint *);
|
||||
void LACPY(char *, blasint *, blasint *, FLOAT *, blasint *, FLOAT *, blasint *);
|
||||
void LASET(char *, blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, blasint *);
|
||||
|
||||
@@ -53,7 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define LASET BLASFUNC(slaset)
|
||||
#endif
|
||||
|
||||
FLOAT LAMC3(FLOAT *, FLOAT *);
|
||||
FLOATRET LAMC3(FLOAT *, FLOAT *);
|
||||
void LAED4(blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, FLOAT *, blasint *);
|
||||
void LACPY(char *, blasint *, blasint *, FLOAT *, blasint *, FLOAT *, blasint *);
|
||||
void LASET(char *, blasint *, blasint *, FLOAT *, FLOAT *, FLOAT *, blasint *);
|
||||
|
||||
Reference in New Issue
Block a user