Index: trunk/src/sh_inotify.c
===================================================================
--- trunk/src/sh_inotify.c	(revision 474)
+++ trunk/src/sh_inotify.c	(revision 481)
@@ -135,5 +135,5 @@
   int    class;
   int    rdepth;
-  unsigned long check_mask;
+  unsigned long check_flags;
   char * file;
 } sh_watch;
@@ -236,5 +236,5 @@
   int     ifd = sh_inotify_getfd();
 
-  len = sl_read_timeout_fd (ifd, buffer, count, timeout, SL_FALSE);
+  len = sl_read_timeout_fd (ifd, buffer, count, timeout, S_FALSE);
 
   return len;
@@ -364,5 +364,5 @@
 
 char * sh_inotify_pop_dormant(sh_watches * watches, 
-			      int * class, unsigned long * check_mask, 
+			      int * class, unsigned long * check_flags, 
 			      int * type, int * rdepth)
 {
@@ -384,5 +384,5 @@
       *type   = this->watch->type;
       *rdepth = this->watch->rdepth;
-      *check_mask = this->watch->check_mask;
+      *check_flags = this->watch->check_flags;
       popret  = sh_util_strdup_track(this->watch->file, __FILE__, __LINE__);
 
@@ -424,5 +424,5 @@
 static zAVLKey sh_inotify_getkey(void const *item)
 {
-  return (&((sh_watch *)item)->watch);
+  return (&((const sh_watch *)item)->watch);
 }
 
@@ -490,5 +490,5 @@
 int sh_inotify_add_watch_later(const char * filename, sh_watches * watches, 
 			       int * errnum,
-			       int class, unsigned long check_mask, int type, 
+			       int class, unsigned long check_flags, int type, 
 			       int rdepth)
 {
@@ -500,5 +500,5 @@
   item->type       = (short) type;
   item->rdepth     = (short) rdepth;
-  item->check_mask = check_mask;
+  item->check_flags = check_flags;
 
   sh_inotify_add_dormant(watches, item);
@@ -548,5 +548,5 @@
 
   extern void sh_fInotify_report_add(char * path, 
-				     int class, unsigned long check_mask);
+				     int class, unsigned long check_flags);
 
   sh_dummy_litem = (void*) &litem;
@@ -575,5 +575,5 @@
 	      SH_MUTEX_UNLOCK(mutex_watches);
 
-	      sh_fInotify_report_add(litem->file, litem->class, litem->check_mask);
+	      sh_fInotify_report_add(litem->file, litem->class, litem->check_flags);
 
 	      litem = sh_inotify_list_del_cur(&listcursor, save);
@@ -592,5 +592,5 @@
  */
 int sh_inotify_add_watch(char * filename, sh_watches * watches, int * errnum,
-			 int class, unsigned long check_mask, int type, int rdepth)
+			 int class, unsigned long check_flags, int type, int rdepth)
 {
   volatile int retval = 0;
@@ -637,5 +637,5 @@
 	  item->type       = type;
 	  item->rdepth     = rdepth;
-	  item->check_mask = check_mask;
+	  item->check_flags = check_flags;
 	  
 	  if (NULL == watches->list_of_watches)
@@ -692,5 +692,5 @@
 
 char * sh_inotify_search_item(sh_watches * watches, int watch, 
-			      int * class, unsigned long * check_mask, 
+			      int * class, unsigned long * check_flags, 
 			      int * type, int * rdepth)
 {
@@ -709,5 +709,5 @@
     {
       *class      = item->class;
-      *check_mask = item->check_mask;
+      *check_flags = item->check_flags;
       *type       = item->type;
       *rdepth     = item->rdepth;
@@ -882,10 +882,10 @@
 
 int sh_inotify_add_watch(char * filename, sh_watches * watches, int  * errnum,
-			 int class, unsigned long check_mask, int type, int rdepth)
+			 int class, unsigned long check_flags, int type, int rdepth)
 {
   (void) filename;
   (void) watches;
   (void) class;
-  (void) check_mask;
+  (void) check_flags;
   (void) type;
   (void) rdepth;
@@ -898,10 +898,10 @@
 int sh_inotify_add_watch_later(const char * filename, sh_watches * watches, 
 			       int  * errnum,
-			       int class, unsigned long check_mask, int type, int rdepth)
+			       int class, unsigned long check_flags, int type, int rdepth)
 {
   (void) filename;
   (void) watches;
   (void) class;
-  (void) check_mask;
+  (void) check_flags;
   (void) type;
   (void) rdepth;
@@ -927,5 +927,5 @@
   int type;
   int rdepth;
-  unsigned long check_mask;
+  unsigned long check_flags;
   int           nrun = 0;
 
@@ -1022,12 +1022,12 @@
     CuAssertIntEquals(tc, count, 5);
     
-    p = sh_inotify_pop_dormant(&twatch, &class, &check_mask, &type, &rdepth);
+    p = sh_inotify_pop_dormant(&twatch, &class, &check_flags, &type, &rdepth);
     CuAssertStrEquals(tc, p, "a5");
     
-    p = sh_inotify_pop_dormant(&twatch, &class, &check_mask, &type, &rdepth);
+    p = sh_inotify_pop_dormant(&twatch, &class, &check_flags, &type, &rdepth);
     CuAssertStrEquals(tc, p, "a3");
     CuAssertIntEquals(tc, class, 3);
     
-    p = sh_inotify_pop_dormant(&twatch, &class, &check_mask, &type, &rdepth);
+    p = sh_inotify_pop_dormant(&twatch, &class, &check_flags, &type, &rdepth);
     CuAssertTrue(tc, NULL == p);
     CuAssertTrue(tc, NULL == twatch.dormant_watches);
