[gthumb] fixed build error when jpeglib.h is not available



commit ac65cdecd6be2d558376e0db5b47b5d7aa6a0c81
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Jun 28 11:47:15 2010 +0200

    fixed build error when jpeglib.h is not available

 extensions/image_rotation/rotation-utils.c |    4 ++++
 extensions/jpeg_utils/transupp.h           |    9 +++++++--
 extensions/webalbums/gth-web-exporter.c    |    2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/extensions/image_rotation/rotation-utils.c b/extensions/image_rotation/rotation-utils.c
index a13ed76..91e118c 100644
--- a/extensions/image_rotation/rotation-utils.c
+++ b/extensions/image_rotation/rotation-utils.c
@@ -25,7 +25,9 @@
 #include <sys/types.h>
 #include <glib/gi18n.h>
 #include <gio/gio.h>
+#ifdef HAVE_LIBJPEG
 #include <extensions/jpeg_utils/jpegtran.h>
+#endif
 #include "rotation-utils.h"
 
 
@@ -232,6 +234,7 @@ transformation_data_free (TransformatioData *tdata)
 }
 
 
+#ifdef HAVE_LIBJPEG
 static void
 write_file_ready_cb (void     **buffer,
 		     gsize      count,
@@ -243,6 +246,7 @@ write_file_ready_cb (void     **buffer,
 	tdata->ready_func (error, tdata->user_data);
 	transformation_data_free (tdata);
 }
+#endif /* HAVE_LIBJPEG */
 
 
 static void
diff --git a/extensions/jpeg_utils/transupp.h b/extensions/jpeg_utils/transupp.h
index 84a2254..104fa2e 100644
--- a/extensions/jpeg_utils/transupp.h
+++ b/extensions/jpeg_utils/transupp.h
@@ -20,9 +20,14 @@
  *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
  */
 
+#ifdef HAVE_LIBJPEG
+
 #include <jpeglib.h>
+
 #if JPEG_LIB_VERSION >= 80
 #include "transupp-80.h"
-#else
+#else /* JPEG_LIB_VERSION < 80 */
 #include "transupp-62.h"
-#endif
+#endif /* JPEG_LIB_VERSION < 80 */
+
+#endif /* HAVE_LIBJPEG */
diff --git a/extensions/webalbums/gth-web-exporter.c b/extensions/webalbums/gth-web-exporter.c
index b922b39..0f1c33e 100644
--- a/extensions/webalbums/gth-web-exporter.c
+++ b/extensions/webalbums/gth-web-exporter.c
@@ -1116,7 +1116,7 @@ gth_parsed_doc_print (GthWebExporter      *self,
 	for (scan = document; scan; scan = scan->next) {
 		GthTag     *tag = scan->data;
 		ImageData  *idata;
-		GFile      *file;
+		GFile      *file = NULL;
 		GFile      *dir;
 		char       *line = NULL;
 		char       *image_src = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]