eog r4871 - in trunk: . src
- From: friemann svn gnome org
- To: svn-commits-list gnome org
- Subject: eog r4871 - in trunk: . src
- Date: Fri, 14 Nov 2008 11:40:15 +0000 (UTC)
Author: friemann
Date: Fri Nov 14 11:40:15 2008
New Revision: 4871
URL: http://svn.gnome.org/viewvc/eog?rev=4871&view=rev
Log:
2008-11-14 Felix Riemann <friemann svn gnome org>
* configure.ac:
* src/Makefile.am:
Check for sufficient zlib during configure.
* src/eog-metadata-reader-png.c: (eog_metadata_reader_png_consume):
Merge the two CRC calculation steps into one. Fixes issues with zlib
not always exporting crc32_combine() on MacOS X. Fixes bug #560068.
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/eog-metadata-reader-png.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Nov 14 11:40:15 2008
@@ -106,6 +106,21 @@
libxml-2.0 >= $LIBXML2_REQUIRED"
# ***************
+# ZLIB (required)
+# ***************
+
+have_zlib=yes
+AC_CHECK_HEADERS([zlib.h],
+ [AC_CHECK_LIB([z], [inflate],
+ [AC_CHECK_LIB([z], [crc32], [], [have_zlib=no])],
+ [have_zlib=no])],
+ [have_zlib=no])
+
+if test x$have_zlib = xno; then
+ AC_MSG_ERROR([No sufficient zlib library found on your system.])
+fi
+
+# ***************
# EXIF (optional)
# ***************
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Fri Nov 14 11:40:15 2008
@@ -155,8 +155,7 @@
-DEOG_PLUGIN_DIR=\""$(libdir)/eog/plugins"\"
libeog_la_LIBADD = \
- $(EOG_LIBS) \
- -lz
+ $(EOG_LIBS)
if ENABLE_PYTHON
libeog_la_CFLAGS += \
Modified: trunk/src/eog-metadata-reader-png.c
==============================================================================
--- trunk/src/eog-metadata-reader-png.c (original)
+++ trunk/src/eog-metadata-reader-png.c Fri Nov 14 11:40:15 2008
@@ -79,7 +79,6 @@
gsize bytes_read;
guint sub_step;
guchar chunk_name[4];
- guint32 chunk_name_crc;
gpointer *crc_chunk;
guint32 *crc_len;
guint32 target_crc;
@@ -253,10 +252,7 @@
priv->chunk_name[priv->sub_step] = buf[i];
- if (priv->sub_step++ == 3)
- /* Take the CRC32 from the chunk name for later */
- priv->chunk_name_crc = crc32 (crc32 (0L, Z_NULL, 0), priv->chunk_name, 4);
- else
+ if (priv->sub_step++ != 3)
break;
if (G_UNLIKELY (!priv->hasIHDR)) {
@@ -325,11 +321,9 @@
if (priv->sub_step++ != 3)
break;
- /* ...generate the chunks CRC32, merge it with the
- * chunk name's CRC32 value... */
- chunk_crc = crc32 (0L, Z_NULL, 0);
+ /* ...generate the chunks CRC32,... */
+ chunk_crc = crc32 (crc32 (0L, Z_NULL, 0), priv->chunk_name, 4);
chunk_crc = crc32 (chunk_crc, *priv->crc_chunk, *priv->crc_len);
- chunk_crc = crc32_combine (priv->chunk_name_crc, chunk_crc, *priv->crc_len);
eog_debug_message (DEBUG_IMAGE_DATA, "Checking CRC: Chunk: 0x%X - Target: 0x%X", chunk_crc, priv->target_crc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]