-
Ben Pfaff authored
G++ 5 does not implement the _Atomic keyword, which is part of C11 but not C++11, so the existing <stdatomic.h> based atomic implementation doesn't work. This commit adds a new implementation based on the C++11 <atomic> header. In this area, C++ is pickier about types than C, so a few of the definitions in ovs-atomic.h have to be updated to use more precise types for integer constants. This updates the code that generates cxxtest.cc to #include <config.h> (so that HAVE_ATOMIC is defined) and to automatically regenerate when the program is reconfigured (because otherwise the #include <config.h>) won't get added without a "make clean" step). "ovs-atomic.h" is not a public header, but apparently some code was using it anyway. Fixes: 9c463631 ("ovs-atomic: Report error for contradictory configuration.") Reported-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
adabd65d