remove useless definition of the macro HAVE_MMAN_H
authorVincent Torri <vincent.torri@gmail.com>
Mon, 5 Aug 2019 11:27:16 +0000 (11:27 +0000)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 12 Aug 2019 07:22:58 +0000 (16:22 +0900)
use HAVE_SYS_MMAN_H when including sys/mman.h and HAVE_MMAP when using mmap()

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9494

header_checks/meson.build
src/lib/elementary/efl_ui_selection_manager.c

index b8005cc..35dd2cf 100644 (file)
@@ -206,10 +206,6 @@ if (cc.has_header_symbol('sys/stat.h', 'fstatat'))
   config_h.set10('HAVE_ATFILE_SOURCE', true)
 endif
 
-if (cc.has_header('sys/mman.h'))
-  config_h.set10('HAVE_MMAN_H', true)
-endif
-
 if sys_linux and config_h.has('HAVE_LISTXATTR') and config_h.has('HAVE_SETXATTR') and config_h.has('HAVE_GETXATTR')
   config_h.set10('HAVE_XATTR', true)
 endif
index 7181a14..9d9bbc3 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <Elementary.h>
 #include "elm_priv.h"
-#ifdef HAVE_MMAN_H
+#ifdef HAVE_SYS_MMAN_H
 # include <sys/mman.h>
 #endif
 
@@ -270,7 +270,7 @@ _update_sel_lost_list(Efl_Object *obj, Efl_Ui_Selection_Type type,
 static Tmp_Info *
 _tempfile_new(int size)
 {
-#ifdef HAVE_MMAN_H
+#ifdef HAVE_MMAP
    Tmp_Info *info;
    const char *tmppath = NULL;
    mode_t cur_umask;