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