File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2506,7 +2506,7 @@ typedef struct kmp_depend_info {
25062506 union {
25072507 kmp_uint8 flag; // flag as an unsigned char
25082508 struct { // flag as a set of 8 bits
2509- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
2509+ #if defined( __BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
25102510 /* Same fields as in the #else branch, but in reverse order */
25112511 unsigned all : 1 ;
25122512 unsigned unused : 3 ;
@@ -2671,7 +2671,7 @@ typedef struct kmp_task_stack {
26712671#endif // BUILD_TIED_TASK_STACK
26722672
26732673typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */
2674- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
2674+ #if defined( __BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
26752675 /* Same fields as in the #else branch, but in reverse order */
26762676#if OMPX_TASKGRAPH
26772677 unsigned reserved31 : 6 ;
Original file line number Diff line number Diff line change @@ -120,7 +120,8 @@ extern void __kmp_validate_locks(void);
120120
121121struct kmp_base_tas_lock {
122122 // KMP_LOCK_FREE(tas) => unlocked; locked: (gtid+1) of owning thread
123- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __LP64__
123+ #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) && \
124+ __LP64__
124125 // Flip the ordering of the high and low 32-bit member to be consistent
125126 // with the memory layout of the address in 64-bit big-endian.
126127 kmp_int32 depth_locked; // depth locked, for nested locks only
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ typedef struct kmp_depend_info {
5050 union {
5151 kmp_uint8 flag ; // flag as an unsigned char
5252 struct { // flag as a set of 8 bits
53- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
53+ #if defined( __BYTE_ORDER__ ) && ( __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ )
5454 unsigned all : 1 ;
5555 unsigned unused : 3 ;
5656 unsigned set : 1 ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ typedef struct kmp_depend_info {
4747 union {
4848 kmp_uint8 flag ; // flag as an unsigned char
4949 struct { // flag as a set of 8 bits
50- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
50+ #if defined( __BYTE_ORDER__ ) && ( __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ )
5151 unsigned all : 1 ;
5252 unsigned unused : 3 ;
5353 unsigned set : 1 ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ typedef struct kmp_depend_info {
1717 union {
1818 unsigned char flag;
1919 struct {
20- #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
20+ #if defined( __BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
2121 unsigned all : 1 ;
2222 unsigned unused : 3 ;
2323 unsigned set : 1 ;
You can’t perform that action at this time.
0 commit comments