elementary: support environment without sys/mman.h.

SVN revision: 65447
This commit is contained in:
Cedric BAIL 2011-11-20 14:56:12 +00:00
parent c3e5006835
commit e7a7a30c07
3 changed files with 21 additions and 2 deletions

View File

@ -618,6 +618,15 @@ ELM_LIBINTL_H_DEF="#undef"
AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"])
AC_SUBST(ELM_LIBINTL_H_DEF)
ELM_DIRENT_H_DEF="#undef"
AC_CHECK_HEADER(dirent.h, [ELM_DIRENT_H_DEF="#define"])
AC_SUBST(ELM_DIRENT_H_DEF)
AC_CHECK_HEADER(sys/mman.h, [have_mman="yes"], [have_mman="no"])
if test "x${have_mman}" = "xyes"; then
AC_DEFINE(HAVE_MMAN_H, 1, [Have sys/mman.h header file])
fi
my_libs="-lm"
AC_SUBST(my_libs)
AC_SUBST(requirement_elm)

View File

@ -317,6 +317,7 @@ contact with the developers and maintainers.
@ELM_DEBUG_DEF@ ELM_DEBUG
@ELM_ALLOCA_H_DEF@ ELM_ALLOCA_H
@ELM_LIBINTL_H_DEF@ ELM_LIBINTL_H
@ELM_DIRENT_H_DEF@ ELM_DIRENT_H
/* Standard headers for standard system calls etc. */
#include <stdio.h>
@ -332,7 +333,9 @@ contact with the developers and maintainers.
#include <limits.h>
#include <ctype.h>
#include <time.h>
#include <dirent.h>
#ifdef ELM_DIRENT_H
# include <dirent.h>
#endif
#include <pwd.h>
#include <errno.h>

View File

@ -4,7 +4,9 @@
#include <Elementary.h>
#include "elm_priv.h"
#include <sys/mman.h>
#ifdef HAVE_MMAN_H
# include <sys/mman.h>
#endif
#ifdef HAVE_ELEMENTARY_X
@ -1619,6 +1621,7 @@ elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data, void (
static Tmp_Info *
elm_cnp_tempfile_create(int size)
{
#ifdef HAVE_MMAN_H
Tmp_Info *info;
const char *tmppath;
int len;
@ -1696,6 +1699,10 @@ elm_cnp_tempfile_create(int size)
}
return info;
#else
(void) size;
return NULL;
#endif
}