Skip to content

Commit

Permalink
Improve accuracy of HAVE_ATOMIC dependency check
Browse files Browse the repository at this point in the history
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
  • Loading branch information
reflection authored and antirez committed Aug 8, 2014
1 parent a8d3e93 commit 7e9f24d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,14 @@ void setproctitle(const char *fmt, ...);

#if (__i386 || __amd64 || __powerpc__) && __GNUC__
#define GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if (GNUC_VERSION >= 40100) || defined(__clang__)
#if defined(__clang__)
#define HAVE_ATOMIC
#endif
#if (defined(__GLIBC__) && defined(__GLIBC_PREREQ))
#if (GNUC_VERSION >= 40100 && __GLIBC_PREREQ(2, 6))
#define HAVE_ATOMIC
#endif
#endif
#endif

#endif

0 comments on commit 7e9f24d

Please sign in to comment.