LogCabin
|
00001 /* Copyright (c) 2015 Diego Ongaro 00002 * 00003 * Permission to use, copy, modify, and distribute this software for any 00004 * purpose with or without fee is hereby granted, provided that the above 00005 * copyright notice and this permission notice appear in all copies. 00006 * 00007 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIM ALL WARRANTIES 00008 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 00009 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHORS BE LIABLE FOR 00010 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 00011 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 00012 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 00013 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00014 */ 00015 00016 #ifndef LOGCABIN_CORE_COMPATATOMIC_H 00017 #define LOGCABIN_CORE_COMPATATOMIC_H 00018 00019 // std::atomic header file renamed in gcc 4.5. 00020 // Clang uses <atomic> but has defines like gcc 4.2. 00021 #if __GNUC__ == 4 && __GNUC_MINOR__ < 5 && !__clang__ 00022 #include <cstdatomic> 00023 #else 00024 #include <atomic> 00025 #endif 00026 00027 #endif // LOGCABIN_CORE_COMPATATOMIC_H