Commit Graph

12 Commits

Author SHA1 Message Date
Christophe Fergeau
5bcece537e mingw: don't try to redefine alloca
mingw already has a #define alloca __builtin_alloca so trying to
redefine it triggers a warning.
2012-03-04 10:50:39 +02:00
Marc-André Lureau
8416be7d9c common: mem.h add alloca definition
We don't support the autoconf ALLOCA/C_ALLOC fallback. If one day,
someone cares for a weird platform, he can fix it.
2011-05-03 16:49:56 +02:00
Christophe Fergeau
531d5bdf52 common: add extern "C" guards to headers
Since some spice C++ code is using code from common/, the C
functions need to be marked as such for the C++ compiler, otherwise
we'll get linkage issues.
2011-05-02 11:24:44 +02:00
Marc-André Lureau
597767d983 common: add SpiceBuffer - based on qemu-vnc Buffer
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Alexander Larsson
74c767fd26 Move SpiceChunks to mem.h 2010-07-08 14:17:24 +02:00
Alexander Larsson
d1ed338483 Move in spice/draw.h from spice-protocol to common/ 2010-07-08 13:56:01 +02:00
Alexander Larsson
23ace37e71 Add spice_chunks_* helpers 2010-07-07 23:10:47 +02:00
Alexander Larsson
1ea6a0eea6 Add spice_strnlen 2010-06-17 11:21:03 +02:00
Alexander Larsson
0261d7d689 Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
Alexander Larsson
8974315747 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
184c8cbe54 Add spice_strndup
Also, make str(n)dup handle NULL correctly
2010-03-24 17:02:20 +01:00
Alexander Larsson
c22788cd26 New memory allocators that exit on OOM and handle multiplication overflow
Every place that does a regular malloc/calloc and aborts on failure
should use spice_malloc/spice_mallo0 instead, which is leaner and cleaner.

Allocations of dynamically sized arrays can use g_malloc_n or g_new etc
which correctly handle multiplication overflow if some of the arguments
are not trusted.
2010-03-11 12:13:59 +01:00