more aix/big-endian fixes

This commit is contained in:
TLINDEN
2013-11-18 21:48:24 +01:00
parent 88d947aed7
commit c4940b966c
20 changed files with 231 additions and 196 deletions

View File

@@ -38,7 +38,7 @@
# define htobe64 hto64be
# endif
# else // no sys/endian.h
# if __BYTE_ORDER == __BIG_ENDIAN
# ifdef __BIG_ENDIAN
# define be32toh(x) (x)
# define htobe32(x) (x)
# define be64toh(x) (x)

View File

@@ -49,13 +49,13 @@ struct _vault_t {
};
struct _vault_header_t {
byte fileid;
uint8_t fileid;
uint32_t version;
byte checksum[32];
};
struct _vault_item_header_t {
byte type;
uint8_t type;
uint32_t size;
uint32_t version;
byte checksum[32];
@@ -68,7 +68,7 @@ typedef struct _vault_item_header_t vault_item_header_t;
vault_t *pcpvault_init(char *filename);
vault_t *pcpvault_new(char *filename, int is_tmp);
int pcpvault_create(vault_t *vault);
int pcpvault_additem(vault_t *vault, void *item, size_t itemsize, uint8_t type, uint8_t do_hash);
int pcpvault_additem(vault_t *vault, void *item, size_t itemsize, uint8_t type);
int pcpvault_addkey(vault_t *vault, void *item, uint8_t type);
int pcpvault_close(vault_t *vault);
int pcpvault_fetchall(vault_t *vault);