Fixed some compiler errors/warnings for clang.

This commit is contained in:
Hank Anderson 2015-02-25 11:52:25 -06:00
parent 518e2424a8
commit 84d90d6ed8
4 changed files with 10 additions and 6 deletions

View File

@ -310,7 +310,7 @@ typedef int blasint;
#endif
#if defined(OS_WINDOWS)
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
#define YIELDING YieldProcessor()
#else
#define YIELDING SwitchToThread()

View File

@ -40,7 +40,7 @@
#include <string.h>
#include "cpuid.h"
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
#define C_INLINE __inline
#else
#define C_INLINE inline
@ -154,7 +154,7 @@ static C_INLINE int have_excpuid(void){
#ifndef NO_AVX
static C_INLINE void xgetbv(int op, int * eax, int * edx){
//Use binary code for xgetbv
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
*eax = __xgetbv(op);
#else
__asm__ __volatile__

View File

@ -769,12 +769,12 @@ static void *alloc_hugetlb(void *address){
if (LookupPrivilegeValue(NULL, SE_LOCK_MEMORY_NAME, &tp.Privileges[0].Luid) != TRUE) {
CloseHandle(hToken);
return -1;
return (void*)-1;
}
if (AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) != TRUE) {
CloseHandle(hToken);
return -1;
return (void*)-1;
}
map_address = (void *)VirtualAlloc(address,

View File

@ -35,9 +35,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**************************************************************************************/
#include "common.h"
#include <complex.h>
#ifndef _MSC_VER
#include <complex.h>
FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
#else
openblas_complex_double CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
#endif
{
BLASLONG i=0;
BLASLONG ix=0,iy=0;