[gimp/gimp-2-8] Bug 555777 - Export to MNG animation fails



commit c486cb3c36ad91d25c9b71354337644bb3f24ef8
Author: Edward E <develinthedetail gmail com>
Date:   Sun Jun 4 00:09:27 2017 -0500

    Bug 555777 - Export to MNG animation fails
    
    Fix calling convention for libmng functions in file-mng plug-in.
    
    (cherry picked from commit d2de5a0c30cc172d9a788401b61ee01914966445)

 configure.ac               |    3 +++
 plug-ins/common/file-mng.c |   28 ++++++++++++++--------------
 2 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f64072a..884b3bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1341,6 +1341,9 @@ if test "x$with_libmng" != xno && test -z "$MNG_LIBS" &&
   if test "$mng_ok" = yes; then
     have_libmng=yes
     FILE_MNG='file-mng$(EXEEXT)'; MNG_LIBS="-lmng $JPEG_LIBS $PNG_LIBS"; MNG_CFLAGS="$PNG_CFLAGS"
+    if test "x$platform_win32" = "xyes"; then
+      MNG_CFLAGS="$MNG_CFLAGS -DMNG_USE_DLL"
+    fi
   else
     have_libmng="no (MNG header file not found)"
   fi
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index c05bc52..977f158 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -186,15 +186,15 @@ struct mnglib_userdata_t
  * Function prototypes
  */
 
-static mng_ptr   myalloc       (mng_size_t  size);
-static void      myfree        (mng_ptr     ptr,
-                                mng_size_t  size);
-static mng_bool  myopenstream  (mng_handle  handle);
-static mng_bool  myclosestream (mng_handle  handle);
-static mng_bool  mywritedata   (mng_handle  handle,
-                                mng_ptr     buf,
-                                mng_uint32  size,
-                                mng_uint32 *written_size);
+static mng_ptr  MNG_DECL  myalloc       (mng_size_t  size);
+static void     MNG_DECL  myfree        (mng_ptr     ptr,
+                                         mng_size_t  size);
+static mng_bool MNG_DECL  myopenstream  (mng_handle  handle);
+static mng_bool MNG_DECL  myclosestream (mng_handle  handle);
+static mng_bool MNG_DECL  mywritedata   (mng_handle  handle,
+                                         mng_ptr     buf,
+                                         mng_uint32  size,
+                                         mng_uint32 *written_size);
 
 
 static gint32    parse_chunks_type_from_layer_name   (const gchar *str);
@@ -232,7 +232,7 @@ static void      run             (const gchar      *name,
  * Callbacks for libmng
  */
 
-static mng_ptr
+static mng_ptr MNG_DECL
 myalloc (mng_size_t size)
 {
   gpointer ptr;
@@ -245,26 +245,26 @@ myalloc (mng_size_t size)
   return ((mng_ptr) ptr);
 }
 
-static void
+static void MNG_DECL
 myfree (mng_ptr    ptr,
         mng_size_t size)
 {
   g_free (ptr);
 }
 
-static mng_bool
+static mng_bool MNG_DECL
 myopenstream (mng_handle handle)
 {
   return MNG_TRUE;
 }
 
-static mng_bool
+static mng_bool MNG_DECL
 myclosestream (mng_handle handle)
 {
   return MNG_TRUE;
 }
 
-static mng_bool
+static mng_bool MNG_DECL
 mywritedata (mng_handle  handle,
              mng_ptr     buf,
              mng_uint32  size,


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