Hello,
I got the sources of your newly released Imlib2 1.4.2 and I did again the fixes
for Mingw+Msys.
I think I also fixed my bugs with:
1) bad mmap() detection
2) wrong use of HAVE_SIGJMP_BUF instead of HAVE_SIGSETJMP.
3) all my files are in unix format.
I tested Imlib2 with:
- Mingw+Msys
- Cygwin
- Linux Debian 4.0r3
and everything seems to be working.
Attached patch includes all those fixes.
Sincerely,
Carlo Bramini.
---------- Initial Header -----------
>From : "Kim Woelders" [EMAIL PROTECTED]
To : "Vincent Torri" [EMAIL PROTECTED],"carlo\.bramix" [EMAIL
PROTECTED]
Cc : "enlightenment-devel" enlightenment-devel@lists.sourceforge.net
Date : Thu, 16 Oct 2008 17:38:41 +0200
Subject : Re: [E-devel] IMLIB2 ported to mingw+msys
> On Wed, 15 Oct 2008 13:29:10 +0200, Vincent Torri <[EMAIL PROTECTED]>
> wrote:
>
> >
> >
> > On Wed, 15 Oct 2008, carlo\.bramix wrote:
> >
> >> Hello,
> >>
> >>> I have already implemented some of the functions you need in a lib
> >>> called
> >>> 'Evil' (mmap, dlfcn, pwd.h, mkstemp,...). I use it for the EFL Windows
> >>> (XP
> >>> or Ce) port. Maybe you could look at my code, improve it if you think
> >>> it's
> >>> needed, and make imlib2 Windows port depending on Evil
> >>>
> If all that's needed is included in the patch I think it's a bit much to
> have to depend on another (unreleased) library.
>
> >>> Otherwise, i would say that you need to add AC_LIBTOOL_WIN32_DLL in
> >>> configure.ac too so that libtool is aware that you have a Windows port.
> >>
> >> Sorry, my fault, I forgot to tell you that I also upgraded to a newer
> >> version these files:
> >>
> >> config.guess
> >> config.sub
> >> depcomp
> >> install-sh
> >> ltmain.sh
> >> missing
> >>
> These should all be generated when running ./autogen.sh.
>
> >> AC_LIBTOOL_WIN32_DLL seems deprecated and I think this could be the
> >> reason because it works fine here on my PC.
> >> It's not a problem to add it anyways.
> >
> > it's deprecated but the new way to do it requires a "recent" version of
> > libtool (>= 1.9b, more precisely). You can say that that version was
> > released in 2004 and we are in 2008. I have absolutely no problem in
> > using
> > the new way to do that, but as it is Kim who uses really imlib2 in e16, I
> > would wait for his opinion about using or not a recent version of
> > libtool.
> >
> I don't think imlib2 should depend on a libtool version > 1.5.x.
>
> >> I also forgot to add $LT_LDFLAGS into src/modules/filters/Makefile.am
> >> (my mistake): it is not possible to create shared libs without that
> >> flag, I discovered it only when I checked the content of /lib directory
> >> after I did the "make install", if I must provide a new patch with this
> >> little fix, just let me know.
> >
> Yes, please.
>
> > that should be the new way of doing things with libtool.
> >>
> >> Please also excuse my ignorance, but I have not found a package called
> >> EFL into download page at sourceforge...
> >
> > EFL means Enlightenment fundation libraries. It is a set of libraries
> > that
> > e17 uses (eet, evas, ...).
> >
> >> actually I was just trying to
> >> build IMLIB2 because libcaca checked if it was available. I tried to do
> >> it in the simplest manner (especially because I'm a developer for
> >> Windows and not very expert with unix stuff)>
> >
> > You interest me ! I am searching some help for the Windows port of the
> > EFL, especially because I'm not a Windows developper. If you want to join
> > the task force (and if you have time, of course), I would be glad to have
> > someone more on that port :)
> >
> > Anyway, I think that this port should be done in the same way than the
> > other EFL. Using Evil means that the Windows code it located at one place
> > only. Less things to fix. And I would be happy if you have time to review
> > the code in Evil :)
> >
> > regards
> >
> > Vincent
> >
> Basically I'm fine with these changes. However:
>
> - We should make a 1.4.2 release of current svn before doing this.
>
> - tga support wasn't built when I tested (no configure arguments), I think
> the HAVE_MMAP test is wrong.
>
> - In configure.in (which has been renamed to configure.ac) you set
> HAVE_SIGSETJMP but in loader_jpeg.c you use HAVE_SIGJMP_BUF.
>
> - Some dos style <CR><LF> line endings have crept in (e.g. loader_gif.c).
>
> /Kim
>
diff -r -u imlib2-1.4.2-old/config.h.in imlib2-1.4.2-new/config.h.in
--- imlib2-1.4.2-old/config.h.in 2008-10-21 03:02:04 +0000
+++ imlib2-1.4.2-new/config.h.in 2008-10-27 21:03:34 +0000
@@ -18,6 +18,18 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define if sigsetjmp is available. */
+#undef HAVE_SIGSETJMP
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -39,6 +51,12 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <windows.h> header file. */
+#undef HAVE_WINDOWS_H
+
+/* Always defined */
+#undef IMLIB2_IS_COMPILING
+
/* Name of package */
#undef PACKAGE
diff -r -u imlib2-1.4.2-old/configure.ac imlib2-1.4.2-new/configure.ac
--- imlib2-1.4.2-old/configure.ac 2008-10-21 02:43:12 +0000
+++ imlib2-1.4.2-new/configure.ac 2008-10-28 15:50:50 +0000
@@ -29,6 +29,7 @@
dnl Next four lines is a hack to prevent libtool checking for CXX/F77
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
VERSION_CUR=5
@@ -86,6 +87,9 @@
]
)
+dnl Used for DLL import/export stuff.
+AC_DEFINE(IMLIB2_IS_COMPILING, 1, [Always defined])
+
AC_MSG_CHECKING(whether to enable x86 mmx support)
if test x$mmx = xyes; then
AC_DEFINE(DO_MMX_ASM, 1, [enabling MMX Assembly])
@@ -510,10 +514,72 @@
AM_CONDITIONAL(BUILD_ID3_LOADER, test "$id3_ok" = yes)
AC_SUBST(ID3LIBS)
+dnl Test if mmap is supported
+AC_FUNC_MMAP
+
+AC_MSG_CHECKING(whether to enable tga support)
+AC_ARG_WITH([tga],
+ [AC_HELP_STRING([--without-tga], [Disable TGA loader])],
+ [
+ if test "$withval" = no ; then
+ tga_loader=no
+ else
+ tga_loader=yes
+ fi
+ ],
+ [ tga_loader=auto ]
+)
+AC_MSG_RESULT($tga_loader)
+
+if test "$tga_loader" != no ; then
+ if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
+ tga_ok=yes
+ else
+ case $host_os in
+ *cygwin*)
+ dnl CYGWIN fails the test because MAP_FIXED is not supported.
+ dnl However, tga engine does not use it so let's bypass
+ dnl the trouble here.
+ tga_ok=yes
+ ;;
+ *)
+ tga_ok=no
+ ;;
+ esac
+ fi
+fi
+AM_CONDITIONAL(BUILD_TGA_LOADER, test "$tga_ok" = yes)
+
if test "x$enable_visibility_hiding" = xyes ; then
CPPFLAGS="$CPPFLAGS -fvisibility=hidden"
fi
+dnl Check which jump code is supported
+AC_TRY_COMPILE(
+ [#include <setjmp.h>],
+ [sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+ ],
+ [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
+
+dnl Check some standard(?) functions
+AC_CHECK_FUNCS([mkstemp])
+
+dnl Check some standard header files
+AC_CHECK_HEADERS([pwd.h windows.h])
+
+dnl Check for platform dependant flags for libtool
+case $host_os in
+ *mingw* | *cygwin*)
+ LT_LDFLAGS="-no-undefined"
+ ;;
+ *)
+ LT_LDFLAGS=""
+ ;;
+esac
+AC_SUBST(LT_LDFLAGS)
+
AC_OUTPUT([
Makefile
imlib2.pc
@@ -556,6 +622,7 @@
echo " ZLIB....................: $zlib_ok"
echo " BZIP2...................: $bz2_ok"
echo " ID3.....................: $id3_ok"
+echo " TGA.....................: $tga_ok"
echo " X.......................: $have_x"
echo
echo
diff -r -u imlib2-1.4.2-old/src/lib/Imlib2.h imlib2-1.4.2-new/src/lib/Imlib2.h
--- imlib2-1.4.2-old/src/lib/Imlib2.h 2008-08-17 09:39:12 +0000
+++ imlib2-1.4.2-new/src/lib/Imlib2.h 2008-10-27 20:43:18 +0000
@@ -5,8 +5,12 @@
# undef EAPI
# endif
# ifdef WIN32
-# ifdef BUILDING_DLL
-# define EAPI __declspec(dllexport)
+# ifdef IMLIB2_IS_COMPILING
+# ifdef DLL_EXPORT
+# define EAPI __declspec(dllexport)
+# else
+# define EAPI
+# endif
# else
# define EAPI __declspec(dllimport)
# endif
diff -r -u imlib2-1.4.2-old/src/lib/Makefile.am
imlib2-1.4.2-new/src/lib/Makefile.am
--- imlib2-1.4.2-old/src/lib/Makefile.am 2008-08-17 09:39:14 +0000
+++ imlib2-1.4.2-new/src/lib/Makefile.am 2008-10-27 20:47:34 +0000
@@ -18,6 +18,7 @@
common.h \
context.c \
context.h \
+dlfcn-win32.c \
draw.c \
draw.h \
dynamic_filters.c \
@@ -98,5 +99,5 @@
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h
endif
endif
-libImlib2_la_LDFLAGS = -version-info @lt_version@
+libImlib2_la_LDFLAGS = -version-info @lt_version@ $(LT_LDFLAGS)
diff -r -u imlib2-1.4.2-old/src/lib/common.h imlib2-1.4.2-new/src/lib/common.h
--- imlib2-1.4.2-old/src/lib/common.h 2008-08-17 09:39:14 +0000
+++ imlib2-1.4.2-new/src/lib/common.h 2008-10-27 20:38:22 +0000
@@ -16,6 +16,15 @@
#include <sys/types.h>
#endif
+#ifndef HAVE_MKSTEMP
+# ifdef WIN32
+# include <fcntl.h>
+# define mkstemp(p) _open(_mktemp(p), _O_CREAT | _O_SHORT_LIVED | _O_EXCL)
+# else
+# error Missing mkstemp() function.
+# endif
+#endif
+
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define __hidden __attribute__((visibility("hidden")))
#else
Only in imlib2-1.4.2-new/src/lib: dlfcn-win32.c
Only in imlib2-1.4.2-new/src/lib: dlfcn-win32.h
diff -r -u imlib2-1.4.2-old/src/lib/file.c imlib2-1.4.2-new/src/lib/file.c
--- imlib2-1.4.2-old/src/lib/file.c 2008-08-17 09:39:14 +0000
+++ imlib2-1.4.2-new/src/lib/file.c 2008-10-27 20:41:32 +0000
@@ -10,11 +10,21 @@
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_PWD_H
#include <pwd.h>
+#endif
#include "file.h"
static void __imlib_FileFieldWord(char *s, int num, char *wd);
+#ifndef S_IRGRP
+# define S_IRGRP S_IRUSR
+#endif
+
+#ifndef S_IROTH
+# define S_IROTH S_IRUSR
+#endif
+
char *
__imlib_FileKey(const char *file)
{
@@ -372,9 +382,15 @@
static int usr_uid = -1;
static char *usr_s = NULL;
char *s;
+
+#if defined __EMX__ || defined WIN32
+ if ((s = getenv("HOME")) != NULL)
+ return strdup(s);
+ else if ((s = getenv("TMP")) != NULL)
+ return strdup(s);
+#else
struct passwd *pwd;
-#ifndef __EMX__
s = getenv("HOME");
if (s)
return strdup(s);
@@ -392,11 +408,6 @@
usr_s = strdup(s);
return (s);
}
-#else
- if ((s = getenv("HOME")) != NULL)
- return strdup(s);
- else if ((s = getenv("TMP")) != NULL)
- return strdup(s);
#endif
return NULL;
}
diff -r -u imlib2-1.4.2-old/src/lib/image.c imlib2-1.4.2-new/src/lib/image.c
--- imlib2-1.4.2-old/src/lib/image.c 2008-08-17 09:39:12 +0000
+++ imlib2-1.4.2-new/src/lib/image.c 2008-10-27 20:42:12 +0000
@@ -1093,8 +1093,10 @@
*er = IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY;
else if (errno == EFAULT)
*er = IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE;
+#ifdef ELOOP
else if (errno == ELOOP)
*er = IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS;
+#endif
else if (errno == ENOMEM)
*er = IMLIB_LOAD_ERROR_OUT_OF_MEMORY;
else if (errno == EMFILE)
@@ -1305,8 +1307,10 @@
*er = IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY;
else if (errno == EFAULT)
*er = IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE;
+#ifdef ELOOP
else if (errno == ELOOP)
*er = IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS;
+#endif
else if (errno == ENOMEM)
*er = IMLIB_LOAD_ERROR_OUT_OF_MEMORY;
else if (errno == EMFILE)
diff -r -u imlib2-1.4.2-old/src/lib/image.h imlib2-1.4.2-new/src/lib/image.h
--- imlib2-1.4.2-old/src/lib/image.h 2008-08-17 09:39:12 +0000
+++ imlib2-1.4.2-new/src/lib/image.h 2008-10-27 20:42:22 +0000
@@ -8,7 +8,13 @@
# define X_DISPLAY_MISSING
# endif
-# include <dlfcn.h>
+# ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+# elif defined HAVE_WINDOWS_H
+# include <dlfcn-win32.h>
+# else
+# error Missing DL engine.
+# endif
# include <Imlib2.h>
# ifndef RTLD_LOCAL
diff -r -u imlib2-1.4.2-old/src/lib/script.h imlib2-1.4.2-new/src/lib/script.h
--- imlib2-1.4.2-old/src/lib/script.h 2008-08-17 09:39:12 +0000
+++ imlib2-1.4.2-new/src/lib/script.h 2008-10-27 20:48:54 +0000
@@ -1,7 +1,13 @@
#ifndef _DYN_FUNCTION_H_
#define _DYN_FUNCTION_H_
-#include <dlfcn.h>
+# ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+# elif defined HAVE_WINDOWS_H
+# include <dlfcn-win32.h>
+# else
+# error Missing DL engine.
+# endif
#ifndef BUILD_X11
# ifndef X_DISPLAY_MISSING
diff -r -u imlib2-1.4.2-old/src/modules/filters/Makefile.am
imlib2-1.4.2-new/src/modules/filters/Makefile.am
--- imlib2-1.4.2-old/src/modules/filters/Makefile.am 2008-08-17 09:39:14
+0000
+++ imlib2-1.4.2-new/src/modules/filters/Makefile.am 2008-10-27 20:47:48
+0000
@@ -13,14 +13,14 @@
EXTRA_DIST = filter_common.h
testfilter_la_SOURCES = filter_test.c
-testfilter_la_LDFLAGS = -module -avoid-version
+testfilter_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
testfilter_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
bumpmap_la_SOURCES = filter_bumpmap.c
-bumpmap_la_LDFLAGS = -module -avoid-version
+bumpmap_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
bumpmap_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
colormod_la_SOURCES = filter_colormod.c
-colormod_la_LDFLAGS = -module -avoid-version
+colormod_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
colormod_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
diff -r -u imlib2-1.4.2-old/src/modules/loaders/Makefile.am
imlib2-1.4.2-new/src/modules/loaders/Makefile.am
--- imlib2-1.4.2-old/src/modules/loaders/Makefile.am 2008-08-17 09:39:14
+0000
+++ imlib2-1.4.2-new/src/modules/loaders/Makefile.am 2008-10-27 20:48:32
+0000
@@ -30,6 +30,9 @@
if BUILD_ID3_LOADER
ID3_L = id3.la
endif
+if BUILD_TGA_LOADER
+TGA_L = tga.la
+endif
pkg_LTLIBRARIES = \
$(JPEG_L) \
@@ -43,59 +46,59 @@
argb.la \
bmp.la \
xpm.la \
-tga.la \
+$(TGA_L) \
lbm.la
EXTRA_DIST = loader_common.h
jpeg_la_SOURCES = loader_jpeg.c
-jpeg_la_LDFLAGS = -module -avoid-version
+jpeg_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
jpeg_la_LIBADD = @JPEGLIBS@ $(top_builddir)/src/lib/libImlib2.la
png_la_SOURCES = loader_png.c
-png_la_LDFLAGS = -module -avoid-version
+png_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
png_la_LIBADD = @PNG_LIBS@ $(top_builddir)/src/lib/libImlib2.la
tiff_la_SOURCES = loader_tiff.c
-tiff_la_LDFLAGS = -module -avoid-version
+tiff_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
tiff_la_LIBADD = @TIFFLIBS@ $(top_builddir)/src/lib/libImlib2.la
gif_la_SOURCES = loader_gif.c
-gif_la_LDFLAGS = -module -avoid-version
+gif_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
gif_la_LIBADD = @GIFLIBS@ $(top_builddir)/src/lib/libImlib2.la
zlib_la_SOURCES = loader_zlib.c
-zlib_la_LDFLAGS = -module -avoid-version
+zlib_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
zlib_la_LIBADD = @ZLIBLIBS@ $(top_builddir)/src/lib/libImlib2.la
bz2_la_SOURCES = loader_bz2.c
-bz2_la_LDFLAGS = -module -avoid-version
+bz2_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
bz2_la_LIBADD = @BZ2LIBS@ $(top_builddir)/src/lib/libImlib2.la
id3_la_SOURCES = loader_id3.c
-id3_la_LDFLAGS = -module -avoid-version
+id3_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
id3_la_LIBADD = @ID3LIBS@ $(top_builddir)/src/lib/libImlib2.la
pnm_la_SOURCES = loader_pnm.c
-pnm_la_LDFLAGS = -module -avoid-version
+pnm_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
pnm_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
argb_la_SOURCES = loader_argb.c
-argb_la_LDFLAGS = -module -avoid-version
+argb_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
argb_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
bmp_la_SOURCES = loader_bmp.c
-bmp_la_LDFLAGS = -module -avoid-version
+bmp_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
bmp_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
xpm_la_SOURCES = loader_xpm.c
-xpm_la_LDFLAGS = -module -avoid-version
+xpm_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
xpm_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
tga_la_SOURCES = loader_tga.c
-tga_la_LDFLAGS = -module -avoid-version
+tga_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
tga_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
lbm_la_SOURCES = loader_lbm.c
-lbm_la_LDFLAGS = -module -avoid-version
+lbm_la_LDFLAGS = -module -avoid-version $(LT_LDFLAGS)
lbm_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
diff -r -u imlib2-1.4.2-old/src/modules/loaders/loader_gif.c
imlib2-1.4.2-new/src/modules/loaders/loader_gif.c
--- imlib2-1.4.2-old/src/modules/loaders/loader_gif.c 2008-08-17 09:39:14
+0000
+++ imlib2-1.4.2-new/src/modules/loaders/loader_gif.c 2008-10-27 20:44:18
+0000
@@ -29,10 +29,10 @@
/* already data in this image - dont load it again */
if (im->data)
return 0;
-#ifndef __EMX__
- fd = open(im->real_file, O_RDONLY);
-#else
+#if defined __EMX__ || defined WIN32
fd = open(im->real_file, O_RDONLY | O_BINARY);
+#else
+ fd = open(im->real_file, O_RDONLY);
#endif
if (fd < 0)
return 0;
diff -r -u imlib2-1.4.2-old/src/modules/loaders/loader_jpeg.c
imlib2-1.4.2-new/src/modules/loaders/loader_jpeg.c
--- imlib2-1.4.2-old/src/modules/loaders/loader_jpeg.c 2008-10-21 02:32:52
+0000
+++ imlib2-1.4.2-new/src/modules/loaders/loader_jpeg.c 2008-10-27 20:45:58
+0000
@@ -4,7 +4,11 @@
struct ImLib_JPEG_error_mgr {
struct jpeg_error_mgr pub;
+#ifdef HAVE_SIGSETJMP
sigjmp_buf setjmp_buffer;
+#else
+ jmp_buf jmp_buffer;
+#endif
};
typedef struct ImLib_JPEG_error_mgr *emptr;
@@ -15,7 +19,11 @@
errmgr = (emptr) cinfo->err;
/* cinfo->err->output_message(cinfo);*/
+#ifdef HAVE_SIGSETJMP
siglongjmp(errmgr->setjmp_buffer, 1);
+#else
+ longjmp(errmgr->jmp_buffer, 1);
+#endif
return;
}
@@ -60,7 +68,11 @@
jerr.pub.error_exit = _JPEGFatalErrorHandler;
jerr.pub.emit_message = _JPEGErrorHandler2;
jerr.pub.output_message = _JPEGErrorHandler;
+#ifdef HAVE_SIGSETJMP
if (sigsetjmp(jerr.setjmp_buffer, 1))
+#else
+ if (setjmp(jerr.jmp_buffer))
+#endif
{
jpeg_destroy_decompress(&cinfo);
fclose(f);
@@ -255,7 +267,11 @@
jerr.pub.emit_message = _JPEGErrorHandler2;
jerr.pub.output_message = _JPEGErrorHandler;
cinfo.err = jpeg_std_error(&(jerr.pub));
+#ifdef HAVE_SIGSETJMP
if (sigsetjmp(jerr.setjmp_buffer, 1))
+#else
+ if (setjmp(jerr.jmp_buffer))
+#endif
{
jpeg_destroy_compress(&cinfo);
free(buf);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel