#include <queue>
-#ifdef USE_HOTLOADING
+#if ENABLE_HOTLOADING
#include <sys/inotify.h>
#include <sys/ioctl.h>
#endif
// try it with the prefix first
path = stlplus::filespec_to_path(*it, prefix);
path = stlplus::filespec_to_path(path, name);
- log_info("looking for", name, "at", path);
+ log_debug("looking for", name, "at", path);
if (stlplus::file_exists(path)) return path;
}
path = stlplus::filespec_to_path(*it, name);
- log_info("looking for", name, "at", path);
+ log_debug("looking for", name, "at", path);
if (stlplus::file_exists(path)) return path;
}
#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
}