summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-11-20 14:56:12 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-11-20 14:56:12 +0000
commitfc885cd521db501be6fc7741d158c4d3604dccf6 (patch)
treed99223e6ab708952f307982050246df9a399d37f
parentd8dbd9107bc221e67a3bbbaea0fdf5cb7ec276c3 (diff)
elementary: support environment without sys/mman.h.
SVN revision: 65447
-rw-r--r--configure.ac9
-rw-r--r--src/lib/Elementary.h.in5
-rw-r--r--src/lib/elm_cnp_helper.c9
3 files changed, 21 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e5ad88c61..e5c61bbd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -618,6 +618,15 @@ ELM_LIBINTL_H_DEF="#undef"
618AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"]) 618AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"])
619AC_SUBST(ELM_LIBINTL_H_DEF) 619AC_SUBST(ELM_LIBINTL_H_DEF)
620 620
621ELM_DIRENT_H_DEF="#undef"
622AC_CHECK_HEADER(dirent.h, [ELM_DIRENT_H_DEF="#define"])
623AC_SUBST(ELM_DIRENT_H_DEF)
624
625AC_CHECK_HEADER(sys/mman.h, [have_mman="yes"], [have_mman="no"])
626if test "x${have_mman}" = "xyes"; then
627 AC_DEFINE(HAVE_MMAN_H, 1, [Have sys/mman.h header file])
628fi
629
621my_libs="-lm" 630my_libs="-lm"
622AC_SUBST(my_libs) 631AC_SUBST(my_libs)
623AC_SUBST(requirement_elm) 632AC_SUBST(requirement_elm)
diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index 160086223..993a6cdc2 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -317,6 +317,7 @@ contact with the developers and maintainers.
317@ELM_DEBUG_DEF@ ELM_DEBUG 317@ELM_DEBUG_DEF@ ELM_DEBUG
318@ELM_ALLOCA_H_DEF@ ELM_ALLOCA_H 318@ELM_ALLOCA_H_DEF@ ELM_ALLOCA_H
319@ELM_LIBINTL_H_DEF@ ELM_LIBINTL_H 319@ELM_LIBINTL_H_DEF@ ELM_LIBINTL_H
320@ELM_DIRENT_H_DEF@ ELM_DIRENT_H
320 321
321/* Standard headers for standard system calls etc. */ 322/* Standard headers for standard system calls etc. */
322#include <stdio.h> 323#include <stdio.h>
@@ -332,7 +333,9 @@ contact with the developers and maintainers.
332#include <limits.h> 333#include <limits.h>
333#include <ctype.h> 334#include <ctype.h>
334#include <time.h> 335#include <time.h>
335#include <dirent.h> 336#ifdef ELM_DIRENT_H
337# include <dirent.h>
338#endif
336#include <pwd.h> 339#include <pwd.h>
337#include <errno.h> 340#include <errno.h>
338 341
diff --git a/src/lib/elm_cnp_helper.c b/src/lib/elm_cnp_helper.c
index c0b5d015b..964fa9d20 100644
--- a/src/lib/elm_cnp_helper.c
+++ b/src/lib/elm_cnp_helper.c
@@ -4,7 +4,9 @@
4#include <Elementary.h> 4#include <Elementary.h>
5#include "elm_priv.h" 5#include "elm_priv.h"
6 6
7#include <sys/mman.h> 7#ifdef HAVE_MMAN_H
8# include <sys/mman.h>
9#endif
8 10
9#ifdef HAVE_ELEMENTARY_X 11#ifdef HAVE_ELEMENTARY_X
10 12
@@ -1619,6 +1621,7 @@ elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data, void (
1619static Tmp_Info * 1621static Tmp_Info *
1620elm_cnp_tempfile_create(int size) 1622elm_cnp_tempfile_create(int size)
1621{ 1623{
1624#ifdef HAVE_MMAN_H
1622 Tmp_Info *info; 1625 Tmp_Info *info;
1623 const char *tmppath; 1626 const char *tmppath;
1624 int len; 1627 int len;
@@ -1696,6 +1699,10 @@ elm_cnp_tempfile_create(int size)
1696 } 1699 }
1697 1700
1698 return info; 1701 return info;
1702#else
1703 (void) size;
1704 return NULL;
1705#endif
1699} 1706}
1700 1707
1701 1708