1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-30 02:27:38 +01:00

(UNUSED): New macro.

(UNW_DEBUG): If DEBUG is not defined, set it to 0.
(inline): Take advantage of UNUSED macro.
(HAVE_CMPXCHG): Don't define it if we're on HP-UX with GCC v3.2 to
	work around a compiler-bug.

(Logical change 1.130)
This commit is contained in:
hp.com!davidm 2003-11-27 06:52:54 +00:00
parent 7eaa3cea76
commit 04dd29b6eb

View file

@ -52,6 +52,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#endif #endif
#ifdef __GNUC__ #ifdef __GNUC__
# define UNUSED __attribute__((unused))
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) # if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
# define HIDDEN __attribute__((visibility ("hidden"))) # define HIDDEN __attribute__((visibility ("hidden")))
# else # else
@ -65,6 +66,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
# define unlikely(x) (x) # define unlikely(x) (x)
# endif # endif
#else #else
# define UNUSED
# define HIDDEN # define HIDDEN
# define likely(x) (x) # define likely(x) (x)
# define unlikely(x) (x) # define unlikely(x) (x)
@ -72,6 +74,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifdef DEBUG #ifdef DEBUG
# define UNW_DEBUG 1 # define UNW_DEBUG 1
#else
# define UNW_DEBUG 0
#endif #endif
#if UNW_DEBUG #if UNW_DEBUG
@ -82,7 +86,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
fprintf (stderr, format) fprintf (stderr, format)
# ifdef __GNUC__ # ifdef __GNUC__
# undef inline # undef inline
# define inline __attribute__ ((unused)) # define inline UNUSED
# endif # endif
#else #else
# define debug(level,format...) # define debug(level,format...)
@ -110,7 +114,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
(AO_T) (_o), \ (AO_T) (_o), \
(AO_T) (_n)) (AO_T) (_n))
# define fetch_and_add1(_ptr) AO_fetch_and_add1(_ptr) # define fetch_and_add1(_ptr) AO_fetch_and_add1(_ptr)
# define HAVE_CMPXCHG /* GCC 3.2.0 on HP-UX crashes on cmpxchg_ptr() */
# if !(defined(__hpux) && __GNUC__ == 3 && __GNUC_MINOR__ == 2)
# define HAVE_CMPXCHG
# endif
# define HAVE_FETCH_AND_ADD1 # define HAVE_FETCH_AND_ADD1
#else #else
# ifdef HAVE_IA64INTRIN_H # ifdef HAVE_IA64INTRIN_H