diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2017-06-09 00:52:07 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2017-06-09 00:52:07 +0300 |
commit | d0bbf851dfcacab57dc0f2e588bd90f5c20a6a67 (patch) | |
tree | f8d0aab4c1899566c56ed4c65145f74922f2e45e /tests | |
parent | 8f153757e0fa5347f08d76c47496684bf56015e6 (diff) | |
download | libatomic_ops-d0bbf851dfcacab57dc0f2e588bd90f5c20a6a67.tar.gz |
Avoid misleading 'AO_t undefined' error if wrong atomic_ops.h included
This change might be useful e.g. in case of compilation by Hexagon SDK
which has own atomic_ops.h file (not related to libatomic_ops).
* tests/run_parallel.h [!CPPCHECK]: Issue #error if AO_ATOMIC_OPS_H is
not defined after #include atomic_ops.h.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run_parallel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run_parallel.h b/tests/run_parallel.h index c61d359..dee7146 100644 --- a/tests/run_parallel.h +++ b/tests/run_parallel.h @@ -33,6 +33,10 @@ #include "atomic_ops.h" +#if !defined(AO_ATOMIC_OPS_H) && !defined(CPPCHECK) +# error Wrong atomic_ops.h included. +#endif + #if (defined(_WIN32_WCE) || defined(__MINGW32CE__)) && !defined(AO_HAVE_abort) # define abort() _exit(-1) /* there is no abort() in WinCE */ #endif |