Change to allow compiling with USE_OPENMP on MSVC
MSVC treats the declaration of omp_in_parallel and omp_get_num_procs without the modifiers __declspec(dllimport) and __cdecl as a redefinition.
This commit is contained in:
parent
f04af36ad0
commit
a94f2b7848
5
common.h
5
common.h
|
@ -626,9 +626,14 @@ void gotoblas_profile_init(void);
|
||||||
void gotoblas_profile_quit(void);
|
void gotoblas_profile_quit(void);
|
||||||
|
|
||||||
#ifdef USE_OPENMP
|
#ifdef USE_OPENMP
|
||||||
|
#ifndef C_MSVC
|
||||||
int omp_in_parallel(void);
|
int omp_in_parallel(void);
|
||||||
int omp_get_num_procs(void);
|
int omp_get_num_procs(void);
|
||||||
#else
|
#else
|
||||||
|
__declspec(dllimport) int __cdecl omp_in_parallel(void);
|
||||||
|
__declspec(dllimport) int __cdecl omp_get_num_procs(void);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
int omp_in_parallel (void) __attribute__ ((weak));
|
int omp_in_parallel (void) __attribute__ ((weak));
|
||||||
int omp_get_num_procs(void) __attribute__ ((weak));
|
int omp_get_num_procs(void) __attribute__ ((weak));
|
||||||
|
|
Loading…
Reference in New Issue