mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
fdatasync: minor improvements
Picks up some ideas by Paul Eggert from here: https://lists.gnu.org/archive/html/bug-coreutils/2011-07/msg00157.html * modules/fdatasync (Depends-on): Add condition for fsync. * lib/fdatasync.c (fdatasync): Add comment. * tests/test-unistd-c++.cc: Test fdatasync. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
2011-09-16 Eric Blake <eblake@redhat.com>
|
2011-09-16 Eric Blake <eblake@redhat.com>
|
||||||
|
|
||||||
|
fdatasync: minor improvements
|
||||||
|
* modules/fdatasync (Depends-on): Add condition for fsync.
|
||||||
|
* lib/fdatasync.c (fdatasync): Add comment.
|
||||||
|
* tests/test-unistd-c++.cc: Test fdatasync.
|
||||||
|
|
||||||
unistd: update refs to newer POSIX
|
unistd: update refs to newer POSIX
|
||||||
* lib/unistd.in.h: Prefer POSIX 2008 over 2001.
|
* lib/unistd.in.h: Prefer POSIX 2008 over 2001.
|
||||||
Suggested by Bruno Haible.
|
Suggested by Bruno Haible.
|
||||||
|
@@ -21,5 +21,7 @@
|
|||||||
int
|
int
|
||||||
fdatasync (int fd)
|
fdatasync (int fd)
|
||||||
{
|
{
|
||||||
|
/* This does more work than strictly necessary, but is the best we
|
||||||
|
can do portably. */
|
||||||
return fsync (fd);
|
return fsync (fd);
|
||||||
}
|
}
|
||||||
|
@@ -6,7 +6,7 @@ lib/fdatasync.c
|
|||||||
m4/fdatasync.m4
|
m4/fdatasync.m4
|
||||||
|
|
||||||
Depends-on:
|
Depends-on:
|
||||||
fsync
|
fsync [test $HAVE_FDATASYNC = 0]
|
||||||
unistd
|
unistd
|
||||||
|
|
||||||
configure.ac:
|
configure.ac:
|
||||||
|
@@ -60,6 +60,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::fchownat, int,
|
|||||||
(int, char const *, uid_t, gid_t, int));
|
(int, char const *, uid_t, gid_t, int));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GNULIB_TEST_FDATASYNC
|
||||||
|
SIGNATURE_CHECK (GNULIB_NAMESPACE::fdatasync, int, (int));
|
||||||
|
#endif
|
||||||
|
|
||||||
#if GNULIB_TEST_FSYNC
|
#if GNULIB_TEST_FSYNC
|
||||||
SIGNATURE_CHECK (GNULIB_NAMESPACE::fsync, int, (int));
|
SIGNATURE_CHECK (GNULIB_NAMESPACE::fsync, int, (int));
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user