From cd548fa41b9d298bea8e09b57655e20887d2e922 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 23 Sep 2013 11:25:48 +0300 Subject: [PATCH] Fix the definition of 'assume' for GCC older than 4.5. src/conf_post.h (__has_builtin): Define to zero, if undefined, on all platforms, not just for clang. --- src/ChangeLog | 5 +++++ src/conf_post.h | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 29cd8676584..093368568c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-09-23 Eli Zaretskii + + * conf_post.h (__has_builtin): Define to zero, if undefined, on + all platforms, not just for clang. + 2013-09-23 Jan Djärv * filelock.c (lock_file_1): Rearrange to remove compiler warning diff --git a/src/conf_post.h b/src/conf_post.h index 7d4e1f43ed7..3c348d0705b 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -248,10 +248,8 @@ extern void _DebPrint (const char *fmt, ...); # define FLEXIBLE_ARRAY_MEMBER 1 #endif -#ifdef __clang__ -# ifndef __has_builtin -# define __has_builtin(x) 0 -# endif +#ifndef __has_builtin +# define __has_builtin(x) 0 #endif /* assume(cond) tells the compiler (and lint) that a certain condition -- 2.39.2