diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-08-05 17:20:51 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-08-05 17:20:51 +0000 |
commit | 298517da097dc49dc3adaf0f8c62d70d5b5d0183 (patch) | |
tree | 71b3c2b0cccc3cb6ab5e634acb7659b8df8c7434 /navit/file.c | |
parent | e047029fe932df094170670eb6f80b5d1a0ad74e (diff) | |
download | navit-298517da097dc49dc3adaf0f8c62d70d5b5d0183.tar.gz |
Fix:Build:Better approach for #pragma pack vs __attribute__((packed))
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4673 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/file.c')
-rw-r--r-- | navit/file.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/navit/file.c b/navit/file.c index 477cf98e4..2ce235808 100644 --- a/navit/file.c +++ b/navit/file.c @@ -45,6 +45,7 @@ #include "item.h" #include "util.h" #include "types.h" +#include "zipfile.h" #ifdef HAVE_SOCKET #include <sys/socket.h> #include <netdb.h> @@ -78,20 +79,21 @@ static GHashTable *file_name_hash; static struct cache *file_cache; -#ifdef _MSC_VER -#pragma pack(push,1) -#endif /* _MSC_VER */ +#ifdef HAVE_PRAGMA_PACK +#pragma pack(push) +#pragma pack(1) +#endif + struct file_cache_id { long long offset; int size; int file_name_id; int method; -#ifndef _MSC_VER -}__attribute__ ((packed)); -#else /* _MSC_VER */ -}; +} ATTRIBUTE_PACKED; + +#ifdef HAVE_PRAGMA_PACK #pragma pack(pop) -#endif /* _MSC_VER */ +#endif #ifdef HAVE_SOCKET static int |