build_hurd
authorAlastair McKinstry <mckinstry@debian.org>
Mon, 28 May 2018 18:46:30 +0000 (19:46 +0100)
committerAlastair McKinstry <mckinstry@debian.org>
Mon, 28 May 2018 18:46:30 +0000 (19:46 +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/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var.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 5f5593c8273ac9e753d723ccab460bf7efb13e4e..5b8bcc14c31e7b4fe554e6b492e14af6f0357922 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 c6a640290d96b69899e9906dc934ce0d6ed9fc39..3d076d1fc9e49d51c2abe3e8aa62e159af270cf9 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 85b804e75aded5d8fa3dde8b893a569271966a50..247f30bcdd3a6f56c34690ff8b11fcd89f6c0aa0 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 bbc2e12365c3f974d84687217ed58a2456d76602..7520b534022b738703b97e40abcecfdeea803633 100644 (file)
 #include "src/util/output.h"
 #include "src/util/pmix_environ.h"
 
+#ifndef MAXPATHLEN /* Hurd */
+#define MAXPATHLEN 1024
+#endif
+
 /*
  * local variables
  */
index e9d8cdb1ee2fee05fdd8548664170237d6bbce71..1f9c41fc0f1d7272a6da77b7fe0b544de5dd3867 100644 (file)
@@ -584,8 +584,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 8d178a46cf92179a69bf6721e5c6d57b147feadd..5d7ae7e2cbae2eed28292a4d2a2afc2bc6c51c49 100644 (file)
@@ -996,7 +996,11 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata)
     orte_app_context_t *app;
     orte_proc_t *child=NULL;
     int rc=ORTE_SUCCESS;
-    char basedir[MAXPATHLEN];
+#if !defined(MAXPATHLEN) && defined(__GLIBC__)
+    char *basedir=NULL;
+#else
+  char basedir[MAXPATHLEN];
+#endif
     int j, idx;
     int total_num_local_procs = 0;
     orte_odls_launch_local_t *caddy = (orte_odls_launch_local_t*)cbdata;
@@ -1019,7 +1023,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))) {
@@ -1906,7 +1914,12 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child,
     int rc;
     orte_app_context_t *app;
     orte_job_t *jobdat;
-    char basedir[MAXPATHLEN];
+#if !defined(MAXPATHLEN) && defined(__GLIBC__)
+    char *basedir=NULL;
+    char *dir=NULL;
+#else
+  char basedir[MAXPATHLEN];
+#endif  
     char *wdir = NULL;
     orte_odls_spawn_caddy_t *cd;
     opal_event_base_t *evb;
@@ -1920,7 +1933,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 b5fad7ae3dd3cf0635d4a8c9330203379fc6a841..43a68085600f0a7e7a5969f075590f8ed4d429de 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