From ee23c4b248146c704ad020de2739e32867b549a2 Mon Sep 17 00:00:00 2001 From: doursse Date: Sat, 22 Mar 2008 08:31:38 +0000 Subject: [PATCH] * make cegcc aware of the _WIN32 macro * fix warning SVN revision: 34078 --- legacy/embryo/configure.in | 5 +++++ legacy/embryo/src/bin/Makefile.am | 3 ++- legacy/embryo/src/bin/embryo_cc_sc1.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/legacy/embryo/configure.in b/legacy/embryo/configure.in index d62ad1cbb8..4dec12012b 100644 --- a/legacy/embryo/configure.in +++ b/legacy/embryo/configure.in @@ -33,6 +33,7 @@ AC_FUNC_ALLOCA AC_CHECK_FUNCS(gettimeofday) +WIN32_CFLAGS="" create_shared_lib="" case "$host_os" in mingw|mingw32*|cegcc) @@ -40,9 +41,13 @@ case "$host_os" in AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed]) dnl needed for correct definition of EAPI AC_DEFINE(EFL_EMBRYO_BUILD, 1, [Define to mention that embryo is built]) + if test "x$host_os" = "xcegcc" ; then + WIN32_CFLAGS="-mwin32" + fi create_shared_lib="-no-undefined" ;; esac +AC_SUBST(WIN32_CFLAGS) AC_SUBST(create_shared_lib) AC_CHECK_HEADERS(fnmatch.h,, AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file])) diff --git a/legacy/embryo/src/bin/Makefile.am b/legacy/embryo/src/bin/Makefile.am index 38fa3d6731..6aad144b79 100644 --- a/legacy/embryo/src/bin/Makefile.am +++ b/legacy/embryo/src/bin/Makefile.am @@ -9,7 +9,8 @@ AM_CPPFLAGS = \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@EVIL_CFLAGS@ +@EVIL_CFLAGS@ \ +@WIN32_CFLAGS@ bin_PROGRAMS = embryo_cc diff --git a/legacy/embryo/src/bin/embryo_cc_sc1.c b/legacy/embryo/src/bin/embryo_cc_sc1.c index 6232988da0..c7ca7b9175 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc1.c +++ b/legacy/embryo/src/bin/embryo_cc_sc1.c @@ -319,7 +319,7 @@ sc_compile(int argc, char *argv[]) tmpdir = getenv("TMPDIR"); if (!tmpdir) tmpdir = "/tmp"; #else - tmpdir = evil_tmpdir_get(); + tmpdir = (char *)evil_tmpdir_get(); #endif /* ! HAVE_EVIL */ snprintf(outfname, _MAX_PATH, "%s/embryo_cc.asm-tmp-XXXXXX", tmpdir);