From 5b2953c9c7fdbdf07f526237142de14c09fec1d8 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Fri, 10 Jun 2022 02:43:01 +0000 Subject: [PATCH] updated the structure packing pragmas --- moo/lib/pack1.h | 5 ++++- moo/lib/unpack.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/moo/lib/pack1.h b/moo/lib/pack1.h index 4bd87a1..80e154f 100644 --- a/moo/lib/pack1.h +++ b/moo/lib/pack1.h @@ -24,7 +24,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined(__GNUC__) + +#if defined(__GNUC__) && (__GNUC__ >= 4) +# pragma pack(push,1) +#elif defined(__GNUC__) # pragma pack(1) #elif defined(__HP_aCC) || defined(__HP_cc) # pragma PACK 1 diff --git a/moo/lib/unpack.h b/moo/lib/unpack.h index 84acb0f..f960a34 100644 --- a/moo/lib/unpack.h +++ b/moo/lib/unpack.h @@ -24,7 +24,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined(__GNUC__) + +#if defined(__GNUC__) && (__GNUC__ >= 4) +# pragma pack(pop) +#elif defined(__GNUC__) # pragma pack() #elif defined(__HP_aCC) || defined(__HP_cc) # pragma PACK