Whamcloud - gitweb
LiuKai's another Cygwin fix for data alignment, add #pragma
authorericm <ericm>
Thu, 21 Aug 2003 10:37:15 +0000 (10:37 +0000)
committerericm <ericm>
Thu, 21 Aug 2003 10:37:15 +0000 (10:37 +0000)
lnet/include/lnet/types.h
lustre/portals/include/portals/types.h

index 0269290..e4ccebf 100644 (file)
@@ -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,
index 0269290..e4ccebf 100644 (file)
@@ -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,