build_hurd
authorAlastair McKinstry <mckinstry@debian.org>
Wed, 27 Sep 2017 12:33:11 +0000 (13:33 +0100)
committerAlastair McKinstry <mckinstry@debian.org>
Wed, 27 Sep 2017 12:33:11 +0000 (13:33 +0100)
Gbp-Pq: Name build_hurd

ompi/include/ompi_config.h
ompi/mca/fbtl/posix/fbtl_posix_preadv.c
ompi/mca/fbtl/posix/fbtl_posix_pwritev.c
opal/mca/base/mca_base_var.c
opal/mca/memory/patcher/memory_patcher_component.c
opal/util/stacktrace.c
orte/include/orte_config.h
orte/mca/odls/base/odls_base_default_fns.c
test/util/opal_path_nfs.c

index a7a2c1fa0850d15b10e716c270dda843cf3c12a7..2428ddeabc0cb1b67d0c599f206d48c1cfc4a74b 100644 (file)
 
 #include "opal_config.h"
 
+#ifndef PATH_MAX /* Hurd */
+#define PATH_MAX 65535
+#endif
+
 #define OMPI_IDENT_STRING OPAL_IDENT_STRING
 
 /***********************************************************************
index ceb8b1d984cf70c20d5d93f79648ceac539ef677..20809611ffab3512c40102456af1fbc2cf6651cd 100644 (file)
 #include "ompi/constants.h"
 #include "ompi/mca/fbtl/fbtl.h"
 
+#ifndef IOV_MAX
+#define IOV_MAX 1024
+#endif
+
 ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh )
 {
     /*int *fp = NULL;*/
index 5208716d111a6dd2f89cdc46672b0553229be170..68a3e8252bf1f0a2a1dcc4f4ed6c7e69c7a9c1fe 100644 (file)
 #include "ompi/constants.h"
 #include "ompi/mca/fbtl/fbtl.h"
 
+#ifndef IOV_MAX
+#define IOV_MAX 1024
+#endif
+
 ssize_t  mca_fbtl_posix_pwritev(mca_io_ompio_file_t *fh )
 {
     /*int *fp = NULL;*/
index 5a5c4f915ca5be0a0c0b2752d9bb1c22205371d5..3ce603db75aee4bf6769f74211487b059ce313f3 100644 (file)
 #include "opal/util/opal_environ.h"
 #include "opal/runtime/opal.h"
 
+#ifndef MAXPATHLEN /* Hurd */
+#define MAXPATHLEN 65535
+#endif
+
+#ifndef PATH_MAX  /* Hurd */
+#define PATH_MAX 65535
+#endif
+
 /*
  * local variables
  */
index c49cb8ce51cccedc1867ca366e74b687634521d0..72b70fcf60ad032219d0b79f8ca8cfb8398ef622 100644 (file)
@@ -152,6 +152,7 @@ static void *intercept_mmap(void *start, size_t length, int prot, int flags, int
 
 #endif
 
+#if defined (SYS_munmap)
 static int (*original_munmap) (void *, size_t);
 
 static int _intercept_munmap(void *start, size_t length)
@@ -177,6 +178,7 @@ static int intercept_munmap(void *start, size_t length)
     OPAL_PATCHER_END;
     return result;
 }
+#endif
 
 #if defined (SYS_mremap)
 
@@ -484,10 +486,12 @@ static int patcher_open (void)
     }
 #endif
 
+#if defined(SYS_munmap)
     rc = opal_patcher->patch_symbol ("munmap", (uintptr_t)intercept_munmap, (uintptr_t *) &original_munmap);
     if (OPAL_SUCCESS != rc) {
         return rc;
     }
+#endif
 
 #if defined (SYS_mremap)
     rc = opal_patcher->patch_symbol ("mremap",(uintptr_t)intercept_mremap, (uintptr_t *) &original_mremap);
index 58f3c924b42f391ceb4aa07d2ce4c28dd7e5e326..9f9e71d123266535aa8d002ba04bcfcded50dcea 100644 (file)
@@ -579,8 +579,12 @@ int opal_util_register_stackhandlers (void)
 
     /* Setup the signals to catch */
     memset(&act, 0, sizeof(act));
+#ifdef SA_SIGINFO
     act.sa_sigaction = show_stackframe;
     act.sa_flags = SA_SIGINFO;
+#else
+    act.sa_handler = show_stackframe_handler;
+#endif
 #ifdef SA_ONESHOT
     act.sa_flags |= SA_ONESHOT;
 #else
index 9c951b7f800dae7d3f18221518871667a9774d29..6ec28d08cd82ed539f9f2cda5056dd8d1a070827 100644 (file)
 
 #include "opal_config.h"
 
+#ifndef PATH_MAX /* Hurd */
+#define PATH_MAX 65535
+#endif
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 65535
+#endif
+
 #define ORTE_IDENT_STRING OPAL_IDENT_STRING
 
 #  if OPAL_C_HAVE_VISIBILITY
index 5c05d80b737ff108b775063a8a1a8bbc0d7890c9..bdcbeab5334d6ae0435ee8e89aa8ae862182f8b7 100644 (file)
@@ -629,7 +629,12 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata)
     orte_proc_t *child=NULL;
     int rc=ORTE_SUCCESS;
     orte_std_cntr_t proc_rank;
+
+#if !defined(MAXPATHLEN) && defined(__GLIBC__)
+    char *basedir=NULL;
+#else
     char basedir[MAXPATHLEN];
+#endif  
     char **argvsav=NULL;
     int inm, j, idx;
     int total_num_local_procs = 0;
@@ -643,7 +648,11 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata)
      * bouncing around as we execute various apps, but we will always return
      * to this place as our default directory
      */
+#if !defined(MAXPATHLEN) && defined(__GLIBC__)
+    basedir = get_current_dir_name();
+#else
     getcwd(basedir, sizeof(basedir));
+#endif
 
     /* find the jobdat for this job */
     if (NULL == (jobdat = orte_get_job_data_object(job))) {
@@ -1652,8 +1661,13 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child,
     int rc;
     orte_app_context_t *app;
     orte_job_t *jobdat;
+#if !defined(MAXPATHLEN) && defined(__GLIBC__)
+    char *basedir=NULL;
+    char *dir=NULL;
+#else
     char basedir[MAXPATHLEN];
-
+#endif
+    
     OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output,
                          "%s odls:restart_proc for proc %s",
                          ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
@@ -1663,7 +1677,11 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child,
      * bouncing around as we execute this app, but we will always return
      * to this place as our default directory
      */
+#if !defined(MAXPATHLEN) && defined(__GLIBC__)
+    basedir = get_current_dir_name();
+#else
     getcwd(basedir, sizeof(basedir));
+#endif
 
     /* find this child's jobdat */
     if (NULL == (jobdat = orte_get_job_data_object(child->name.jobid))) {
index e2405bdefe4b10f07505666d940ae8f90aceb56a..23ed15111a24abe5041d12a7f52d6e3499cb532b 100644 (file)
 #include <dirent.h>
 
 #include <sys/param.h>
+#ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
-#ifdef HAVE_SYS_STATFS_H
+#endif
+#if defined(__linux__) /* not present on Hurd */
 #include <sys/statfs.h>
 #endif
 #ifdef HAVE_SYS_VFS_H