fixed yet another endian issue (I used the wrong define for it)

This commit is contained in:
TLINDEN
2013-11-19 21:02:59 +01:00
parent 8b3b76d52d
commit 04dbf19381
8 changed files with 26 additions and 14 deletions

View File

@@ -358,7 +358,7 @@ int pcpvault_close(vault_t *vault) {
}
vault_header_t * vh2be(vault_header_t *h) {
#ifdef __BIG_ENDIAN
#ifdef __CPU_IS_BIG_ENDIAN
return h;
#else
h->version = htobe32(h->version);
@@ -367,7 +367,7 @@ vault_header_t * vh2be(vault_header_t *h) {
}
vault_header_t * vh2native(vault_header_t *h) {
#ifdef __BIG_ENDIAN
#ifdef __CPU_IS_BIG_ENDIAN
return h;
#else
h->version = be32toh(h->version);
@@ -376,7 +376,7 @@ vault_header_t * vh2native(vault_header_t *h) {
}
vault_item_header_t * ih2be(vault_item_header_t *h) {
#ifdef __BIG_ENDIAN
#ifdef __CPU_IS_BIG_ENDIAN
return h;
#else
h->version = htobe32(h->version);
@@ -386,7 +386,7 @@ vault_item_header_t * ih2be(vault_item_header_t *h) {
}
vault_item_header_t * ih2native(vault_item_header_t *h) {
#ifdef __BIG_ENDIAN
#ifdef __CPU_IS_BIG_ENDIAN
return h;
#else
h->version = be32toh(h->version);