From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94028 invoked by alias); 17 Aug 2017 01:50:22 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 91913 invoked by uid 89); 17 Aug 2017 01:50:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=phoenix, acquires, held X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Aug 2017 01:50:13 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1314EC0546E4 for ; Thu, 17 Aug 2017 01:50:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1314EC0546E4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com Received: from red.redhat.com (ovpn-120-34.rdu2.redhat.com [10.10.120.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD275619C0 for ; Thu, 17 Aug 2017 01:50:11 +0000 (UTC) From: Eric Blake To: newlib@sourceware.org Subject: [PATCH] headers: avoid bareword attributes Date: Thu, 17 Aug 2017 02:07:00 -0000 Message-Id: <20170817015011.9345-1-eblake@redhat.com> X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00824.txt.bz2 Always use the __-decorated form of an attribute name in public headers, as the bareword form is in the user's namespace, and we don't want compilation to break just because the user defines the bareword to mean something else. Signed-off-by: Eric Blake --- newlib/libc/include/sys/cdefs.h | 28 ++++++++++++++-------------- newlib/libc/sys/phoenix/sys/unistd.h | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h index 2e63a07a2..9e58ee980 100644 --- a/newlib/libc/include/sys/cdefs.h +++ b/newlib/libc/include/sys/cdefs.h @@ -681,42 +681,42 @@ #endif /* Structure implements a lock. */ -#define __lockable __lock_annotate(lockable) +#define __lockable __lock_annotate(__lockable__) /* Function acquires an exclusive or shared lock. */ #define __locks_exclusive(...) \ - __lock_annotate(exclusive_lock_function(__VA_ARGS__)) + __lock_annotate(__exclusive_lock_function__(__VA_ARGS__)) #define __locks_shared(...) \ - __lock_annotate(shared_lock_function(__VA_ARGS__)) + __lock_annotate(__shared_lock_function__(__VA_ARGS__)) /* Function attempts to acquire an exclusive or shared lock. */ #define __trylocks_exclusive(...) \ - __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) + __lock_annotate(__exclusive_trylock_function__(__VA_ARGS__)) #define __trylocks_shared(...) \ - __lock_annotate(shared_trylock_function(__VA_ARGS__)) + __lock_annotate(__shared_trylock_function__(__VA_ARGS__)) /* Function releases a lock. */ -#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) +#define __unlocks(...) __lock_annotate(__unlock_function__(__VA_ARGS__)) /* Function asserts that an exclusive or shared lock is held. */ #define __asserts_exclusive(...) \ - __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) + __lock_annotate(__assert_exclusive_lock__(__VA_ARGS__)) #define __asserts_shared(...) \ - __lock_annotate(assert_shared_lock(__VA_ARGS__)) + __lock_annotate(__assert_shared_lock__(__VA_ARGS__)) /* Function requires that an exclusive or shared lock is or is not held. */ #define __requires_exclusive(...) \ - __lock_annotate(exclusive_locks_required(__VA_ARGS__)) + __lock_annotate(__exclusive_locks_required__(__VA_ARGS__)) #define __requires_shared(...) \ - __lock_annotate(shared_locks_required(__VA_ARGS__)) + __lock_annotate(__shared_locks_required__(__VA_ARGS__)) #define __requires_unlocked(...) \ - __lock_annotate(locks_excluded(__VA_ARGS__)) + __lock_annotate(__locks_excluded__(__VA_ARGS__)) /* Function should not be analyzed. */ -#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) +#define __no_lock_analysis __lock_annotate(__no_thread_safety_analysis__) /* Guard variables and structure members by lock. */ -#define __guarded_by(x) __lock_annotate(guarded_by(x)) -#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) +#define __guarded_by(x) __lock_annotate(__guarded_by__(x)) +#define __pt_guarded_by(x) __lock_annotate(__pt_guarded_by__(x)) #endif /* !_SYS_CDEFS_H_ */ diff --git a/newlib/libc/sys/phoenix/sys/unistd.h b/newlib/libc/sys/phoenix/sys/unistd.h index bdf5bd529..77b96ddd4 100644 --- a/newlib/libc/sys/phoenix/sys/unistd.h +++ b/newlib/libc/sys/phoenix/sys/unistd.h @@ -35,7 +35,7 @@ extern char **environ; -void _exit(int status) _ATTRIBUTE ((noreturn)); +void _exit(int status) _ATTRIBUTE ((__noreturn__)); int access(const char *pathname, int mode); unsigned int alarm(unsigned seconds); -- 2.13.5