X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fexiv2.cc;h=a2c16c4c50a0bb9fbe487ea1ddc9ff131778022f;hb=7ae0619cfc6c8d6d30e259022c60c150b8f4318e;hp=f87612706bd3c7a05bf0b907b6fb61539cd42ceb;hpb=16bc703c7b5e44a2aaaf22db2f4649c8f3823c08;p=geeqie.git diff --git a/src/exiv2.cc b/src/exiv2.cc index f8761270..a2c16c4c 100644 --- a/src/exiv2.cc +++ b/src/exiv2.cc @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "config.h" +#include #ifdef HAVE_EXIV2 @@ -52,17 +52,15 @@ #define EXV_PACKAGE "exiv2" #endif -extern "C" { #include #include "main.h" #include "exif.h" #include "filefilter.h" -#include "ui_fileops.h" +#include "ui-fileops.h" #include "misc.h" -} typedef struct _AltKey AltKey; @@ -124,7 +122,7 @@ struct _ExifData { } - virtual void writeMetadata(gchar *path = NULL) + virtual void writeMetadata(gchar *UNUSED(path) = NULL) { g_critical("Unsupported method of writing metadata"); } @@ -269,7 +267,11 @@ public: if (cp_data_) { if (data_len) *data_len = cp_length_; +#if GLIB_CHECK_VERSION(2,68,0) + return (unsigned char *) g_memdup2(cp_data_, cp_length_); +#else return (unsigned char *) g_memdup(cp_data_, cp_length_); +#endif } return NULL; } @@ -286,9 +288,7 @@ public: } }; -extern "C" { static void _ExifDataProcessed_update_xmp(gpointer key, gpointer value, gpointer data); -} // This allows read-write access to the metadata struct _ExifDataProcessed : public _ExifData @@ -442,7 +442,6 @@ public: -extern "C" { void exif_init(void) @@ -767,7 +766,7 @@ guint exif_item_get_format_id(ExifItem *item) } } -const char *exif_item_get_format_name(ExifItem *item, gboolean brief) +const char *exif_item_get_format_name(ExifItem *item, gboolean UNUSED(brief)) { try { if (!item) return NULL; @@ -1244,7 +1243,6 @@ void exif_free_preview(guchar *buf) } #endif -} #if !EXIV2_TEST_VERSION(0,17,90) /* This is a dirty hack to support raw file preview, bassed on @@ -1279,7 +1277,7 @@ struct _UnmapData static GList *exif_unmap_list = 0; -extern "C" guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width, gint requested_height) +guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width, gint requested_height) { unsigned long offset;