#ifndef WRITE_OR_DIE_H
#define WRITE_OR_DIE_H
void maybe_flush_or_die(FILE *, const char *);
__attribute__((format (printf, 2, 3)))
void fprintf_or_die(FILE *, const char *fmt, ...);
void fwrite_or_die(FILE *f, const void *buf, size_t count);
void fflush_or_die(FILE *f);
void write_or_die(int fd, const void *buf, size_t count);
enum fsync_component { … };
#define FSYNC_COMPONENTS_OBJECTS …
#define FSYNC_COMPONENTS_DERIVED_METADATA …
#define FSYNC_COMPONENTS_DEFAULT …
#define FSYNC_COMPONENTS_COMMITTED …
#define FSYNC_COMPONENTS_ADDED …
#define FSYNC_COMPONENTS_ALL …
#ifndef FSYNC_COMPONENTS_PLATFORM_DEFAULT
#define FSYNC_COMPONENTS_PLATFORM_DEFAULT …
#endif
void fsync_or_die(int fd, const char *);
int fsync_component(enum fsync_component component, int fd);
void fsync_component_or_die(enum fsync_component component, int fd, const char *msg);
extern enum fsync_component fsync_components;
extern int fsync_object_files;
extern int use_fsync;
enum fsync_method { … };
extern enum fsync_method fsync_method;
static inline int batch_fsync_enabled(enum fsync_component component)
{ … }
#endif