mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-13278 Fix ifdefs for U_ENABLE_DYLOAD for Windows and UWP.
X-SVN-Rev: 40281
This commit is contained in:
parent
aa6d5e3e76
commit
7c841c6bb2
1 changed files with 7 additions and 41 deletions
|
@ -2333,19 +2333,16 @@ u_getVersion(UVersionInfo versionArray) {
|
|||
* icucfg.h dependent code
|
||||
*/
|
||||
|
||||
#if U_ENABLE_DYLOAD
|
||||
|
||||
#if HAVE_DLOPEN && !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#if U_ENABLE_DYLOAD && HAVE_DLOPEN && !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
||||
#ifdef __MVS__
|
||||
#ifndef __SUSV3
|
||||
#define __SUSV3 1
|
||||
#endif
|
||||
#endif
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#endif /* HAVE_DLFCN_H */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
|
@ -2385,38 +2382,10 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
|||
return uret.fp;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif U_ENABLE_DYLOAD && U_PLATFORM_USES_ONLY_WIN32_API && !U_PLATFORM_HAS_WINUWP_API
|
||||
|
||||
/* null (nonexistent) implementation. */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
if(U_FAILURE(*status)) return NULL;
|
||||
*status = U_UNSUPPORTED_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
U_INTERNAL void U_EXPORT2
|
||||
uprv_dl_close(void *lib, UErrorCode *status) {
|
||||
if(U_FAILURE(*status)) return;
|
||||
*status = U_UNSUPPORTED_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
U_INTERNAL UVoidFunction* U_EXPORT2
|
||||
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
if(U_SUCCESS(*status)) {
|
||||
*status = U_UNSUPPORTED_ERROR;
|
||||
}
|
||||
return (UVoidFunction*)NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API
|
||||
/* Windows API implementation. */
|
||||
// Note: UWP does not expose/allow these APIs, so the UWP version gets the null implementation. */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
|
@ -2443,7 +2412,6 @@ uprv_dl_close(void *lib, UErrorCode *status) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
U_INTERNAL UVoidFunction* U_EXPORT2
|
||||
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
HMODULE handle = (HMODULE)lib;
|
||||
|
@ -2465,10 +2433,9 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
|||
return addr;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* No dynamic loading set. */
|
||||
/* No dynamic loading, null (nonexistent) implementation. */
|
||||
|
||||
U_INTERNAL void * U_EXPORT2
|
||||
uprv_dl_open(const char *libName, UErrorCode *status) {
|
||||
|
@ -2486,7 +2453,6 @@ uprv_dl_close(void *lib, UErrorCode *status) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
U_INTERNAL UVoidFunction* U_EXPORT2
|
||||
uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
(void)lib;
|
||||
|
@ -2497,7 +2463,7 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
|||
return (UVoidFunction*)NULL;
|
||||
}
|
||||
|
||||
#endif /* U_ENABLE_DYLOAD */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Hey, Emacs, please set the following:
|
||||
|
|
Loading…
Add table
Reference in a new issue