build_hurd
authorAlastair McKinstry <mckinstry@debian.org>
Sun, 15 Jan 2017 11:08:14 +0000 (11:08 +0000)
committerAlastair McKinstry <mckinstry@debian.org>
Sun, 15 Jan 2017 11:08:14 +0000 (11:08 +0000)
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/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c
opal/mca/pmix/pmix3x/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 27dc589ee0aa199e69e5ad02b1862213470c0865..c6e0f84bd3ea333227955b628cd62ecc10b6d61a 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 fbf69489ff8c6ae36a0af383baaab4d73fc5dfdd..57e9031ee785c19f747356c3b857422d9c651896 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 bace834e03b127dc5f56a0cb9128f382e9e20f11..fd4212aeaeef88e4f57e5f747322a1b8027fc067 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 a1bb74ebe6cfcf8019b806af3d707eb43042b8b6..90f4de522e1adbdadc6a9d4dc1ccd704dadaccaa 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 981511ee5a5004cbb1fd75b9ad4b8745b9fe66f2..c08eebf7b9835f8232586d87f5f274e034986688 100644 (file)
@@ -339,7 +339,7 @@ static int component_find_check (pmix_mca_base_framework_t *framework, char **re
         }
 
         if (!found) {
-            char h[MAXHOSTNAMELEN];
+            char h[PMIX_MAXHOSTNAMELEN];
             gethostname(h, sizeof(h));
             pmix_show_help("help-mca-base.txt",
                            "find-available:not-valid", true,
index 4e0b568b1fcc058f11cd3a724562f69a85099f91..110b49959d65acccddefdb4143cc988175086f3a 100644 (file)
@@ -420,8 +420,12 @@ int pmix_mca_base_var_cache_files(bool rel_path_search)
     home = (char*)pmix_home_directory();
 
     if(NULL == cwd) {
+#if !defined(MAXPATHLEN) && defined (__GLIBC__)
+        if( NULL == (cwd = get_current_dir_name() )) {
+#else
         cwd = (char *) malloc(sizeof(char) * MAXPATHLEN);
         if( NULL == (cwd = getcwd(cwd, MAXPATHLEN) )) {
+#endif            
             pmix_output(0, "Error: Unable to get the current working directory\n");
             cwd = strdup(".");
         }
index d05275032b7c50bf383a70ce2f2e673149e1813d..bd4eb8754d1fbcf9817ceef6a0d8254b74b7e1ec 100644 (file)
@@ -436,8 +436,12 @@ int opal_util_register_stackhandlers (void)
     }
 
     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 5e6704964ea21ac8db7766a9d97481283eaef363..b6cbafd57bc7b4715d9db197434bb30425c4457c 100644 (file)
@@ -641,7 +641,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;
@@ -655,7 +660,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))) {
@@ -1662,8 +1671,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),
@@ -1673,7 +1687,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