libresman

diff src/resman_impl.h @ 23:f8e5a1491275

win32 file change notification attempt1 (failed)
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 13 Feb 2014 13:17:07 +0200
parents 174ddb6bf92a
children ce04fa12afdd
line diff
     1.1 --- a/src/resman_impl.h	Wed Feb 12 22:32:30 2014 +0200
     1.2 +++ b/src/resman_impl.h	Thu Feb 13 13:17:07 2014 +0200
     1.3 @@ -10,6 +10,9 @@
     1.4  #include <fcntl.h>
     1.5  #include <sys/inotify.h>
     1.6  #endif
     1.7 +#ifdef WIN32
     1.8 +#include <windows.h>
     1.9 +#endif
    1.10  
    1.11  struct resource {
    1.12  	int id;
    1.13 @@ -24,8 +27,9 @@
    1.14  	int num_loads;		/* number of loads up to now */
    1.15  
    1.16  	/* file change monitoring */
    1.17 -#ifdef __WIN32__
    1.18 +#ifdef WIN32
    1.19  	HANDLE nhandle;
    1.20 +	char *watch_path;
    1.21  #endif
    1.22  #ifdef __linux__
    1.23  	int nfd;
    1.24 @@ -49,9 +53,13 @@
    1.25  
    1.26  	/* file change monitoring */
    1.27  	struct rbtree *nresmap;
    1.28 -	struct rbtree *modset;
    1.29  #ifdef __linux__
    1.30  	int inotify_fd;
    1.31 +	struct rbtree *modset;
    1.32 +#endif
    1.33 +#ifdef WIN32
    1.34 +	struct rbtree *watchdirs;
    1.35 +	HANDLE *watch_handles;	/* dynamic array of all the watch handles */
    1.36  #endif
    1.37  };
    1.38