From: Enlightenment S. <no-...@en...> - 2008-10-29 08:04:57
|
Log: * configure.ac: define _WIN32_WCE with the cegcc compiler too useless EVIL_HAVE_WINCE define * src/bin/evil_test_memcpy.c: use _WIN32_WCE insead of EVIL_HAVE_WINCE * src/lib/Evil.h: try another definition of open(). Need feedback. * src/lib/evil_private.h: * src/lib/evil_util.c: add private error message when GetLastMessage must be called * src/lib/Makefile.am: * src/lib/evil_link_ce.c: * src/lib/evil_link_xp.cpp: * src/lib/evil_unistd.c: * src/lib/evil_unistd.cpp: move specific link code (readlink and symlink) outside evil_unistd to evil_link_ce.c for Windows CE and evil_link_xp.cpp for Windows XP. This allow the Windows CE code not depend on c++ code anymore and above all, not statically link libstdc++ on that platform. I need feedback on Windows XP, btw :) Author: caro Date: 2008-10-29 01:04:52 -0700 (Wed, 29 Oct 2008) New Revision: 37295 Added: trunk/PROTO/evil/src/lib/evil_link_ce.c trunk/PROTO/evil/src/lib/evil_link_xp.cpp trunk/PROTO/evil/src/lib/evil_unistd.c Removed: trunk/PROTO/evil/src/lib/evil_unistd.cpp Modified: trunk/PROTO/evil/ChangeLog trunk/PROTO/evil/configure.ac trunk/PROTO/evil/src/bin/evil_test_memcpy.c trunk/PROTO/evil/src/lib/Evil.h trunk/PROTO/evil/src/lib/Makefile.am trunk/PROTO/evil/src/lib/evil_private.h trunk/PROTO/evil/src/lib/evil_util.c Modified: trunk/PROTO/evil/ChangeLog =================================================================== --- trunk/PROTO/evil/ChangeLog 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/ChangeLog 2008-10-29 08:04:52 UTC (rev 37295) @@ -1,3 +1,31 @@ +2008-10-29 Vincent Torri <doursse at users dot sf dot net> + + * configure.ac: + define _WIN32_WCE with the cegcc compiler too + useless EVIL_HAVE_WINCE define + + * src/bin/evil_test_memcpy.c: + use _WIN32_WCE insead of EVIL_HAVE_WINCE + + * src/lib/Evil.h: + try another definition of open(). Need feedback. + + * src/lib/evil_private.h: + * src/lib/evil_util.c: + add private error message when GetLastMessage must be called + + * src/lib/Makefile.am: + * src/lib/evil_link_ce.c: + * src/lib/evil_link_xp.cpp: + * src/lib/evil_unistd.c: + * src/lib/evil_unistd.cpp: + move specific link code (readlink and symlink) outside + evil_unistd to evil_link_ce.c for Windows CE and + evil_link_xp.cpp for Windows XP. This allow the Windows CE + code not depend on c++ code anymore and above all, not + statically link libstdc++ on that platform. + I need feedback on Windows XP, btw :) + 2008-10-28 Vincent Torri <doursse at users dot sf dot net> * configure.ac: Modified: trunk/PROTO/evil/configure.ac =================================================================== --- trunk/PROTO/evil/configure.ac 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/configure.ac 2008-10-29 08:04:52 UTC (rev 37295) @@ -82,6 +82,7 @@ cegcc*) have_wince="yes" win32_cflags="-mwin32" + win32_cppflags="${win32_cppflags} -D_WIN32_WCE=0x0420" ;; mingw32ce*) have_wince="yes" @@ -96,10 +97,6 @@ AC_SUBST(win32_cppflags) AC_SUBST(win32_cflags) -if test "x${have_wince}" = "xyes" ; then - AC_DEFINE(EVIL_HAVE_WINCE, 1, [Define to mention that Windows CE is the target]) -fi - AM_CONDITIONAL(EVIL_HAVE_WINCE, test "x${have_wince}" = "xyes") AM_CONDITIONAL(EVIL_HAVE_MINGW32CE, test "x${have_mingw32ce}" = "xyes") Modified: trunk/PROTO/evil/src/bin/evil_test_memcpy.c =================================================================== --- trunk/PROTO/evil/src/bin/evil_test_memcpy.c 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/src/bin/evil_test_memcpy.c 2008-10-29 08:04:52 UTC (rev 37295) @@ -80,9 +80,9 @@ printf ("length: %6d, align %2d/%2d:", (int)len, align1, align2); test_memcpy_test_run(s, memcpy, s2, s1, len); -#ifdef EVIL_HAVE_WINCE +#ifdef _WIN32_WCE test_memcpy_test_run(s, memcpy_glibc, s2, s1, len); -#endif /* EVIL_HAVE_WINCE */ +#endif /* _WIN32_WCE */ printf ("\n"); } Modified: trunk/PROTO/evil/src/lib/Evil.h =================================================================== --- trunk/PROTO/evil/src/lib/Evil.h 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/src/lib/Evil.h 2008-10-29 08:04:52 UTC (rev 37295) @@ -134,7 +134,7 @@ # define S_IXGRP S_IXUSR # define S_IXOTH S_IXUSR -# define open(path,...) _open((path),__VA_ARGS__) +# define open(path, flag, ...) _open((path), _O_BINARY | (flag), ##args) # define close(fd) _close(fd) # define read(fd,buffer,count) _read((fd),(buffer),(count)) # define write(fd,buffer,count) _write((fd),(buffer),(count)) Modified: trunk/PROTO/evil/src/lib/Makefile.am =================================================================== --- trunk/PROTO/evil/src/lib/Makefile.am 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/src/lib/Makefile.am 2008-10-29 08:04:52 UTC (rev 37295) @@ -35,10 +35,20 @@ evil_stdio.c \ evil_string.c \ evil_time.c \ -evil_unistd.cpp \ +evil_unistd.c \ evil_util.c \ evil_uuid.c +if EVIL_HAVE_WINCE + +libevil_la_SOURCES += evil_link_ce.c + +else + +libevil_la_SOURCES += evil_link_xp.cpp + +endif + libevil_la_CPPFLAGS = @win32_cppflags@ libevil_la_CFLAGS = @win32_cflags@ libevil_la_CXXFLAGS = -fno-exceptions Added: trunk/PROTO/evil/src/lib/evil_link_ce.c Added: trunk/PROTO/evil/src/lib/evil_link_xp.cpp Modified: trunk/PROTO/evil/src/lib/evil_private.h =================================================================== --- trunk/PROTO/evil/src/lib/evil_private.h 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/src/lib/evil_private.h 2008-10-29 08:04:52 UTC (rev 37295) @@ -8,6 +8,8 @@ void _evil_error_display(const char *fct, LONG res); +void _evil_last_error_display(const char *fct); + #ifdef __cplusplus } #endif Copied: trunk/PROTO/evil/src/lib/evil_unistd.c (from rev 37283, trunk/PROTO/evil/src/lib/evil_unistd.cpp) Deleted: trunk/PROTO/evil/src/lib/evil_unistd.cpp Modified: trunk/PROTO/evil/src/lib/evil_util.c =================================================================== --- trunk/PROTO/evil/src/lib/evil_util.c 2008-10-29 07:14:05 UTC (rev 37294) +++ trunk/PROTO/evil/src/lib/evil_util.c 2008-10-29 08:04:52 UTC (rev 37295) @@ -116,7 +116,17 @@ return evil_format_message(err); } +void +_evil_last_error_display(const char *fct) +{ + char *error; + error = evil_last_error_get(); + fprintf(stderr, "[Evil] [%s] ERROR: %s\n", fct, error); + free(error); +} + + const char * evil_tmpdir_get(void) { |