From dbf94632385ff1228ca89488c236dc4d7ab79a81 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Wed, 18 Nov 2015 15:35:09 +0100 Subject: [PATCH] The endianness of a DMS is now stored in the OBIDMS structure --- src/obidms.c | 3 +++ src/obidms.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/obidms.c b/src/obidms.c index 35ae74f..8bdfe58 100644 --- a/src/obidms.c +++ b/src/obidms.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -387,6 +388,8 @@ OBIDMS_p obi_open_dms(const char* dms_name) close(infos_file_descriptor); + dms->little_endian = little_endian_dms; + // Open the arrays directory dms->array_directory = private_opendirat(dms->dir_fd, ARRAYS_DIR_NAME); if (dms->array_directory == NULL) diff --git a/src/obidms.h b/src/obidms.h index d990e79..2f4083c 100644 --- a/src/obidms.h +++ b/src/obidms.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "obierrno.h" @@ -52,6 +53,8 @@ typedef struct OBIDMS { int array_dir_fd; /**< The file descriptor of the directory entry * usable to refer and scan the array directory. */ + bool little_endian; /**< Endianness of the database. + */ } OBIDMS_t, *OBIDMS_p;