1
1

Fix a bunch of issues exposed by Ken Cain in getting Open MPI to work with

VxWorks.  Still some issues remaining, I'm sure.

Refs trac:1010

This commit was SVN r15320.

The following Trac tickets were found above:
  Ticket 1010 --> https://svn.open-mpi.org/trac/ompi/ticket/1010
Этот коммит содержится в:
Brian Barrett 2007-07-10 03:46:57 +00:00
родитель 1200fa4ac5
Коммит 1d02b9e7b5
22 изменённых файлов: 86 добавлений и 11 удалений

Просмотреть файл

@ -230,7 +230,7 @@ $ompi_cv_asm_endproc ${sym}gsym_test_func
if AC_TRY_EVAL(ompi_compile) ; then
# save the warnings
cat conftest.cmpl >&AC_FD_CC
ompi_link="$CC $CFLAGS conftest_c.$OBJEXT conftest.$OBJEXT -o conftest > conftest.link 2>&1"
ompi_link="$CC $CFLAGS conftest_c.$OBJEXT conftest.$OBJEXT -o conftest $LDFLAGS > conftest.link 2>&1"
if AC_TRY_EVAL(ompi_link) ; then
# save the warnings
cat conftest.link >&AC_FD_CC

Просмотреть файл

@ -33,7 +33,7 @@ EOF
if test "$CC" = "$CCAS" ; then
ompi_assemble="$CCAS $CCASFLAGS -c conftest.s >conftest.out 2>&1"
else
ompi_assemble="$CCAS $CCASFLAGS conftest.s >conftest.out 2>&1"
ompi_assemble="$CCAS $CCASFLAGS -o conftest.o conftest.s >conftest.out 2>&1"
fi
if AC_TRY_EVAL(ompi_assemble); then
# save the warnings

Просмотреть файл

@ -593,9 +593,10 @@ AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
sys/ioctl.h sys/mman.h sys/param.h sys/queue.h \
sys/resource.h sys/select.h sys/socket.h sys/sockio.h \
stdarg.h sys/stat.h sys/statvfs.h sys/time.h sys/tree.h \
sys/types.h sys/uio.h sys/utsname.h sys/wait.h syslog.h \
sys/types.h sys/uio.h net/uio.h sys/utsname.h sys/wait.h syslog.h \
time.h termios.h ulimit.h unistd.h util.h utmp.h malloc.h \
ifaddrs.h sys/sysctl.h crt_externs.h regex.h])
ifaddrs.h sys/sysctl.h crt_externs.h regex.h \
ioLib.h sockLib.h hostLib.h])
# Needed to work around Darwin requiring sys/socket.h for
# net/if.h
@ -733,7 +734,7 @@ OMPI_CHECK_FUNC_LIB([dirname], [gen])
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
OMPI_CHECK_FUNC_LIB([ceil], [m])
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty htonl ntohl htons ntohs getpwuid fork waitpid execve pipe ptsname setsid mmap mallopt tcgetpgrp posix_memalign strsignal sysconf syslog regcmp regexec regfree _NSGetEnviron])
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty htonl ntohl htons ntohs getpwuid fork waitpid execve pipe ptsname setsid mmap mallopt tcgetpgrp posix_memalign strsignal sysconf syslog regcmp regexec regfree _NSGetEnviron socketpair strncpy_s _strdup usleep])
#
# Make sure we can copy va_lists (need check declared, not linkable)

Просмотреть файл

@ -26,6 +26,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

Просмотреть файл

@ -30,6 +30,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
BEGIN_C_DECLS
/*

Просмотреть файл

@ -29,6 +29,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */

Просмотреть файл

@ -29,6 +29,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#include "btl_tcp.h"
#include "btl_tcp_hdr.h"

Просмотреть файл

@ -61,7 +61,13 @@
extern struct opal_event_list opal_signalqueue;
static sig_atomic_t opal_evsigcaught[NSIG];
#if defined(VXWORKS)
#define OPAL_NSIG (_NSIGS + 1)
#else
#define OPAL_NSIG NSIG
#endif
static sig_atomic_t opal_evsigcaught[OPAL_NSIG];
static int opal_needrecalc;
volatile sig_atomic_t opal_evsignal_caught = 0;
@ -106,8 +112,13 @@ opal_evsignal_init(sigset_t *evsigmask)
* pair to wake up our event loop. The event loop then scans for
* signals that got delivered.
*/
#ifdef HAVE_SOCKETPAIR
if (socketpair(AF_UNIX, SOCK_STREAM, 0, ev_signal_pair) == -1)
event_err(1, "%s: socketpair", __func__);
#else
if (socketpair(AF_UNIX, SOCK_STREAM, 0, ev_signal_pair) == -1)
event_err(1, "%s: pipe", __func__);
#endif
FD_CLOSEONEXEC(ev_signal_pair[0]);
FD_CLOSEONEXEC(ev_signal_pair[1]);

