From 973c493e1b710f7c572347e6150ed097aa9562a4 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 4 Feb 2011 18:51:00 -0600 Subject: [PATCH] [devel] Add __clang__ special case in pngconf.h --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngconf.h | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index deb293eb5..bf003b5be 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.2beta01 - February 4, 2011 +Libpng 1.5.2beta01 - February 5, 2011 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,10 +26,11 @@ Other information: Changes since the last public release (1.5.1): -Version 1.5.2beta01 [February 4, 2011] +Version 1.5.2beta01 [February 5, 2011] More -Wshadow fixes for older gcc compilers. Older gcc versions apparently check formal parameters names in function declarations (as well as definitions) to see if they match a name in the global namespace. + Add __clang__ special case in pngconf.h Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 7895101b3..8acf4d79c 100644 --- a/CHANGES +++ b/CHANGES @@ -3242,10 +3242,11 @@ Version 1.5.1rc02 [January 31, 2011] Version 1.5.1 [February 3, 2011] No changes. -Version 1.5.2beta01 [February 4, 2011] +Version 1.5.2beta01 [February 5, 2011] More -Wshadow fixes for older gcc compilers. Older gcc versions apparently check formal parameters names in function declarations (as well as definitions) to see if they match a name in the global namespace. + Add __clang__ special case in pngconf.h Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngconf.h b/pngconf.h index cec60c8a0..c812952dc 100644 --- a/pngconf.h +++ b/pngconf.h @@ -287,10 +287,10 @@ * PNG_EXPORT function for every compiler. */ #ifndef PNG_FUNCTION -# ifdef __GNUC__ +# if defined(__GNUC__) && !defined(__clang__) # define PNG_FUNCTION(type, name, args, attributes)\ attributes type name args -# else /* !GNUC */ +# else /* !GNUC || clang */ # ifdef _MSC_VER # define PNG_FUNCTION(type, name, args, attributes)\ attributes type name args @@ -347,7 +347,7 @@ * functions in png.h will generate compiler warnings. Added at libpng * version 1.2.41. */ -# ifdef __GNUC__ +# if defined(__GNUC__) && !defined(__clang__) # ifndef PNG_USE_RESULT # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) # endif