diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2004-09-13 11:21:03 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2004-09-13 11:21:03 +0000 |
commit | 167ce5fc3d7556e53b94ced04e1246cd35b3a157 (patch) | |
tree | b6fecc3e479df2138073372a3faafb0bcf3ad9b9 /atomic | |
parent | e493b7f5b00a5b069188d249f1b469d923418ef2 (diff) | |
download | libapr-167ce5fc3d7556e53b94ced04e1246cd35b3a157.tar.gz |
* atomic/unix/apr_atomic.c: Force use of generic atomics if gcc
defines __STRICT_ANSI__ (e.g. with -std=c89), since inline asm is not
supported in that case.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65328 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic')
-rw-r--r-- | atomic/unix/apr_atomic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/atomic/unix/apr_atomic.c b/atomic/unix/apr_atomic.c index 5827ba091..bf457c1ea 100644 --- a/atomic/unix/apr_atomic.c +++ b/atomic/unix/apr_atomic.c @@ -21,6 +21,12 @@ #include <stdlib.h> +#if defined(__GNUC__) && defined(__STRICT_ANSI__) && !defined(USE_GENERIC_ATOMICS) +/* force use of generic atomics if building e.g. with -std=c89, which + * doesn't allow inline asm */ +#define USE_GENERIC_ATOMICS +#endif + #if (defined(__i386__) || defined(__x86_64__)) \ && defined(__GNUC__) && !defined(USE_GENERIC_ATOMICS) |