darwin: do not use _XOPEN_SOURCE 35/5035/3
authorMatthias Diener <mdiener@illinois.edu>
Thu, 21 Mar 2019 19:53:05 +0000 (14:53 -0500)
committerMatthias Diener <mdiener@illinois.edu>
Thu, 21 Mar 2019 19:57:23 +0000 (14:57 -0500)
_XOPEN_SOURCE was only used to support context
threads on Darwin but defining it causes compilation
problems with other libraries.

Change-Id: I921264f40ea0f228991d9cfe9166169a36d083d3

src/arch/mpi-darwin-x86_64/conv-mach.h
src/arch/multicore-darwin-x86_64/conv-mach.h
src/arch/netlrts-darwin-x86_64/conv-mach.h
src/conv-core/threads.c

index d2e7ea1ada8105c2ba6366379a5daae0b20966f0..9d4c16870bce89898325553ac81b93ce1e151dad 100644 (file)
@@ -1,11 +1,8 @@
 #ifndef _CONV_MACH_H
 #define _CONV_MACH_H
 
-// specify the version of the UNIX APIs that we want to use (for ucontext headers)
-#define _XOPEN_SOURCE                                       
-
 #define CMK_AMD64                                          1
-#define CMK_64BIT    1
+#define CMK_64BIT                                          1
 #define CMK_CONVERSE_MPI                                   1
 
 #define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
 #define CMK_TIMER_USE_TIMES                                0
 
 
-#define CMK_DEBUG_MODE                                    
+#define CMK_DEBUG_MODE                                     0
 #define CMK_WEB_MODE                                       1
 
-#define CMK_LBDB_ON                                       1
+#define CMK_LBDB_ON                                        1
 
-#undef CMK_STACKSIZE_DEFAULT                            
-#define CMK_STACKSIZE_DEFAULT                             262144
+#undef CMK_STACKSIZE_DEFAULT
+#define CMK_STACKSIZE_DEFAULT                              262144
 
-//#define CMK_NO_ISO_MALLOC                               1
+//#define CMK_NO_ISO_MALLOC                                1
 
 #define CMK_WHEN_PROCESSOR_IDLE_BUSYWAIT                   1
 #define CMK_WHEN_PROCESSOR_IDLE_USLEEP                     0
index a1f0be15b206e70c2e4676bedd268fafb7d58213..0ec337ea9509e556a16a4dec99aa59c536f2ffd2 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef _CONV_MACH_H
 #define _CONV_MACH_H
 
-// specify the version of the UNIX APIs that we want to use (for ucontext headers)
-#define _XOPEN_SOURCE
-
 #define CMK_SMP                                            1
 #define CMK_MULTICORE                                      1
 
index 2243a99d276e57fe7d9318f5064f3631008f90cd..a3de771718423f8f0609fbf70133ec4d81e20f8b 100644 (file)
@@ -1,10 +1,7 @@
 #ifndef _CONV_MACH_H
 #define _CONV_MACH_H
 
-// specify the version of the UNIX APIs that we want to use (for ucontext headers)
-#define _XOPEN_SOURCE                                       
-
-#define CMK_64BIT    1
+#define CMK_64BIT                                          1
 
 #define CMK_NETPOLL                                        1
 
 #define CMK_TIMER_USE_TIMES                                0
 
 
-#define CMK_DEBUG_MODE                                    
+#define CMK_DEBUG_MODE                                     0
 #define CMK_WEB_MODE                                       1
 
-#define CMK_LBDB_ON                                       1
+#define CMK_LBDB_ON                                        1
 
-#define CMK_STACKSIZE_DEFAULT                             262144
+#define CMK_STACKSIZE_DEFAULT                              262144
 /*
-#define CMK_NO_ISO_MALLOC                                 1
+#define CMK_NO_ISO_MALLOC                                  1
 */
 
 
index 08765baf55318deec1be93db257bf59e3e4228b3..2aac77c282154a8730679f9783c22cf44ddd1228 100644 (file)
@@ -1610,7 +1610,12 @@ Gengbin Zheng October, 2007
 
 #if CMK_THREADS_USE_CONTEXT
 /* system builtin context routines: */
+
+#if defined(__APPLE__)
+#include <sys/ucontext.h>
+#else
 #include <ucontext.h>
+#endif
 
 typedef ucontext_t uJcontext_t;
 typedef void (*uJcontext_fn_t)(void);