On Thu, 2 May 2002, Hajimu UMEMOTO wrote:

> It cannot be compiled under FreeBSD due to absence of O_DSYNC.
> Though I dunno what O_DSYNC is, maybe O_FSYNC is an alternative of
> it.

O_DSYNC means sync only actual data, not metadata (e.g. update/access
times); it's defined in one of the later POSIX specs.  O_SYNC is the
best alternative (O_FSYNC on BSD systems).

> #ifndef O_DSYNC
> #define O_DSYNC       O_FSYNC
> #endif

Better:

#ifndef O_DSYNC
#  ifdef O_SYNC
#    define O_DSYNC     O_SYNC          /* POSIX */
#  else
#    define O_DSYNC     O_FSYNC         /* BSD */
#  endif
#endif

-- 
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA

Reply via email to