aboutsummaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/libunix/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/libunix/sync.c')
-rw-r--r--gnu/libexec/uucp/libunix/sync.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/gnu/libexec/uucp/libunix/sync.c b/gnu/libexec/uucp/libunix/sync.c
deleted file mode 100644
index c346c58ccb7a..000000000000
--- a/gnu/libexec/uucp/libunix/sync.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* sync.c
- Sync a file to disk, if FSYNC_ON_CLOSE is set. */
-
-#include "uucp.h"
-
-#include "uudefs.h"
-#include "sysdep.h"
-#include "system.h"
-
-#include <errno.h>
-
-boolean
-fsysdep_sync (e, zmsg)
- openfile_t e;
- const char *zmsg;
-{
- int o;
-
-#if USE_STDIO
- if (fflush (e) == EOF)
- {
- ulog (LOG_ERROR, "%s: fflush: %s", zmsg, strerror (errno));
- return FALSE;
- }
-#endif
-
-#if USE_STDIO
- o = fileno (e);
-#else
- o = e;
-#endif
-
-#if FSYNC_ON_CLOSE
- if (fsync (o) < 0)
- {
- ulog (LOG_ERROR, "%s: fsync: %s", zmsg, strerror (errno));
- return FALSE;
- }
-#endif
-
- return TRUE;
-}