From c475df98726955e00c1c281621829aeaf17d58b2 Mon Sep 17 00:00:00 2001 From: ericm Date: Thu, 21 Aug 2003 10:37:15 +0000 Subject: [PATCH] LiuKai's another Cygwin fix for data alignment, add #pragma --- lnet/include/lnet/types.h | 10 ++++++++++ lustre/portals/include/portals/types.h | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/lnet/include/lnet/types.h b/lnet/include/lnet/types.h index 0269290..e4ccebf 100644 --- a/lnet/include/lnet/types.h +++ b/lnet/include/lnet/types.h @@ -104,6 +104,13 @@ typedef enum { typedef unsigned PTL_SEQ_BASETYPE ptl_seq_t; #define PTL_SEQ_GT(a,b) (((signed PTL_SEQ_BASETYPE)((a) - (b))) > 0) +/* XXX + * cygwin need the pragma line, not clear if it's needed in other places. + * checking!!! + */ +#ifdef __CYGWIN__ +#pragma pack(push, 4) +#endif typedef struct { ptl_event_kind_t type; ptl_process_id_t initiator; @@ -116,6 +123,9 @@ typedef struct { struct timeval arrival_time; volatile ptl_seq_t sequence; } ptl_event_t; +#ifdef __CYGWIN__ +#pragma pop +#endif typedef enum { PTL_ACK_REQ, diff --git a/lustre/portals/include/portals/types.h b/lustre/portals/include/portals/types.h index 0269290..e4ccebf 100644 --- a/lustre/portals/include/portals/types.h +++ b/lustre/portals/include/portals/types.h @@ -104,6 +104,13 @@ typedef enum { typedef unsigned PTL_SEQ_BASETYPE ptl_seq_t; #define PTL_SEQ_GT(a,b) (((signed PTL_SEQ_BASETYPE)((a) - (b))) > 0) +/* XXX + * cygwin need the pragma line, not clear if it's needed in other places. + * checking!!! + */ +#ifdef __CYGWIN__ +#pragma pack(push, 4) +#endif typedef struct { ptl_event_kind_t type; ptl_process_id_t initiator; @@ -116,6 +123,9 @@ typedef struct { struct timeval arrival_time; volatile ptl_seq_t sequence; } ptl_event_t; +#ifdef __CYGWIN__ +#pragma pop +#endif typedef enum { PTL_ACK_REQ, -- 1.8.3.1