#ifndef REFTABLE_BASICS_H
#define REFTABLE_BASICS_H
-#include <stddef.h>
+#include "reftable-system.h"
/* A buffer that contains arbitrary byte slices. */
struct reftable_buf {
#ifndef REFTABLE_BLOCK_H
#define REFTABLE_BLOCK_H
-#include <stdint.h>
-
+#include "reftable-system.h"
#include "reftable-basics.h"
#include "reftable-blocksource.h"
#include "reftable-iterator.h"
#ifndef REFTABLE_BLOCKSOURCE_H
#define REFTABLE_BLOCKSOURCE_H
-#include <stdint.h>
+#include "reftable-system.h"
/*
* Generic wrapper for a seekable readable file.
#ifndef REFTABLE_ERROR_H
#define REFTABLE_ERROR_H
+#include "reftable-system.h"
+
/*
* Errors in reftable calls are signaled with negative integer return values. 0
* means success.
#ifndef REFTABLE_FSCK_H
#define REFTABLE_FSCK_H
+#include "reftable-system.h"
#include "reftable-stack.h"
enum reftable_fsck_error {
#ifndef REFTABLE_ITERATOR_H
#define REFTABLE_ITERATOR_H
+#include "reftable-system.h"
#include "reftable-record.h"
struct reftable_iterator_vtable;
#ifndef REFTABLE_MERGED_H
#define REFTABLE_MERGED_H
+#include "reftable-system.h"
#include "reftable-iterator.h"
/*
#ifndef REFTABLE_RECORD_H
#define REFTABLE_RECORD_H
+#include "reftable-system.h"
#include "reftable-basics.h"
-#include <stdint.h>
/*
* Basic data types
#ifndef REFTABLE_STACK_H
#define REFTABLE_STACK_H
+#include "reftable-system.h"
#include "reftable-writer.h"
/*
--- /dev/null
+#ifndef REFTABLE_SYSTEM_H
+#define REFTABLE_SYSTEM_H
+
+/*
+ * This header defines the platform-specific bits required to compile the
+ * reftable library. It should provide an environment that bridges over the
+ * gaps between POSIX and your system, as well as the zlib interfaces. This
+ * header is expected to be changed by the individual project.
+ */
+
+#define MINGW_DONT_HANDLE_IN_USE_ERROR
+#include "compat/posix.h"
+#include "compat/zlib-compat.h"
+
+#endif
#ifndef REFTABLE_TABLE_H
#define REFTABLE_TABLE_H
+#include "reftable-system.h"
#include "reftable-iterator.h"
#include "reftable-block.h"
#include "reftable-blocksource.h"
#ifndef REFTABLE_WRITER_H
#define REFTABLE_WRITER_H
+#include "reftable-system.h"
#include "reftable-record.h"
-#include <stdint.h>
-#include <unistd.h> /* ssize_t */
-
/* Writing single reftables */
/* reftable_write_options sets options for writing a single reftable. */
#ifndef SYSTEM_H
#define SYSTEM_H
-/* This header glues the reftable library to the rest of Git */
+/*
+ * This header defines the platform-agnostic interface that is to be
+ * implemented by the project to make it work on their respective supported
+ * systems, and to integrate it into the project itself. This header is not
+ * expected to be changed by the individual project.
+ */
-#define MINGW_DONT_HANDLE_IN_USE_ERROR
-#include "compat/posix.h"
-#include "compat/zlib-compat.h"
+#include "reftable-system.h"
/*
* Return a random 32 bit integer. This function is expected to return