Просмотреть файл

@ -511,4 +511,27 @@ static inline uint16_t ntohs(uint16_t netvar) { return netvar; }
#endif
#endif
#ifdef MCS_VXWORKS
/* VXWorks puts some common functions in oddly named headers. Rather
than update all the places the functions are used, which would be a
maintenance disatster, just update here... */
#ifdef HAVE_IOLIB_H
/* pipe(), ioctl() */
#include <ioLib.h>
#endif
#ifdef HAVE_SOCKLIB_H
/* socket() */
#include <sockLib.h>
#endif
#ifdef HAVE_HOSTLIB_H
/* gethostname() */
#include <hostLib.h>
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
#endif
#endif
#endif /* OMPI_BUILDING */

Просмотреть файл

@ -143,13 +143,21 @@ char* opal_dirname(const char* filename)
}
if( p != filename ) {
char* ret = (char*)malloc( p - filename + 1 );
#ifdef HAVE_STRNCPY_S
strncpy_s( ret, (p - filename + 1), filename, p - filename );
#else
strncpy(ret, filename, p - filename);
#endif
ret[p - filename] = '\0';
return opal_make_filename_os_friendly(ret);
}
break; /* return the duplicate of "." */
}
}
#ifdef HAVE__STRDUP
return _strdup(".");
#else
return strdup(".");
#endif
#endif /* defined(HAVE_DIRNAME) */
}

Просмотреть файл

@ -74,7 +74,7 @@ char *opal_os_path(bool relative, ...)
total_length++;
}
if (total_length > MAXPATHLEN) { /* path length is too long - reject it */
if (total_length > OMPI_PATH_MAX) { /* path length is too long - reject it */
return(NULL);
}

Просмотреть файл

@ -535,7 +535,7 @@ static int open_file(int i)
/* Setup the filename and open flags */
if (NULL != output_dir) {
filename = (char *) malloc(MAXPATHLEN);
filename = (char *) malloc(OMPI_PATH_MAX);
if (NULL == filename) {
return OPAL_ERR_OUT_OF_RESOURCE;
}

Просмотреть файл

@ -146,7 +146,9 @@ static void opal_show_stackframe (int signo, siginfo_t * info, void * p)
case FPE_FLTOVF: si_code_str = "Floating point overflow"; break;
case FPE_FLTUND: si_code_str = "Floating point underflow"; break;
case FPE_FLTRES: si_code_str = "Floating point inexact result"; break;
#ifdef FBE_FLTINV
case FPE_FLTINV: si_code_str = "Invalid floating point operation"; break;
#endif
#ifdef FPE_FLTSUB
case FPE_FLTSUB: si_code_str = "Subscript out of range"; break;
#endif

Просмотреть файл

@ -62,7 +62,7 @@ int orte_dss_compare_int(int *value1, int *value2, orte_data_type_t type)
return ORTE_EQUAL;
}
int orte_dss_compare_uint(uint *value1, uint *value2, orte_data_type_t type)
int orte_dss_compare_uint(unsigned int *value1, unsigned int *value2, orte_data_type_t type)
{
if (*value1 > *value2) return ORTE_VALUE1_GREATER;

Просмотреть файл

@ -396,7 +396,7 @@ extern orte_data_type_t orte_dss_num_reg_types;
int orte_dss_compare_bool(bool *value1, bool *value2, orte_data_type_t type);
int orte_dss_compare_int(int *value1, int *value2, orte_data_type_t type);
int orte_dss_compare_uint(uint *value1, uint *value2, orte_data_type_t type);
int orte_dss_compare_uint(unsigned int *value1, unsigned int *value2, orte_data_type_t type);
int orte_dss_compare_size(size_t *value1, size_t *value2, orte_data_type_t type);

Просмотреть файл

@ -31,6 +31,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

Просмотреть файл

@ -53,6 +53,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif /* HAVE_SYS_UIO_H */
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif /* HAVE_NET_UIO_H */
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {

Просмотреть файл

@ -31,6 +31,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#include "opal/mca/mca.h"
#include "opal/threads/condition.h"

Просмотреть файл

@ -1193,7 +1193,7 @@ int mca_oob_tcp_init(void)
if(1 == mca_oob_tcp_component.connect_sleep) {
Sleep((orte_process_info.my_name->vpid % randval % 1000) * 100);
}
#else
#elif defined(HAVE_USLEEP)
if(1 == mca_oob_tcp_component.connect_sleep) {
usleep((orte_process_info.my_name->vpid % randval % 1000) * 1000);
}

Просмотреть файл

@ -31,6 +31,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

Просмотреть файл

@ -30,6 +30,9 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

Просмотреть файл

@ -32,6 +32,9 @@
/* for struct iovec */
#include <sys/uio.h>
#endif
#ifdef HAVE_NET_UIO_H
#include <net/uio.h>
#endif
#include "orte/orte_constants.h"
#include "orte/util/proc_info.h"