Fri Feb 4 23:35:29 2011 UTC ()
Fix building with Clang


(adam)
diff -r1.76 -r1.77 pkgsrc/graphics/png/distinfo
diff -r0 -r1.1 pkgsrc/graphics/png/patches/patch-pngconf.h

cvs diff -r1.76 -r1.77 pkgsrc/graphics/png/distinfo (expand / switch to unified diff)

--- pkgsrc/graphics/png/distinfo 2011/02/03 09:20:58 1.76
+++ pkgsrc/graphics/png/distinfo 2011/02/04 23:35:29 1.77
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
1$NetBSD: distinfo,v 1.76 2011/02/03 09:20:58 wiz Exp $ 1$NetBSD: distinfo,v 1.77 2011/02/04 23:35:29 adam Exp $
2 2
3SHA1 (libpng-1.5.1.tar.bz2) = 750361f1cd693da53ef66624d5a8a6a431c40cd5 3SHA1 (libpng-1.5.1.tar.bz2) = 750361f1cd693da53ef66624d5a8a6a431c40cd5
4RMD160 (libpng-1.5.1.tar.bz2) = 62ab2800b760ca642db094017f798590465bc5a3 4RMD160 (libpng-1.5.1.tar.bz2) = 62ab2800b760ca642db094017f798590465bc5a3
5Size (libpng-1.5.1.tar.bz2) = 773560 bytes 5Size (libpng-1.5.1.tar.bz2) = 773560 bytes
6SHA1 (patch-aa) = 0c4f4e594798384079a0ce2ee5d7a45e16366b12 6SHA1 (patch-aa) = 0c4f4e594798384079a0ce2ee5d7a45e16366b12
 7SHA1 (patch-pngconf.h) = 407106790dccb265d6d1e17d1c263b1f7c82eb68

File Added: pkgsrc/graphics/png/patches/Attic/patch-pngconf.h
$NetBSD: patch-pngconf.h,v 1.1 2011/02/04 23:35:29 adam Exp $

--- pngconf.h.orig	2011-02-04 23:31:35.000000000 +0000
+++ pngconf.h
@@ -287,7 +287,7 @@
  * 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 */
@@ -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