mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
add pragmas for non-gcc compilers
git-svn: trunk@3767
This commit is contained in:
parent
75786907f3
commit
415543ef91
1 changed files with 15 additions and 0 deletions
|
@ -117,14 +117,29 @@ typedef struct {
|
|||
|
||||
|
||||
#if WORDS_BIGENDIAN == 0
|
||||
|
||||
#ifndef HAVE_ATTRIB_PACKED
|
||||
#define __attribute__((packed))
|
||||
#endif
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
#ifdef HAVE_PRAGMA_PACK_HPPA
|
||||
#pragma pack 1
|
||||
#endif
|
||||
|
||||
union unaligned {
|
||||
int32_t una_u32;
|
||||
int32_t una_s32;
|
||||
int16_t una_s16;
|
||||
} __attribute__((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack()
|
||||
#endif
|
||||
#ifdef HAVE_PRAGMA_PACK_HPPA
|
||||
#pragma pack
|
||||
#endif
|
||||
/* Little endian */
|
||||
#define le16_to_host(v) (v)
|
||||
#define le32_to_host(v) (v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue