From b5fce4e6eb297a6f7fabd0d6c6b4ffdfefa6ad8b Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Sun, 26 Feb 2017 12:14:54 +0000 Subject: Import Mesa 13.0.5 --- lib/mesa/src/util/list.h | 2 +- lib/mesa/src/util/macros.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/mesa/src/util') diff --git a/lib/mesa/src/util/list.h b/lib/mesa/src/util/list.h index e8a99ac8e..07eb9f3e6 100644 --- a/lib/mesa/src/util/list.h +++ b/lib/mesa/src/util/list.h @@ -110,7 +110,7 @@ static inline bool list_empty(struct list_head *list) */ static inline bool list_is_singular(const struct list_head *list) { - return list->next != NULL && list->next->next == list; + return list->next != NULL && list->next != list && list->next->next == list; } static inline unsigned list_length(struct list_head *list) diff --git a/lib/mesa/src/util/macros.h b/lib/mesa/src/util/macros.h index 27d1b6292..efb896f4c 100644 --- a/lib/mesa/src/util/macros.h +++ b/lib/mesa/src/util/macros.h @@ -167,12 +167,12 @@ do { \ * performs no action and all member variables and base classes are * trivially destructible themselves. */ -# if defined(__GNUC__) -# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) +# if (defined(__clang__) && defined(__has_feature)) +# if __has_feature(has_trivial_destructor) # define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) # endif -# elif (defined(__clang__) && defined(__has_feature)) -# if __has_feature(has_trivial_destructor) +# elif defined(__GNUC__) +# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) # define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) # endif # endif -- cgit v1.2.3