未在gcc 4.4.5中定义_GLIBCXX_ATOMIC_BUILTINS [英] _GLIBCXX_ATOMIC_BUILTINS not defined in gcc 4.4.5
本文介绍了未在gcc 4.4.5中定义_GLIBCXX_ATOMIC_BUILTINS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些我正在移植的代码,并且我已经追踪到了错误,遗漏了
的宏_GLIBCXX_ATOMIC_BUILTINS
I have some code that I'm porting and I've tracked down the error to missing the macro _GLIBCXX_ATOMIC_BUILTINS
更高版本的gcc没有定义这个?
Do later versions of gcc not define this?
解决这个问题的正确方法是什么?
What's the proper way to get around this?
推荐答案
在该版本中,您还需要检查某些特定数据类型的原子宏, p>
In that version you will also want to check the atomic macros for some particular data type, so you could do:
#if defined(_GLIBCXX_ATOMIC_BUILTINS_4) && !defined(_GLIBCXX_ATOMIC_BUILTINS)
#define _GLIBCXX_ATOMIC_BUILTINS
#endif
或 p>
or
#if defined(_GLIBCXX_ATOMIC_BUILTINS) || defined(_GLIBCXX_ATOMIC_BUILTINS_4)
宏是:
The macros are:
/* Define if builtin atomic operations for bool are supported on this host. */
#undef _GLIBCXX_ATOMIC_BUILTINS_1
/* Define if builtin atomic operations for short are supported on this host. */
#undef _GLIBCXX_ATOMIC_BUILTINS_2
/* Define if builtin atomic operations for int are supported on this host. */
#undef _GLIBCXX_ATOMIC_BUILTINS_4
/* Define if builtin atomic operations for long long are supported on this
host. */
#undef _GLIBCXX_ATOMIC_BUILTINS_8
这篇关于未在gcc 4.4.5中定义_GLIBCXX_ATOMIC_BUILTINS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文