From 827a38b378edf1e31bf1a7d52e7d14a03d589c53 Mon Sep 17 00:00:00 2001 From: caro Date: Wed, 5 Oct 2011 22:30:16 +0000 Subject: [PATCH] Embryo: fix compilation on Windows CE and link with Evil * use fseek() instead of rewind() as the latter does not exist on Windows CE * fix compilation with Evil. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/embryo@63850 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 5 +++++ src/lib/Makefile.am | 3 ++- src/lib/embryo_amx.c | 8 ++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38b7089..4a46661 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,3 +9,8 @@ 2011-07-16 Vincent Torri * delete temporary files on Windows + +2011-10-05 Vincent Torri + + * use fseek() instead of rewind() as the latter does not exist on + Windows CE and fix compilation with Evil. diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index aa2b3d8..f5c78aa 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -10,6 +10,7 @@ AM_CPPFLAGS = \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@EVIL_CFLAGS@ \ @EMBRYO_CPPFLAGS@ \ @EFL_EMBRYO_BUILD@ @@ -28,7 +29,7 @@ embryo_str.c \ embryo_time.c libembryo_la_CFLAGS = @EMBRYO_CFLAGS@ -libembryo_la_LIBADD = -lm +libembryo_la_LIBADD = @EVIL_LIBS@ -lm libembryo_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ EXTRA_DIST = embryo_private.h diff --git a/src/lib/embryo_amx.c b/src/lib/embryo_amx.c index 1462a54..4fa84c5 100644 --- a/src/lib/embryo_amx.c +++ b/src/lib/embryo_amx.c @@ -29,10 +29,6 @@ #include #include -#ifdef HAVE_EVIL -# include -#endif - #include "Embryo.h" #include "embryo_private.h" @@ -290,7 +286,7 @@ embryo_program_load(const char *file) if (!f) return NULL; fseek(f, 0, SEEK_END); program_size = ftell(f); - rewind(f); + fseek(f, 0L, SEEK_SET); if (program_size < (int)sizeof(Embryo_Header)) { fclose(f); @@ -301,7 +297,7 @@ embryo_program_load(const char *file) fclose(f); return NULL; } - rewind(f); + fseek(f, 0L, SEEK_SET); #ifdef WORDS_BIGENDIAN embryo_swap_32((unsigned int *)(&hdr.size)); #endif -- 2.7.4