summaryrefslogtreecommitdiff
path: root/legacy/edje/src/bin/edje_cc_mem.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2011-05-18 16:11:31 +0000
committerVincent Torri <vincent.torri@gmail.com>2011-05-18 16:11:31 +0000
commit105a261d5bfc2d9ccc9919700b5db59416ffbd9d (patch)
tree9fcffc3f2e425dd010feca758e4561b716903342 /legacy/edje/src/bin/edje_cc_mem.c
parent4903fe8e2decf52e72d8b3244fe6755d53946e34 (diff)
Edje: fix Windows printf format
SVN revision: 59511
Diffstat (limited to 'legacy/edje/src/bin/edje_cc_mem.c')
-rw-r--r--legacy/edje/src/bin/edje_cc_mem.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/legacy/edje/src/bin/edje_cc_mem.c b/legacy/edje/src/bin/edje_cc_mem.c
index d01d12c1c1..7c1a5c9b60 100644
--- a/legacy/edje/src/bin/edje_cc_mem.c
+++ b/legacy/edje/src/bin/edje_cc_mem.c
@@ -7,6 +7,12 @@
7 7
8#include "edje_cc.h" 8#include "edje_cc.h"
9 9
10#ifdef _WIN32
11# define FMT_SIZE_T "%Iu"
12#else
13# define FMT_SIZE_T "%zu"
14#endif
15
10void * 16void *
11mem_alloc(size_t size) 17mem_alloc(size_t size)
12{ 18{
@@ -14,7 +20,7 @@ mem_alloc(size_t size)
14 20
15 mem = calloc(1, size); 21 mem = calloc(1, size);
16 if (mem) return mem; 22 if (mem) return mem;
17 ERR("%s: Error. %s:%i memory allocation of %zi bytes failed. %s", 23 ERR("%s: Error. %s:%i memory allocation of " FMT_SIZE_T " bytes failed. %s",
18 progname, file_in, line, size, strerror(errno)); 24 progname, file_in, line, size, strerror(errno));
19 exit(-1); 25 exit(-1);
20 return NULL; 26 return NULL;
@@ -27,7 +33,7 @@ mem_strdup(const char *s)
27 33
28 str = strdup(s); 34 str = strdup(s);
29 if (str) return str; 35 if (str) return str;
30 ERR("%s: Error. %s:%i memory allocation of %zi bytes failed. %s. string being duplicated: \"%s\"", 36 ERR("%s: Error. %s:%i memory allocation of " FMT_SIZE_T " bytes failed. %s. string being duplicated: \"%s\"",
31 progname, file_in, line, strlen(s) + 1, strerror(errno), s); 37 progname, file_in, line, strlen(s) + 1, strerror(errno), s);
32 exit(-1); 38 exit(-1);
33 return NULL; 39 return NULL;