From 41694dcaead141d97697719f596765e82e81b2d6 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 7 Jun 2014 22:27:44 -0500 Subject: [PATCH] [libpng16] Ensure "__has_attribute()" macro exists before trying to use it with old clang compilers (MacPorts Ticket #43939). --- ANNOUNCE | 8 ++++++-- CHANGES | 6 +++++- pngconf.h | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 5ea1c12ab..15a731624 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.12rc02 - June 7, 2014 +Libpng 1.6.12rc02 - June 8, 2014 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -26,11 +26,15 @@ Other information: Changes since the last public release (1.6.11): -Version 1.6.12rc01 [June 7, 2014] +Version 1.6.12rc01 [June 6, 2014] Relocated new code from 1.6.11beta06 in png.c to a point after the declarations (Max Stepin). + +Version 1.6.12rc03 [June 8, 2014] Changed file permissions of contrib/tools/intgamma.sh, test-driver, and compile from 0644 to 0755 (Cosmin). + Ensure "__has_attribute()" macro exists before trying to use it with + old clang compilers (MacPorts Ticket #43939). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 16f5280ee..5a04d9f41 100644 --- a/CHANGES +++ b/CHANGES @@ -4925,11 +4925,15 @@ Version 1.6.11rc02 [June 3, 2014] Version 1.6.11 [June 5, 2014] No changes. -Version 1.6.12rc01 [June 7, 2014] +Version 1.6.12rc01 [June 6, 2014] Relocated new code from 1.6.11beta06 in png.c to a point after the declarations (Max Stepin). + +Version 1.6.12rc03 [June 8, 2014] Changed file permissions of contrib/tools/intgamma.sh, test-driver, and compile from 0644 to 0755 (Cosmin). + Ensure "__has_attribute()" macro exists before trying to use it with + old clang compilers (MacPorts Ticket #43939). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngconf.h b/pngconf.h index c524b7800..7211c8be9 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.12rc02 - June 7, 2014 + * libpng version 1.6.12rc02 - June 8, 2014 * * Copyright (c) 1998-2014 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -361,7 +361,7 @@ * version 1.2.41. Disabling these removes the warnings but may also produce * less efficient code. */ -# if defined(__clang__) +# if defined(__clang__) && defined(__has_attribute) /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ # if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) # define PNG_USE_RESULT __attribute__((__warn_unused_result__))