From 38515e5027712d443e3f18cf8525af902372fe8a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 7 Feb 2011 11:14:52 +0100 Subject: Add __noreturn attribute, update copyright --- inotail.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'inotail.h') diff --git a/inotail.h b/inotail.h index 3320c3d..e5ad3c3 100644 --- a/inotail.h +++ b/inotail.h @@ -1,7 +1,8 @@ /* - * Copyright (C) 2005-2009, Tobias Klauser + * Copyright (C) 2005-2011, Tobias Klauser * - * Licensed under the terms of the GNU General Public License; version 2 or later. + * This file is licensed under the terms of the GNU General Public License; + * version 2 or later. */ #ifndef _INOTAIL_H @@ -47,11 +48,13 @@ struct file_struct { #define is_digit(c) ((c) >= '0' && (c) <= '9') #ifdef __GNUC__ -# define likely(x) __builtin_expect(!!(x), 1) -# define unlikely(x) __builtin_expect(!!(x), 0) +# define __noreturn __attribute ((noreturn)) +# define likely(x) __builtin_expect(!!(x), 1) +# define unlikely(x) __builtin_expect(!!(x), 0) #else -# define likely(x) (x) -# define unlikely(x) (x) +# define __noreturn +# define likely(x) (x) +# define unlikely(x) (x) #endif /* __GNUC__ */ #ifdef DEBUG -- cgit v1.2.3-54-g00ecf