From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 02:01:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BC2164; Fri, 27 Mar 2015 02:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9A40DCA; Fri, 27 Mar 2015 02:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R21NrX030362; Fri, 27 Mar 2015 02:01:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R21NvR030361; Fri, 27 Mar 2015 02:01:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503270201.t2R21NvR030361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 27 Mar 2015 02:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280726 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 02:01:24 -0000 Author: pfg Date: Fri Mar 27 02:01:22 2015 New Revision: 280726 URL: https://svnweb.freebsd.org/changeset/base/280726 Log: Fix __size_alloc() Use underscore for the attributes name: this should fix the use of the attributes in macros for lint(1). Suggested by: bde X-MFC with: r280700 Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Mar 27 01:58:44 2015 (r280725) +++ head/sys/sys/cdefs.h Fri Mar 27 02:01:22 2015 (r280726) @@ -212,7 +212,6 @@ #define __unused #define __packed #define __aligned(x) -#define __alloc_size(...) #define __section(x) #define __weak #else @@ -237,11 +236,6 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) -#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) -#else -#define __alloc_size(...) -#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) @@ -384,6 +378,12 @@ #define __returns_twice #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define __alloc_size(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#else +#define __alloc_size(...) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL