#include <queue>
-#ifdef USE_HOTLOADING
+#if ENABLE_HOTLOADING
#include <sys/inotify.h>
#include <sys/ioctl.h>
#endif
#endif
} rsrc_list;
-#ifdef USE_HOTLOADING
+#if ENABLE_HOTLOADING
static struct watch_list
{
// this table associates a watch descriptor with a loaded resource
rsrc_list.table[path] = rsrc;
rsrc->path_ = path;
rsrc->type_ = ext;
-#ifdef USE_HOTLOADING
+#if ENABLE_HOTLOADING
rsrc->wd_ = watch_list.add(rsrc);
#endif
return rsrc;
{
int count = 0;
-#ifdef USE_HOTLOADING
+#if ENABLE_HOTLOADING
char bytes[BUF_SIZE];
int num_bytes;
// an inotify file descriptor lets your read inotify_event structures
resource::~resource()
{
rsrc_list.table.erase(path_);
-#ifdef USE_HOTLOADING
+#if ENABLE_HOTLOADING
watch_list.remove(wd_);
#endif
}