0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-14 00:34:18 +01:00

ircd::fs: Simplify these ifdef conditions.

This commit is contained in:
Jason Volk 2019-03-27 19:07:11 -07:00
parent 977840a246
commit 6dc50292e8
2 changed files with 7 additions and 7 deletions

View file

@ -814,7 +814,7 @@ ircd::fs::append(const string_view &path,
// the -1. Otherwise, we don't keep flags in userspace and we
// don't check the fd for whether it was opened with O_APPEND
// so the user may just have to eat the cost of an extra lseek().
#if defined(HAVE_PWRITEV2) && defined(RWF_APPEND)
#if defined(RWF_APPEND)
size_t
ircd::fs::append(const fd &fd,
const const_buffers &bufs,
@ -840,7 +840,7 @@ ircd::fs::append(const fd &fd,
return write(fd, bufs, opts);
}
#endif // HAVE_PWRITEV2
#endif // RWF_APPEND
ircd::const_buffer
ircd::fs::write(const string_view &path,

View file

@ -196,7 +196,7 @@ ircd::fs::aio::request::write::write(const int &fd,
aio_nbytes = iov.size();
aio_offset = opts.offset;
#if defined(HAVE_PWRITEV2) && defined(RWF_APPEND)
#if defined(RWF_APPEND)
if(support_append && opts.offset == -1)
{
// AIO departs from pwritev2() behavior and EINVAL's on -1.
@ -205,12 +205,12 @@ ircd::fs::aio::request::write::write(const int &fd,
}
#endif
#if defined(HAVE_PWRITEV2) && defined(RWF_DSYNC)
#if defined(RWF_DSYNC)
if(support_dsync && opts.sync && !opts.metadata)
aio_rw_flags |= RWF_DSYNC;
#endif
#if defined(HAVE_PWRITEV2) && defined(RWF_SYNC)
#if defined(RWF_SYNC)
if(support_sync && opts.sync && opts.metadata)
aio_rw_flags |= RWF_SYNC;
#endif
@ -276,12 +276,12 @@ ircd::fs::aio::request::request(const int &fd,
aio_data = uintptr_t(this);
aio_reqprio = reqprio(opts->priority);
#if defined(HAVE_PWRITEV2) && defined(HAVE_PREADV2) && defined(RWF_HIPRI)
#if defined(RWF_HIPRI)
if(support_hipri && aio_reqprio == reqprio(opts::highest_priority))
aio_rw_flags |= RWF_HIPRI;
#endif
#if defined(HAVE_PWRITEV2) && defined(HAVE_PREADV2) && defined(RWF_NOWAIT)
#if defined(RWF_NOWAIT)
if(support_nowait && !opts->blocking)
aio_rw_flags |= RWF_NOWAIT;
#endif