Browse Source

Restore _Atomic define before stdatomic.h for old gcc

see #1593
tags/v0.3.1
Martin Kroeker GitHub 7 years ago
parent
commit
06d43760e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      common.h

+ 9
- 0
common.h View File

@@ -649,12 +649,21 @@ int omp_get_num_procs(void);
__declspec(dllimport) int __cdecl omp_in_parallel(void);
__declspec(dllimport) int __cdecl omp_get_num_procs(void);
#endif

#if (__STDC_VERSION__ >= 201112L)
#if defined(C_GCC) && ( __GNUC__ < 7)
// workaround for GCC bug 65467
#ifndef _Atomic
#define _Atomic volatile
#endif
#endif
#include <stdatomic.h>
#else
#ifndef _Atomic
#define _Atomic volatile
#endif


#else
#ifdef __ELF__
int omp_in_parallel (void) __attribute__ ((weak));


Loading…
Cancel
Save