ifdef CONFIG_UCW_THREADS
# Some modules require threading
-LIBUCW_MODS+=threads-conf workqueue asio fb-direct
+LIBUCW_MODS+=threads-conf workqueue asio
LIBUCW_MAIN_INCLUDES+=workqueue.h semaphore.h asio.h
endif
+ifdef CONFIG_DIRECT
+LIBUCW_MODS+=fb-direct
+endif
+
ifdef CONFIG_OWN_GETOPT
include $(s)/ucw/getopt/Makefile
endif
# Use obsolete URL escaping rules (if you need behavior identical to the older versions of libucw)
UnSet("CONFIG_URL_ESCAPE_COMPAT");
+# Allow use of direct IO on files
+Set("CONFIG_DIRECT");
+
# Return success
1;
#ifndef CONFIG_UCW_THREADS
if (p->type == FB_DIRECT)
return "Direct I/O is supported only with CONFIG_UCW_THREADS";
+#endif
+#ifndef CONFIG_DIRECT
+ if (p->type == FB_DIRECT)
+ return "Direct I/O is disabled";
#endif
return NULL;
}
struct fastbuf *fb;
switch (params->type)
{
-#ifdef CONFIG_UCW_THREADS
+#ifdef CONFIG_DIRECT
case FB_DIRECT:
fb = fbdir_open_fd_internal(fd, name, params->asio,
params->buffer_size ? : fbpar_def.buffer_size,
{
if (!params)
params = &fbpar_def;
-#ifdef CONFIG_UCW_THREADS
+#ifdef CONFIG_DIRECT
if (params->type == FB_DIRECT && !fbdir_cheat)
mode |= O_DIRECT;
#endif