Revert changeset 28011. This can break the build on some systems.
This commit was SVN r28017.
Этот коммит содержится в:
родитель
f05b7aa6d8
Коммит
82fb093955
@ -43,7 +43,6 @@ headers = \
|
||||
fd.c \
|
||||
if.h \
|
||||
keyval_parse.h \
|
||||
lt_interface.h \
|
||||
malloc.h \
|
||||
net.h \
|
||||
numtostr.h \
|
||||
@ -78,7 +77,6 @@ libopalutil_la_SOURCES = \
|
||||
if.c \
|
||||
keyval_parse.c \
|
||||
malloc.c \
|
||||
lt_interface.c \
|
||||
net.c \
|
||||
numtostr.c \
|
||||
opal_environ.c \
|
||||
|
@ -1,178 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
#include <stdio.h>
|
||||
#include "opal/constants.h"
|
||||
#include "opal/util/lt_interface.h"
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dlinit(void)
|
||||
{
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlinit();
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladdsearchdir(const char *search_dir) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dladdsearchdir(search_dir);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dlinsertsearchdir(const char *before,
|
||||
const char *search_dir) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlinsertsearchdir(before, search_dir);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dlsetsearchpath(const char *search_path) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlsetsearchpath(search_path);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC const char *opal_lt_dlgetsearchpath(void) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlgetsearchpath();
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return NULL;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
OPAL_DECLSPEC int opal_lt_dlforeachfile(const char *search_path,
|
||||
int (*func) (const char *filename, void *data),
|
||||
void *data) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlforeachfile(search_path, func, data);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dlexit(void) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlexit();
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC void *opal_lt_dlsym(opal_lt_dlhandle handle, const char *name) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlsym(handle, name);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return NULL;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC const char *opal_lt_dlerror(void) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlerror();
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return NULL;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_init(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_init(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_ext(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_ext(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
|
||||
}
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_global(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_global(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC opal_lt_dlhandle opal_lt_dlopenadvise(const char *filename, opal_lt_dladvise advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dlopenadvise(filename, advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return NULL;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_destroy(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_destroy(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_resident(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_resident(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_local(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_local(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_preload(opal_lt_dladvise *advise) {
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
return lt_dladvise_preload(advise);
|
||||
#else /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
}
|
||||
|
||||
/* Portable libltdl versions of the system dlopen() API. */
|
||||
OPAL_DECLSPEC opal_lt_dlhandle opal_lt_dlopen(const char *filename) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlopen(filename);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return NULL;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC opal_lt_dlhandle opal_lt_dlopenext(const char *filename) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlopenext(filename);
|
||||
#else /* OPAL_WANT_LIBLTDL */
|
||||
return 0;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
}
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dlclose(opal_lt_dlhandle handle) {
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
return lt_dlclose(handle);
|
||||
#else
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
#endif
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Wrappers to LTDL functions so that other parts of library can
|
||||
* access the LTDL functionality that is embedded/linked in to Open
|
||||
* MPI (vs. a LTDL library that was linked in by the application).
|
||||
* The OPAL-linked LTDL library is intentionally not DECLSPEC'ed so
|
||||
* that it is not visible to upper-layer applications; its functions
|
||||
* are provided to the rest of the OMPI code base via the following
|
||||
* OPAL wrappers.
|
||||
*/
|
||||
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
#ifndef __WINDOWS__
|
||||
#if OPAL_LIBLTDL_INTERNAL
|
||||
#include "opal/libltdl/ltdl.h"
|
||||
#else
|
||||
#include "ltdl.h"
|
||||
#endif
|
||||
#else
|
||||
#include "ltdl.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Create opal_lt_dlhandle and opal_lt_advise types so that consumers
|
||||
* of this code can use these opal types rather than the LTDL versions.
|
||||
* In that way, there is no need to use OPAL_WANT_LIBLTDL and
|
||||
* OPAL_HAVE_LTDL_ADVISE anywhere else.
|
||||
*/
|
||||
#if OPAL_WANT_LIBLTDL
|
||||
typedef lt_dlhandle opal_lt_dlhandle;
|
||||
#else
|
||||
typedef void *opal_lt_dlhandle;
|
||||
#endif /* OPAL_WANT_LIBLTDL */
|
||||
#if OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE
|
||||
typedef lt_dladvise opal_lt_dladvise;
|
||||
#else
|
||||
typedef void *opal_lt_dladvise;
|
||||
#endif /* OPAL_WANT_LIBLTDL && OPAL_HAVE_LTDL_ADVISE */
|
||||
|
||||
/**
|
||||
* Wrappers for the ltdl library.
|
||||
*/
|
||||
|
||||
OPAL_DECLSPEC int opal_lt_dlinit(void);
|
||||
OPAL_DECLSPEC int opal_lt_dlexit(void);
|
||||
|
||||
/* Module search path manipulation. */
|
||||
OPAL_DECLSPEC int opal_lt_dladdsearchdir(const char *search_dir);
|
||||
OPAL_DECLSPEC int opal_lt_dlinsertsearchdir(const char *before,
|
||||
const char *search_dir);
|
||||
OPAL_DECLSPEC int opal_lt_dlsetsearchpath(const char *search_path);
|
||||
OPAL_DECLSPEC const char *opal_lt_dlgetsearchpath(void);
|
||||
OPAL_DECLSPEC int opal_lt_dlforeachfile(const char *search_path,
|
||||
int (*func) (const char *filename, void *data),
|
||||
void *data);
|
||||
/* User module loading advisors. */
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_init(opal_lt_dladvise *advise);
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_destroy(opal_lt_dladvise *advise);
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_ext(opal_lt_dladvise *advise);
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_resident(opal_lt_dladvise *advise);
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_local(opal_lt_dladvise *advise);
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_global(opal_lt_dladvise *advise);
|
||||
OPAL_DECLSPEC int opal_lt_dladvise_preload(opal_lt_dladvise *advise);
|
||||
|
||||
/* Portable libltdl versions of the system dlopen() API. */
|
||||
OPAL_DECLSPEC opal_lt_dlhandle opal_lt_dlopen(const char *filename);
|
||||
OPAL_DECLSPEC opal_lt_dlhandle opal_lt_dlopenext(const char *filename);
|
||||
OPAL_DECLSPEC void *opal_lt_dlsym(opal_lt_dlhandle handle, const char *name);
|
||||
OPAL_DECLSPEC const char *opal_lt_dlerror(void);
|
||||
OPAL_DECLSPEC int opal_lt_dlclose(opal_lt_dlhandle handle);
|
||||
OPAL_DECLSPEC opal_lt_dlhandle opal_lt_dlopenadvise(const char *filename,
|
||||
opal_lt_dladvise advise);
|
Загрузка…
Ссылка в новой задаче
Block a user