summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 13:02:59 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 13:02:59 +0000
commit6a5eaacc6ada22808ec8515ef2b414883f4f59fe (patch)
tree11ddc57ab808907ac2652e57a2f1cde8335eec81 /src/lib/ecore_file
parente3178a936d09c417ad9935c2304bf211fe8de345 (diff)
efl: common inotify checks, simplified.
Another try to make inotify checks more common. This time uses AC_CHECK_HEADERS() as for others, that already define HAVE_SYS_INOTIFY_H, then uses that. I still kept AM_CONDITIONAL([HAVE_INOTIFY]) because I plan to convert ecore_file to the same, smarter, method that is used in eio (compiling the file depending on the backend. SVN revision: 80358
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file_monitor.c10
-rw-r--r--src/lib/ecore_file/ecore_file_monitor_inotify.c4
-rw-r--r--src/lib/ecore_file/ecore_file_private.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/ecore_file/ecore_file_monitor.c b/src/lib/ecore_file/ecore_file_monitor.c
index 8b07589a9e..ac7d6d4dc3 100644
--- a/src/lib/ecore_file/ecore_file_monitor.c
+++ b/src/lib/ecore_file/ecore_file_monitor.c
@@ -6,7 +6,7 @@
6 6
7typedef enum { 7typedef enum {
8 ECORE_FILE_MONITOR_TYPE_NONE, 8 ECORE_FILE_MONITOR_TYPE_NONE,
9#ifdef HAVE_INOTIFY 9#ifdef HAVE_SYS_INOTIFY_H
10 ECORE_FILE_MONITOR_TYPE_INOTIFY, 10 ECORE_FILE_MONITOR_TYPE_INOTIFY,
11#endif 11#endif
12#ifdef HAVE_NOTIFY_WIN32 12#ifdef HAVE_NOTIFY_WIN32
@@ -22,7 +22,7 @@ static Ecore_File_Monitor_Type monitor_type = ECORE_FILE_MONITOR_TYPE_NONE;
22int 22int
23ecore_file_monitor_init(void) 23ecore_file_monitor_init(void)
24{ 24{
25#ifdef HAVE_INOTIFY 25#ifdef HAVE_SYS_INOTIFY_H
26 monitor_type = ECORE_FILE_MONITOR_TYPE_INOTIFY; 26 monitor_type = ECORE_FILE_MONITOR_TYPE_INOTIFY;
27 if (ecore_file_monitor_inotify_init()) 27 if (ecore_file_monitor_inotify_init())
28 return 1; 28 return 1;
@@ -48,7 +48,7 @@ ecore_file_monitor_shutdown(void)
48 { 48 {
49 case ECORE_FILE_MONITOR_TYPE_NONE: 49 case ECORE_FILE_MONITOR_TYPE_NONE:
50 break; 50 break;
51#ifdef HAVE_INOTIFY 51#ifdef HAVE_SYS_INOTIFY_H
52 case ECORE_FILE_MONITOR_TYPE_INOTIFY: 52 case ECORE_FILE_MONITOR_TYPE_INOTIFY:
53 ecore_file_monitor_inotify_shutdown(); 53 ecore_file_monitor_inotify_shutdown();
54 break; 54 break;
@@ -101,7 +101,7 @@ ecore_file_monitor_add(const char *path,
101 { 101 {
102 case ECORE_FILE_MONITOR_TYPE_NONE: 102 case ECORE_FILE_MONITOR_TYPE_NONE:
103 return NULL; 103 return NULL;
104#ifdef HAVE_INOTIFY 104#ifdef HAVE_SYS_INOTIFY_H
105 case ECORE_FILE_MONITOR_TYPE_INOTIFY: 105 case ECORE_FILE_MONITOR_TYPE_INOTIFY:
106 return ecore_file_monitor_inotify_add(path, func, data); 106 return ecore_file_monitor_inotify_add(path, func, data);
107#endif 107#endif
@@ -138,7 +138,7 @@ ecore_file_monitor_del(Ecore_File_Monitor *em)
138 { 138 {
139 case ECORE_FILE_MONITOR_TYPE_NONE: 139 case ECORE_FILE_MONITOR_TYPE_NONE:
140 break; 140 break;
141#ifdef HAVE_INOTIFY 141#ifdef HAVE_SYS_INOTIFY_H
142 case ECORE_FILE_MONITOR_TYPE_INOTIFY: 142 case ECORE_FILE_MONITOR_TYPE_INOTIFY:
143 ecore_file_monitor_inotify_del(em); 143 ecore_file_monitor_inotify_del(em);
144 break; 144 break;
diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c
index 1b682fc4a0..9cb5de83e6 100644
--- a/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -20,7 +20,7 @@
20 * - Listen to IN_IGNORED, emitted when the watch is removed 20 * - Listen to IN_IGNORED, emitted when the watch is removed
21 */ 21 */
22 22
23#ifdef HAVE_INOTIFY 23#ifdef HAVE_SYS_INOTIFY_H
24 24
25#include <sys/inotify.h> 25#include <sys/inotify.h>
26 26
@@ -328,4 +328,4 @@ _ecore_file_monitor_inotify_print(char *file, int mask)
328 INF("Inotify unmount %s: %s", type, file); 328 INF("Inotify unmount %s: %s", type, file);
329} 329}
330#endif 330#endif
331#endif /* HAVE_INOTIFY */ 331#endif /* HAVE_SYS_INOTIFY_H */
diff --git a/src/lib/ecore_file/ecore_file_private.h b/src/lib/ecore_file/ecore_file_private.h
index 45d2cbd65c..769f2ba014 100644
--- a/src/lib/ecore_file/ecore_file_private.h
+++ b/src/lib/ecore_file/ecore_file_private.h
@@ -81,7 +81,7 @@ struct _Ecore_File_Monitor
81 Ecore_File *files; 81 Ecore_File *files;
82}; 82};
83 83
84#ifdef HAVE_INOTIFY 84#ifdef HAVE_SYS_INOTIFY_H
85int ecore_file_monitor_inotify_init(void); 85int ecore_file_monitor_inotify_init(void);
86int ecore_file_monitor_inotify_shutdown(void); 86int ecore_file_monitor_inotify_shutdown(void);
87Ecore_File_Monitor *ecore_file_monitor_inotify_add(const char *path, 87Ecore_File_Monitor *ecore_file_monitor_inotify_add(const char *path,