sizeof(Eina_Stringshare_Node) is now 24 bytes on 64bits platforms, but
str[] was pointing to before that, to the 20th byte, causing out of
bounds access.
Adding the padding will cause str[] to use the correct position. It
wastes 4 more bytes, like pre-optimizations, but it's just on big
machines.
SVN revision: 37305
use AC_CHECK_HEADERS instead of AC_CHECK_HEADERS_ONCE, because it
leads to more trouble than it improves configure speed...
* src/lib/Evil.h:
use __VA_ARGS__ instead of ##args to make gcc happy.
SVN revision: 37302
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 :)
SVN revision: 37295
mixing #ifdef'ed blocks inside code is bad, can lead to warnings if
some variables are not used and it's a pain to read.
instead, just define functions and always call them, choose their
implementation based on the ifdef macros. I opted to have 2
declarations, but one can go like other parts and #ifdef around the
function contents as well.
SVN revision: 37281
we don't need to use 'begin' flag (that takes a byte) just to see if
we're in the same memory block as the head, just do a pointer math.
SVN revision: 37270
trade off safety by speed, we will always assume str was previously
shared, like evas_stringshare_del() did and we can know with zero-cost
the number of references and can avoid strlen() too.
When references drop to zero we still have to do the hash, access the
bucket and then lookup the Red-Black tree, then walk the list of
nodes, but avoiding so would use more memory, unacceptable at this
point.
SVN revision: 37268
add c++ compiler checks
remove linking against libuid.a as it's not an import lib.
* src/bin/Makefile.am:
* src/bin/evil_suite.c:
* src/bin/evil_test_link.c:
* src/bin/evil_test_link.h:
add unit test for links. Must be improved.
* src/lib/Makefile.am:
add unistd.cpp and uuid.c
use -fno-exceptions when compiling c++ code
* src/lib/evil_unistd.c:
* src/lib/evil_unistd.cpp:
use C++ api to manage links on Windows XP. Can be considered
as heavy but it's cleaner as the internals can change later.
I might consider to compile Windows CE code with only C compiler
as with mingw32ce, libstdc++ is statically linked to the
DLL / app (legacy of mingw stuff), to reduce a bit the DLL size.
* src/lib/evil_private.h:
declare _evil_error_display() as C function (otherwise linker
not happy)
* src/lib/evil_stdlib.c:
use RegCreateKeyEx() instead of RegOpenKeyEx in getenv().
fix an _evil_error_display() call.
* src/lib/evil_util.c:
add more error messages
* src/lib/evil_uuid.c:
define IID_IPersistFile (for links on Windows XP)
* src/lib/evil_unistd.h:
fix doc
SVN revision: 37267