Hey,

here is a patch to allow the compilation of eet with the compiler cegcc (for Windows Mobile)

if nobody sees a problem, I'll apply the patch next week.

Vincent
? eet-0.9.10.041.tar.bz2
? eet.patch
? eet_cegcc.diff
? toto
? src/lib/toto.log
Index: src/lib/Eet_private.h
===================================================================
RCS file: /cvs/e/e17/libs/eet/src/lib/Eet_private.h,v
retrieving revision 1.17
diff -u -r1.17 Eet_private.h
--- src/lib/Eet_private.h       29 Sep 2007 09:21:43 -0000      1.17
+++ src/lib/Eet_private.h       26 Jan 2008 00:04:53 -0000
@@ -32,6 +32,13 @@
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
+#endif
+
+#ifdef __CEGCC__
+# include <windows.h>
+# define HAVE_BOOLEAN
+# define XMD_H
+# undef _LARGEFILE64_SOURCE
 #elif _WIN32
 # include <winsock2.h>
 #endif
Index: src/lib/eet_lib.c
===================================================================
RCS file: /cvs/e/e17/libs/eet/src/lib/eet_lib.c,v
retrieving revision 1.85
diff -u -r1.85 eet_lib.c
--- src/lib/eet_lib.c   24 Jan 2008 08:41:23 -0000      1.85
+++ src/lib/eet_lib.c   26 Jan 2008 00:04:54 -0000
@@ -3,15 +3,20 @@
  */
 
 #include <sys/types.h>
-#ifndef _WIN32
-#include <sys/mman.h>
+#if !defined (_WIN32) && !defined (__CEGCC__)
+# include <sys/mman.h>
 #endif
 
 #include "Eet.h"
 #include "Eet_private.h"
 
+#ifdef __CEGCC__
+# define CreateFileMapping CreateFileMappingW
+# define _get_osfhandle get_osfhandle
+#endif
+
 #ifdef HAVE_REALPATH
-#undef HAVE_REALPATH
+# undef HAVE_REALPATH
 #endif
 
 #define EET_MAGIC_FILE                  0x1ee7ff00
@@ -648,8 +653,7 @@
    FILE         *fp;
    Eet_File    *ef;
    struct stat  file_stat;
-
-#ifdef _WIN32
+#if defined (_WIN32) && !defined(__CEGCC__)
    HANDLE        h;
 #endif
 
@@ -745,7 +749,7 @@
    if (eet_test_close(!ef->fp, ef))
      return NULL;
 
-#ifndef _WIN32
+#if !defined (_WIN32) || defined (__CEGCC__)
    fcntl(fileno(ef->fp), F_SETFD, FD_CLOEXEC);
 #else
    /* FIXME: check if that code is needed / correct */
@@ -895,7 +899,7 @@
 #ifndef _WIN32
    if (ef->data) munmap((void*)ef->data, ef->data_size);
 #else
-   if (ef->data) UnmapViewOfFile (ef->data);
+   if (ef->data) UnmapViewOfFile((void*)ef->data);
 #endif
 
    if (ef->fp) fclose(ef->fp);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to