Makefile: Remove unused uname_rs.
[osl.git] / osl_core.h
index df32b60a875b4c4448f991823ab1e974d5a4f0c7..1220a09eac1a9aa7cd59742828d8c7c4ca865c9d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -133,7 +133,7 @@ _static_inline_ struct osl_column_description *get_column_description(
  */
 enum index_header_offsets {
        /** Bytes 0-8: PARASLASH. */
-       IDX_PARA_MAGIC = 0,
+       IDX_OSL_MAGIC = 0,
        /** Byte 9: Dirty flag (nonzero if table is mapped). */
        IDX_DIRTY_FLAG = 9,
        /** Byte 10: osl table version number. */
@@ -165,7 +165,7 @@ enum index_column_desc_offsets {
 };
 
 /** Magic string contained in the header of the index file of each osl table. */
-#define PARA_MAGIC "PARASLASH"
+#define OSL_MAGIC "PARASLASH"
 
 /**
  * The minimal number of bytes for a column in the index header.
@@ -190,9 +190,27 @@ _static_inline_ size_t index_column_description_size(const char *name)
        return MIN_IDX_COLUMN_DESCRIPTION_SIZE + strlen(name) - 1;
 }
 
+/*
+ * The version used by this instance of the library. Written to the index of
+ * newly created tables.
+ */
 #define CURRENT_TABLE_VERSION 1
+
+/*
+ * The lowest library version that is able to use tables of version
+ * CURRENT_TABLE_VERSION. Also written to the index of new tables. If
+ * compat_version(table) > current_version(lib) the table can not be opened.
+ */
+#define COMPAT_TABLE_VERSION 0
+
+/*
+ * The lowest table version this library understands. On open, if
+ * current_version(table) < min_version(lib) the osl_open_table() call
+ * fails.
+ */
 #define MIN_TABLE_VERSION 1
-#define MAX_TABLE_VERSION 1
+
+
 /** An index header must be at least that many bytes long. */
 #define MIN_INDEX_HEADER_SIZE(num_cols) (MIN_IDX_COLUMN_DESCRIPTION_SIZE \
        * num_cols + IDX_COLUMN_DESCRIPTIONS)