Index: openmp/trunk/runtime/cmake/Definitions.cmake =================================================================== --- openmp/trunk/runtime/cmake/Definitions.cmake +++ openmp/trunk/runtime/cmake/Definitions.cmake @@ -84,7 +84,7 @@ ################################## # Other conditional definitions append_definitions("-D KMP_USE_ASSERT") - append_definitions("-D GUIDEDLL_EXPORTS") + append_definitions("-D KMP_DYNAMIC_LIB") if(${STUBS_LIBRARY}) append_definitions("-D KMP_STUB") endif() Index: openmp/trunk/runtime/src/kmp_ftn_cdecl.c =================================================================== --- openmp/trunk/runtime/src/kmp_ftn_cdecl.c +++ openmp/trunk/runtime/src/kmp_ftn_cdecl.c @@ -16,7 +16,7 @@ #include "kmp.h" #if KMP_OS_WINDOWS -# if defined KMP_WIN_CDECL || !defined GUIDEDLL_EXPORTS +# if defined KMP_WIN_CDECL || !defined KMP_DYNAMIC_LIB # define KMP_FTN_ENTRIES KMP_FTN_UPPER # endif #elif KMP_OS_UNIX Index: openmp/trunk/runtime/src/kmp_runtime.c =================================================================== --- openmp/trunk/runtime/src/kmp_runtime.c +++ openmp/trunk/runtime/src/kmp_runtime.c @@ -557,7 +557,7 @@ /* ------------------------------------------------------------------------ */ -#ifdef GUIDEDLL_EXPORTS +#ifdef KMP_DYNAMIC_LIB # if KMP_OS_WINDOWS @@ -681,7 +681,7 @@ } # endif /* KMP_OS_WINDOWS */ -#endif /* GUIDEDLL_EXPORTS */ +#endif /* KMP_DYNAMIC_LIB */ /* ------------------------------------------------------------------------ */ @@ -3507,7 +3507,7 @@ if(nNeed > nWish) /* normalize the arguments */ nWish = nNeed; -#if KMP_OS_WINDOWS && !defined GUIDEDLL_EXPORTS +#if KMP_OS_WINDOWS && !defined KMP_DYNAMIC_LIB /* only for Windows static library */ /* reclaim array entries for root threads that are already dead */ added = __kmp_reclaim_dead_roots(); @@ -5611,7 +5611,7 @@ __kmp_internal_end_thread( gtid ); } -#if KMP_OS_UNIX && GUIDEDLL_EXPORTS +#if KMP_OS_UNIX && KMP_DYNAMIC_LIB // 2009-09-08 (lev): It looks the destructor does not work. In simple test cases destructors work // perfectly, but in real libiomp5.so I have no evidence it is ever called. However, -fini linker @@ -6072,7 +6072,7 @@ return; } } - #if defined GUIDEDLL_EXPORTS + #if defined KMP_DYNAMIC_LIB // AC: lets not shutdown the Linux* OS dynamic library at the exit of uber thread, // because we will better shutdown later in the library destructor. // The reason of this change is performance problem when non-openmp thread @@ -6519,7 +6519,7 @@ __kmp_register_atfork(); #endif - #if ! defined GUIDEDLL_EXPORTS + #if ! defined KMP_DYNAMIC_LIB { /* Invoke the exit handler when the program finishes, only for static library. For dynamic library, we already have _fini and DllMain. Index: openmp/trunk/runtime/src/kmp_version.c =================================================================== --- openmp/trunk/runtime/src/kmp_version.c +++ openmp/trunk/runtime/src/kmp_version.c @@ -69,7 +69,7 @@ #endif // KMP_LIB_TYPE // Detect link type (static, dynamic). -#ifdef GUIDEDLL_EXPORTS +#ifdef KMP_DYNAMIC_LIB #define KMP_LINK_TYPE "dynamic" #else #define KMP_LINK_TYPE "static" Index: openmp/trunk/runtime/src/makefile.mk =================================================================== --- openmp/trunk/runtime/src/makefile.mk +++ openmp/trunk/runtime/src/makefile.mk @@ -513,7 +513,7 @@ cpp-flags += -D KMP_WIN_CDECL endif ifeq "$(LINK_TYPE)" "dyna" - cpp-flags += -D GUIDEDLL_EXPORTS + cpp-flags += -D KMP_DYNAMIC_LIB endif ifeq "$(LIB_TYPE)" "stub" cpp-flags += -D KMP_STUB Index: openmp/trunk/runtime/src/z_Windows_NT_util.c =================================================================== --- openmp/trunk/runtime/src/z_Windows_NT_util.c +++ openmp/trunk/runtime/src/z_Windows_NT_util.c @@ -835,7 +835,7 @@ return; }; -#if GUIDEDLL_EXPORTS +#if KMP_DYNAMIC_LIB /* Pin dynamic library for the lifetime of application */ { // First, turn off error message boxes @@ -863,7 +863,7 @@ #endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */ /* Set up minimum number of threads to switch to TLS gtid */ - #if KMP_OS_WINDOWS && ! defined GUIDEDLL_EXPORTS + #if KMP_OS_WINDOWS && ! defined KMP_DYNAMIC_LIB // Windows* OS, static library. /* New thread may use stack space previously used by another thread, currently terminated.