From: Alastair McKinstry Date: Sun, 15 Jan 2017 11:08:14 +0000 (+0000) Subject: build_hurd X-Git-Tag: archive/raspbian/2.1.1-7+rpi1~1^2^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=20817a938b2068381db423418678154669b75b5b;p=openmpi.git build_hurd Gbp-Pq: Name build_hurd --- diff --git a/ompi/include/ompi_config.h b/ompi/include/ompi_config.h index a7a2c1fa..2428ddea 100644 --- a/ompi/include/ompi_config.h +++ b/ompi/include/ompi_config.h @@ -28,6 +28,10 @@ #include "opal_config.h" +#ifndef PATH_MAX /* Hurd */ +#define PATH_MAX 65535 +#endif + #define OMPI_IDENT_STRING OPAL_IDENT_STRING /*********************************************************************** diff --git a/ompi/mca/fbtl/posix/fbtl_posix_preadv.c b/ompi/mca/fbtl/posix/fbtl_posix_preadv.c index 27dc589e..c6e0f84b 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_preadv.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_preadv.c @@ -28,6 +28,10 @@ #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;*/ diff --git a/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c b/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c index fbf69489..57e9031e 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c @@ -30,6 +30,10 @@ #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;*/ diff --git a/opal/mca/base/mca_base_var.c b/opal/mca/base/mca_base_var.c index bace834e..fd4212ae 100644 --- a/opal/mca/base/mca_base_var.c +++ b/opal/mca/base/mca_base_var.c @@ -50,6 +50,14 @@ #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 */ diff --git a/opal/mca/memory/patcher/memory_patcher_component.c b/opal/mca/memory/patcher/memory_patcher_component.c index a1bb74eb..90f4de52 100644 --- a/opal/mca/memory/patcher/memory_patcher_component.c +++ b/opal/mca/memory/patcher/memory_patcher_component.c @@ -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); diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c b/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c index 981511ee..c08eebf7 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c +++ b/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c @@ -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, diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c b/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c index 4e0b568b..110b4995 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c +++ b/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c @@ -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("."); } diff --git a/opal/util/stacktrace.c b/opal/util/stacktrace.c index d0527503..bd4eb875 100644 --- a/opal/util/stacktrace.c +++ b/opal/util/stacktrace.c @@ -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 diff --git a/orte/include/orte_config.h b/orte/include/orte_config.h index 9c951b7f..6ec28d08 100644 --- a/orte/include/orte_config.h +++ b/orte/include/orte_config.h @@ -26,6 +26,13 @@ #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 diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 5e670496..b6cbafd5 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -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))) { diff --git a/test/util/opal_path_nfs.c b/test/util/opal_path_nfs.c index e2405bde..23ed1511 100644 --- a/test/util/opal_path_nfs.c +++ b/test/util/opal_path_nfs.c @@ -31,8 +31,10 @@ #include #include +#ifdef HAVE_SYS_MOUNT_H #include -#ifdef HAVE_SYS_STATFS_H +#endif +#if defined(__linux__) /* not present on Hurd */ #include #endif #ifdef HAVE_SYS_VFS_H