summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/pngget.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/libpng/pngget.c')
-rw-r--r--Build/source/libs/libpng/pngget.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/Build/source/libs/libpng/pngget.c b/Build/source/libs/libpng/pngget.c
index df7658587e6..036e9af6ed7 100644
--- a/Build/source/libs/libpng/pngget.c
+++ b/Build/source/libs/libpng/pngget.c
@@ -1,9 +1,9 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.2.9 April 14, 2006
+ * Last changed in libpng 1.2.15 January 5, 2007
* For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2006 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
@@ -829,19 +829,24 @@ png_get_compression_buffer_size(png_structp png_ptr)
}
#endif
-#ifndef PNG_1_0_X
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
+#ifndef PNG_1_0_X
/* this function was added to libpng 1.2.0 and should exist by default */
png_uint_32 PNGAPI
png_get_asm_flags (png_structp png_ptr)
{
+#ifdef PNG_MMX_CODE_SUPPORTED
return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L);
+#else
+ return (png_ptr? 0L: 0L);
+#endif
}
/* this function was added to libpng 1.2.0 and should exist by default */
png_uint_32 PNGAPI
png_get_asm_flagmask (int flag_select)
{
+#ifdef PNG_MMX_CODE_SUPPORTED
png_uint_32 settable_asm_flags = 0;
if (flag_select & PNG_SELECT_READ)
@@ -862,16 +867,18 @@ png_get_asm_flagmask (int flag_select)
#endif /* 0 */
return settable_asm_flags; /* _theoretically_ settable capabilities only */
+#else
+ return (0L);
+#endif /* PNG_MMX_CODE_SUPPORTED */
}
-#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
-#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
/* this function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
png_get_mmx_flagmask (int flag_select, int *compilerID)
{
+#if defined(PNG_MMX_CODE_SUPPORTED)
png_uint_32 settable_mmx_flags = 0;
if (flag_select & PNG_SELECT_READ)
@@ -902,23 +909,34 @@ png_get_mmx_flagmask (int flag_select, int *compilerID)
}
return settable_mmx_flags; /* _theoretically_ settable capabilities only */
+#else
+ return (0L);
+#endif /* ?PNG_MMX_CODE_SUPPORTED */
}
/* this function was added to libpng 1.2.0 */
png_byte PNGAPI
png_get_mmx_bitdepth_threshold (png_structp png_ptr)
{
+#if defined(PNG_MMX_CODE_SUPPORTED)
return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0);
+#else
+ return (png_ptr? 0: 0);
+#endif /* ?PNG_MMX_CODE_SUPPORTED */
}
/* this function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
png_get_mmx_rowbytes_threshold (png_structp png_ptr)
{
+#if defined(PNG_MMX_CODE_SUPPORTED)
return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
+#else
+ return (png_ptr? 0L: 0L);
+#endif /* ?PNG_MMX_CODE_SUPPORTED */
}
-#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
#endif /* ?PNG_1_0_X */
+#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
/* these functions were added to libpng 1.2.6 */