Pack structure only on AIX.

This commit is contained in:
Chip-Kerchner 2023-10-12 09:41:33 -05:00
parent e98e3c4783
commit d46eba06a7
1 changed files with 8 additions and 0 deletions

View File

@ -32,7 +32,11 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
typedef union typedef union
{ {
unsigned short v; unsigned short v;
#if defined(_AIX)
struct __attribute__((packed)) struct __attribute__((packed))
#else
struct
#endif
{ {
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
unsigned short s:1; unsigned short s:1;
@ -49,7 +53,11 @@ typedef union
typedef union typedef union
{ {
float v; float v;
#if defined(_AIX)
struct __attribute__((packed)) struct __attribute__((packed))
#else
struct
#endif
{ {
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
uint32_t s:1; uint32_t s:1;