Skip to content

Commit ce6317f

Browse files
authored
Merge pull request #1594 from martin-frbg/issue1593
Fix inverted condition in _Atomic declaration
2 parents fc66a0e + 354a976 commit ce6317f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,19 +642,23 @@ void gotoblas_profile_init(void);
642642
void gotoblas_profile_quit(void);
643643

644644
#ifdef USE_OPENMP
645+
645646
#ifndef C_MSVC
646647
int omp_in_parallel(void);
647648
int omp_get_num_procs(void);
648649
#else
649650
__declspec(dllimport) int __cdecl omp_in_parallel(void);
650651
__declspec(dllimport) int __cdecl omp_get_num_procs(void);
651652
#endif
653+
652654
#if (__STDC_VERSION__ >= 201112L)
655+
#include <stdatomic.h>
656+
#else
653657
#ifndef _Atomic
654658
#define _Atomic volatile
655659
#endif
656-
#include <stdatomic.h>
657660
#endif
661+
658662
#else
659663
#ifdef __ELF__
660664
int omp_in_parallel (void) __attribute__ ((weak));

0 commit comments

Comments
 (0)