LIBUCW_MAIN_INCLUDES+=workqueue.h semaphore.h asio.h
endif
-ifdef CONFIG_DIRECT
+ifdef CONFIG_UCW_FB_DIRECT
LIBUCW_MODS+=fb-direct
endif
UnSet("CONFIG_URL_ESCAPE_COMPAT");
# Allow use of direct IO on files
-Set("CONFIG_DIRECT");
+Set("CONFIG_DIRECT_IO");
+Set("CONFIG_UCW_FB_DIRECT");
# Return success
1;
struct fastbuf *bfdopen_internal(int fd, const char *name, uns buflen);
struct fastbuf *bfmmopen_internal(int fd, const char *name, uns mode);
-#ifdef CONFIG_DIRECT
+#ifdef CONFIG_UCW_FB_DIRECT
extern uns fbdir_cheat;
struct asio_queue;
struct fastbuf *fbdir_open_fd_internal(int fd, const char *name, struct asio_queue *io_queue, uns buffer_size, uns read_ahead, uns write_back);
if (p->type == FB_DIRECT)
return "Direct I/O is supported only with CONFIG_UCW_THREADS";
#endif
-#ifndef CONFIG_DIRECT
+#ifndef CONFIG_UCW_FB_DIRECT
if (p->type == FB_DIRECT)
return "Direct I/O is disabled";
#endif
struct fastbuf *fb;
switch (params->type)
{
-#ifdef CONFIG_DIRECT
+#ifdef CONFIG_UCW_FB_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_DIRECT
+#ifdef CONFIG_UCW_FB_DIRECT
if (params->type == FB_DIRECT && !fbdir_cheat)
mode |= O_DIRECT;
#endif
Append("COPT" => "-I/sw/include");
# Fill in some constants not found in the system header files
Set("SOL_TCP" => 6); # missing in /usr/include/netinet/tcp.h
- if (IsGiven("CONFIG_DIRECT") && IsSet("CONFIG_DIRECT")) {
+ if (IsGiven("CONFIG_DIRECT_IO") && IsSet("CONFIG_DIRECT_IO")) {
Fail("Direct I/O is not available on darwin");
} else {
- UnSet("CONFIG_DIRECT");
+ UnSet("CONFIG_DIRECT_IO");
}
}
Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12);
}
-# fb_direct needs threads
-if (!IsSet("CONFIG_UCW_THREADS")) {
- if (IsGiven("CONFIG_DIRECT") && IsSet("CONFIG_DIRECT")) {
- if (!IsGiven("CONFIG_UCW_THREADS")) {
- Set("CONFIG_UCW_THREADS");
- } else {
- Fail("CONFIG_DIRECT needs CONFIG_UCW_THREADS");
- }
- } else {
- UnSet("CONFIG_DIRECT");
- }
-}
-
PostConfig {
AtWrite {
UCW::Configure::C::ConfigHeader("ucw/autoconf.h", [
]);
} if Get("CONFIG_INSTALL_API");
+
+ # Include direct FB?
+ if (IsGiven("CONFIG_UCW_FB_DIRECT") && IsSet("CONFIG_UCW_FB_DIRECT")) {
+ }
+ if (!IsSet("CONFIG_UCW_THREADS") || !IsSet("CONFIG_DIRECT_IO")) {
+ if (IsGiven("CONFIG_UCW_FB_DIRECT") && IsSet("CONFIG_UCW_FB_DIRECT")) {
+ if (!IsSet("CONFIG_UCW_THREADS")) {
+ Fail("CONFIG_UCW_FB_DIRECT needs CONFIG_UCW_THREADS");
+ } else {
+ Fail("CONFIG_UCW_FB_DIRECT needs CONFIG_DIRECT_IO");
+ }
+ }
+ UnSet("CONFIG_UCW_FB_DIRECT");
+ }
};
# We succeeded