evas: more fine grained system detection.

SVN revision: 65903
This commit is contained in:
Cedric BAIL 2011-12-05 14:00:53 +00:00
parent 1c70650afc
commit 792e7bffed
3 changed files with 17 additions and 3 deletions

View File

@ -431,9 +431,12 @@ fi
### Checks for header files ### Checks for header files
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h]) AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h sys/mman.h])
EFL_CHECK_PATH_MAX EFL_CHECK_PATH_MAX
if test "x${ac_cv_header_sys_mman_h}" = "xyes" ; then
AC_DEFINE([HAVE_MMAN_H], [1], [Define to 1 if you have the <sys/mman.h> header file.])
fi
### Checks for types ### Checks for types
AC_CHECK_TYPES([struct sigaction], [], [], AC_CHECK_TYPES([struct sigaction], [], [],

View File

@ -1,7 +1,9 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/mman.h> #ifdef HAVE_MMAN_H
# include <sys/mman.h>
#endif
#include <math.h> #include <math.h>
#include "evas_common.h" #include "evas_common.h"
@ -209,6 +211,7 @@ _cleanup_tmpf(Evas_Object *obj)
static void static void
_create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__)
{ {
#ifdef HAVE_MMAN_H
Evas_Object_Image *o; Evas_Object_Image *o;
char buf[4096]; char buf[4096];
void *dst; void *dst;
@ -253,6 +256,12 @@ _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__)
o->tmpf = eina_stringshare_add(buf); o->tmpf = eina_stringshare_add(buf);
memcpy(dst, data, size); memcpy(dst, data, size);
munmap(dst, size); munmap(dst, size);
#else
(void) obj;
(void) data;
(void) size;
(void) format;
#endif
} }
EAPI void EAPI void

View File

@ -3503,7 +3503,7 @@ _layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par)
static void static void
_layout_paragraph_render(Evas_Object_Textblock *o, _layout_paragraph_render(Evas_Object_Textblock *o,
Evas_Object_Textblock_Paragraph *par) Evas_Object_Textblock_Paragraph *par)
{ {
if (par->rendered) if (par->rendered)
return; return;
@ -3521,6 +3521,8 @@ _layout_paragraph_render(Evas_Object_Textblock *o,
par->bidi_props = NULL; par->bidi_props = NULL;
} }
} }
#else
(void) o;
#endif #endif
} }