2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1997, 1998
5 * Sleepycat Software. All rights reserved.
11 static const char sccsid
[] = "@(#)os_fsync.c 10.7 (Sleepycat) 10/12/98";
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
18 #include <fcntl.h> /* XXX: Required by __hp3000s900 */
30 extern FCONTROL(short, short, void *);
32 FCONTROL(_MPE_FILENO(fd
), 2, NULL
); /* Flush the buffers */
33 FCONTROL(_MPE_FILENO(fd
), 6, NULL
); /* Write the EOF */
39 #define fsync(fd) __mpe_fsync(fd);
42 #define fsync(fd) _commit(fd);
47 * Flush a file descriptor.
49 * PUBLIC: int __os_fsync __P((int));
57 ret
= __db_jump
.j_fsync
!= NULL
? __db_jump
.j_fsync(fd
) : fsync(fd
);
58 return (ret
== 0 ? 0 : errno
);