[libpng17] Check for __has_extension before using it in pngconf.h, to

support older Clang versions (Jeremy Sequoia).
This commit is contained in:
Glenn Randers-Pehrson
2014-02-20 07:11:17 -06:00
parent 848eeacb41
commit 0c5acfa19e
3 changed files with 13 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.7.0beta32 - February 6, 2014
* libpng version 1.7.0beta32 - February 20, 2014
*
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -375,9 +375,11 @@
# define PNG_DEPRECATED __attribute__((__deprecated__))
# endif
# if !defined(PNG_PRIVATE)
# if __has_extension(attribute_unavailable_with_message)
# define PNG_PRIVATE __attribute__((__unavailable__(\
"This function is not exported by libpng.")))
# ifdef __has_extension
# if __has_extension(attribute_unavailable_with_message)
# define PNG_PRIVATE __attribute__((__unavailable__(\
"This function is not exported by libpng.")))
# endif
# endif
# endif
# ifndef PNG_RESTRICT