diff --git a/dtool/src/dtoolbase/addHash.h b/dtool/src/dtoolbase/addHash.h index 11fabf77ce..675f9c3f49 100644 --- a/dtool/src/dtoolbase/addHash.h +++ b/dtool/src/dtoolbase/addHash.h @@ -23,7 +23,7 @@ * of static functions, which are used to wrap calls to Bob Jenkins' public- * domain hash generation function (defined in lookup3.c). */ -class EXPCL_DTOOL AddHash { +class EXPCL_DTOOL_DTOOLBASE AddHash { public: INLINE static size_t add_hash(size_t start, const uint32_t *words, size_t num_words); static size_t add_hash(size_t start, const uint8_t *bytes, size_t num_bytes); diff --git a/dtool/src/dtoolbase/atomicAdjustDummyImpl.h b/dtool/src/dtoolbase/atomicAdjustDummyImpl.h index b6e530f395..120fbe195a 100644 --- a/dtool/src/dtoolbase/atomicAdjustDummyImpl.h +++ b/dtool/src/dtoolbase/atomicAdjustDummyImpl.h @@ -24,7 +24,7 @@ * require multiprogramming, and therefore don't require special atomic * operations. */ -class EXPCL_DTOOL AtomicAdjustDummyImpl { +class EXPCL_DTOOL_DTOOLBASE AtomicAdjustDummyImpl { public: typedef long Integer; typedef void *Pointer; diff --git a/dtool/src/dtoolbase/atomicAdjustGccImpl.h b/dtool/src/dtoolbase/atomicAdjustGccImpl.h index 1012a52721..7ae44037ff 100644 --- a/dtool/src/dtoolbase/atomicAdjustGccImpl.h +++ b/dtool/src/dtoolbase/atomicAdjustGccImpl.h @@ -22,7 +22,7 @@ /** * Uses GCC built-ins to implement atomic adjustments. */ -class EXPCL_DTOOL AtomicAdjustGccImpl { +class EXPCL_DTOOL_DTOOLBASE AtomicAdjustGccImpl { public: #if __GCC_ATOMIC_LONG_LOCK_FREE >= __GCC_ATOMIC_INT_LOCK_FREE // If the long can be more lock-free than int, use it instead. diff --git a/dtool/src/dtoolbase/atomicAdjustI386Impl.h b/dtool/src/dtoolbase/atomicAdjustI386Impl.h index 3084a7172b..eac5ce6a97 100644 --- a/dtool/src/dtoolbase/atomicAdjustI386Impl.h +++ b/dtool/src/dtoolbase/atomicAdjustI386Impl.h @@ -26,7 +26,7 @@ * Although this class is named i386, it actually uses instructions that are * specific to 486 and higher. */ -class EXPCL_DTOOL AtomicAdjustI386Impl { +class EXPCL_DTOOL_DTOOLBASE AtomicAdjustI386Impl { public: typedef ALIGN_4BYTE int32_t Integer; typedef void *UnalignedPointer; diff --git a/dtool/src/dtoolbase/atomicAdjustPosixImpl.h b/dtool/src/dtoolbase/atomicAdjustPosixImpl.h index ff5a55fb60..3b98499129 100644 --- a/dtool/src/dtoolbase/atomicAdjustPosixImpl.h +++ b/dtool/src/dtoolbase/atomicAdjustPosixImpl.h @@ -26,7 +26,7 @@ /** * Uses POSIX to implement atomic adjustments. */ -class EXPCL_DTOOL AtomicAdjustPosixImpl { +class EXPCL_DTOOL_DTOOLBASE AtomicAdjustPosixImpl { public: // In Posix, "long" is generally the native word size (32- or 64-bit), which // is what we'd prefer. diff --git a/dtool/src/dtoolbase/atomicAdjustWin32Impl.h b/dtool/src/dtoolbase/atomicAdjustWin32Impl.h index e249ce6448..6f64d2a781 100644 --- a/dtool/src/dtoolbase/atomicAdjustWin32Impl.h +++ b/dtool/src/dtoolbase/atomicAdjustWin32Impl.h @@ -29,7 +29,7 @@ /** * Uses Windows native calls to implement atomic adjustments. */ -class EXPCL_DTOOL AtomicAdjustWin32Impl { +class EXPCL_DTOOL_DTOOLBASE AtomicAdjustWin32Impl { public: #ifdef _WIN64 // For 64-bit builds, we'd prefer to use a 64-bit integer. diff --git a/dtool/src/dtoolbase/deletedBufferChain.h b/dtool/src/dtoolbase/deletedBufferChain.h index 8f82c1abbc..10ac5847fd 100644 --- a/dtool/src/dtoolbase/deletedBufferChain.h +++ b/dtool/src/dtoolbase/deletedBufferChain.h @@ -55,7 +55,7 @@ enum DeletedChainFlag { * * Use MemoryHook to get a new DeletedBufferChain of a particular size. */ -class EXPCL_DTOOL DeletedBufferChain { +class EXPCL_DTOOL_DTOOLBASE DeletedBufferChain { protected: DeletedBufferChain(size_t buffer_size); diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index dee66e04da..6777ce5611 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -282,8 +282,8 @@ class ReferenceCount; // We need a pointer to a global MemoryHook object, to manage all malloc and // free requests from Panda. See the comments in MemoryHook itself. class MemoryHook; -EXPCL_DTOOL extern MemoryHook *memory_hook; -EXPCL_DTOOL void init_memory_hook(); +EXPCL_DTOOL_DTOOLBASE extern MemoryHook *memory_hook; +EXPCL_DTOOL_DTOOLBASE void init_memory_hook(); // Now redefine some handy macros to hook into the above MemoryHook object. #ifndef USE_MEMORY_NOWRAPPERS @@ -303,8 +303,8 @@ EXPCL_DTOOL void init_memory_hook(); #if defined(HAVE_THREADS) && defined(SIMPLE_THREADS) // We need another forward-reference function to allow low-level code to // cooperatively yield the timeslice, in SIMPLE_THREADS mode. -extern EXPCL_DTOOL void (*global_thread_yield)(); -extern EXPCL_DTOOL void (*global_thread_consider_yield)(); +extern EXPCL_DTOOL_DTOOLBASE void (*global_thread_yield)(); +extern EXPCL_DTOOL_DTOOLBASE void (*global_thread_consider_yield)(); INLINE void thread_yield() { (*global_thread_yield)(); @@ -324,8 +324,8 @@ INLINE void thread_consider_yield() { #if defined(USE_TAU) && defined(WIN32) // Hack around tau's lack of DLL export declarations for Profiler class. -extern EXPCL_DTOOL bool __tau_shutdown; -class EXPCL_DTOOL TauProfile { +extern EXPCL_DTOOL_DTOOLBASE bool __tau_shutdown; +class EXPCL_DTOOL_DTOOLBASE TauProfile { public: TauProfile(void *&tautimer, char *name, char *type, int group, char *group_name) { Tau_profile_c_timer(&tautimer, name, type, group, group_name); diff --git a/dtool/src/dtoolbase/dtoolsymbols.h b/dtool/src/dtoolbase/dtoolsymbols.h index 892e1a9fff..61d49463f2 100644 --- a/dtool/src/dtoolbase/dtoolsymbols.h +++ b/dtool/src/dtoolbase/dtoolsymbols.h @@ -99,6 +99,11 @@ #define EXPTP_MISC IMPORT_TEMPL #endif /* BUILDING_MISC */ + +#define EXPCL_DTOOL_DTOOLBASE EXPCL_DTOOL +#define EXPTP_DTOOL_DTOOLBASE EXPTP_DTOOL + + /* These two are always defined empty, because pystub is statically built. But we leave the symbol around in case we change our minds to make pystub once again be a dynamic library. */ diff --git a/dtool/src/dtoolbase/indent.h b/dtool/src/dtoolbase/indent.h index e7b6cf3c48..93badf5e7d 100644 --- a/dtool/src/dtoolbase/indent.h +++ b/dtool/src/dtoolbase/indent.h @@ -22,7 +22,7 @@ * stream itself. Useful for indenting a series of lines of text by a given * amount. */ -EXPCL_DTOOL ostream & +EXPCL_DTOOL_DTOOLBASE ostream & indent(ostream &out, int indent_level); /** diff --git a/dtool/src/dtoolbase/lookup3.h b/dtool/src/dtoolbase/lookup3.h index d33fbe8305..4c59124ac5 100644 --- a/dtool/src/dtoolbase/lookup3.h +++ b/dtool/src/dtoolbase/lookup3.h @@ -21,7 +21,7 @@ extern "C" { #endif -EXPCL_DTOOL uint32_t hashword(const uint32_t *k, /* the key, an array of uint32_t values */ +EXPCL_DTOOL_DTOOLBASE uint32_t hashword(const uint32_t *k, /* the key, an array of uint32_t values */ size_t length, /* the length of the key, in uint32_ts */ uint32_t initval); diff --git a/dtool/src/dtoolbase/memoryBase.h b/dtool/src/dtoolbase/memoryBase.h index 6d755e695b..b6545ff66e 100644 --- a/dtool/src/dtoolbase/memoryBase.h +++ b/dtool/src/dtoolbase/memoryBase.h @@ -66,7 +66,7 @@ * that seems to cause problems when including header files for C++-based * system libraries (such as are found on OSX). */ -class EXPCL_DTOOL MemoryBase { +class EXPCL_DTOOL_DTOOLBASE MemoryBase { public: ALLOC_MEMORY_BASE; }; diff --git a/dtool/src/dtoolbase/memoryHook.h b/dtool/src/dtoolbase/memoryHook.h index 18ce70c0bb..9472983d75 100644 --- a/dtool/src/dtoolbase/memoryHook.h +++ b/dtool/src/dtoolbase/memoryHook.h @@ -34,7 +34,7 @@ class DeletedBufferChain; * employed for classes which inherit from MemoryBase; otherwise, use the * PANDA_MALLOC macros.) */ -class EXPCL_DTOOL MemoryHook { +class EXPCL_DTOOL_DTOOLBASE MemoryHook { public: MemoryHook(); MemoryHook(const MemoryHook ©); diff --git a/dtool/src/dtoolbase/mutexDummyImpl.h b/dtool/src/dtoolbase/mutexDummyImpl.h index d88eaed1aa..772f3f8201 100644 --- a/dtool/src/dtoolbase/mutexDummyImpl.h +++ b/dtool/src/dtoolbase/mutexDummyImpl.h @@ -21,7 +21,7 @@ * A fake mutex implementation for single-threaded applications that don't * need any synchronization control. This does nothing at all. */ -class EXPCL_DTOOL MutexDummyImpl { +class EXPCL_DTOOL_DTOOLBASE MutexDummyImpl { public: CONSTEXPR MutexDummyImpl() DEFAULT_CTOR; diff --git a/dtool/src/dtoolbase/mutexPosixImpl.h b/dtool/src/dtoolbase/mutexPosixImpl.h index 4d4fb3c11b..44b5ab193f 100644 --- a/dtool/src/dtoolbase/mutexPosixImpl.h +++ b/dtool/src/dtoolbase/mutexPosixImpl.h @@ -26,7 +26,7 @@ /** * Uses Posix threads to implement a mutex. */ -class EXPCL_DTOOL MutexPosixImpl { +class EXPCL_DTOOL_DTOOLBASE MutexPosixImpl { public: CONSTEXPR MutexPosixImpl() NOEXCEPT; INLINE ~MutexPosixImpl(); @@ -50,7 +50,7 @@ private: /** * Uses Posix threads to implement a reentrant mutex. */ -class EXPCL_DTOOL ReMutexPosixImpl { +class EXPCL_DTOOL_DTOOLBASE ReMutexPosixImpl { public: #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP CONSTEXPR ReMutexPosixImpl() NOEXCEPT; diff --git a/dtool/src/dtoolbase/mutexSpinlockImpl.h b/dtool/src/dtoolbase/mutexSpinlockImpl.h index 06853a1af9..33514127f4 100644 --- a/dtool/src/dtoolbase/mutexSpinlockImpl.h +++ b/dtool/src/dtoolbase/mutexSpinlockImpl.h @@ -27,7 +27,7 @@ * specific application on a specific SMP machine, and you are confident that * you have at least as many CPU's as you have threads. */ -class EXPCL_DTOOL MutexSpinlockImpl { +class EXPCL_DTOOL_DTOOLBASE MutexSpinlockImpl { public: CONSTEXPR MutexSpinlockImpl(); diff --git a/dtool/src/dtoolbase/mutexWin32Impl.h b/dtool/src/dtoolbase/mutexWin32Impl.h index 31a4539e01..08fc6eab24 100644 --- a/dtool/src/dtoolbase/mutexWin32Impl.h +++ b/dtool/src/dtoolbase/mutexWin32Impl.h @@ -26,7 +26,7 @@ /** * Uses Windows native calls to implement a mutex. */ -class EXPCL_DTOOL MutexWin32Impl { +class EXPCL_DTOOL_DTOOLBASE MutexWin32Impl { public: MutexWin32Impl(); INLINE ~MutexWin32Impl(); diff --git a/dtool/src/dtoolbase/neverFreeMemory.h b/dtool/src/dtoolbase/neverFreeMemory.h index 49df06a153..d3f0cf51a1 100644 --- a/dtool/src/dtoolbase/neverFreeMemory.h +++ b/dtool/src/dtoolbase/neverFreeMemory.h @@ -29,7 +29,7 @@ * since this will help reduce fragmentation problems in the dynamic heap. * Also, memory allocated from here will exhibit less wasted space. */ -class EXPCL_DTOOL NeverFreeMemory { +class EXPCL_DTOOL_DTOOLBASE NeverFreeMemory { private: NeverFreeMemory(); diff --git a/dtool/src/dtoolbase/pdtoa.h b/dtool/src/dtoolbase/pdtoa.h index a3d3e46147..908ca24deb 100644 --- a/dtool/src/dtoolbase/pdtoa.h +++ b/dtool/src/dtoolbase/pdtoa.h @@ -15,7 +15,7 @@ extern "C" { #endif -EXPCL_DTOOL void pdtoa(double value, char *buffer); +EXPCL_DTOOL_DTOOLBASE void pdtoa(double value, char *buffer); #ifdef __cplusplus }; /* end of extern "C" */ diff --git a/dtool/src/dtoolbase/pstrtod.h b/dtool/src/dtoolbase/pstrtod.h index 7cd78f2f65..2e2d30599c 100644 --- a/dtool/src/dtoolbase/pstrtod.h +++ b/dtool/src/dtoolbase/pstrtod.h @@ -20,10 +20,10 @@ extern "C" { #endif -EXPCL_DTOOL double +EXPCL_DTOOL_DTOOLBASE double pstrtod(const char *nptr, char **endptr); -EXPCL_DTOOL double +EXPCL_DTOOL_DTOOLBASE double patof(const char *str); #ifdef __cplusplus diff --git a/dtool/src/dtoolbase/register_type.h b/dtool/src/dtoolbase/register_type.h index 7ea6031391..c6b27f2a94 100644 --- a/dtool/src/dtoolbase/register_type.h +++ b/dtool/src/dtoolbase/register_type.h @@ -76,18 +76,18 @@ register_dynamic_type(const string &name, // A few system-wide TypeHandles are defined for some basic types. -extern TypeHandle EXPCL_DTOOL long_type_handle; -extern TypeHandle EXPCL_DTOOL int_type_handle; -extern TypeHandle EXPCL_DTOOL uint_type_handle; -extern TypeHandle EXPCL_DTOOL short_type_handle; -extern TypeHandle EXPCL_DTOOL ushort_type_handle; -extern TypeHandle EXPCL_DTOOL char_type_handle; -extern TypeHandle EXPCL_DTOOL uchar_type_handle; -extern TypeHandle EXPCL_DTOOL bool_type_handle; -extern TypeHandle EXPCL_DTOOL double_type_handle; -extern TypeHandle EXPCL_DTOOL float_type_handle; -extern TypeHandle EXPCL_DTOOL string_type_handle; -extern TypeHandle EXPCL_DTOOL wstring_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE long_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE int_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE uint_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE short_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE ushort_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE char_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE uchar_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE bool_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE double_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE float_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE string_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE wstring_type_handle; extern TypeHandle long_p_type_handle; extern TypeHandle int_p_type_handle; @@ -98,14 +98,14 @@ extern TypeHandle double_p_type_handle; extern TypeHandle float_p_type_handle; extern TypeHandle void_p_type_handle; -extern TypeHandle EXPCL_DTOOL pvector_type_handle; -extern TypeHandle EXPCL_DTOOL ov_set_type_handle; -extern TypeHandle EXPCL_DTOOL pdeque_type_handle; -extern TypeHandle EXPCL_DTOOL plist_type_handle; -extern TypeHandle EXPCL_DTOOL pmap_type_handle; -extern TypeHandle EXPCL_DTOOL pset_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE pvector_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE ov_set_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE pdeque_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE plist_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE pmap_type_handle; +extern TypeHandle EXPCL_DTOOL_DTOOLBASE pset_type_handle; -void EXPCL_DTOOL init_system_type_handles(); +void EXPCL_DTOOL_DTOOLBASE init_system_type_handles(); // The following template function and its specializations will return a // TypeHandle for any type in the world, from a pointer to that type. diff --git a/dtool/src/dtoolbase/typeHandle.h b/dtool/src/dtoolbase/typeHandle.h index 58e69646f4..3138d51e4b 100644 --- a/dtool/src/dtoolbase/typeHandle.h +++ b/dtool/src/dtoolbase/typeHandle.h @@ -78,7 +78,7 @@ class TypedObject; * that ancestry of a particular type may be queried, and the type name may be * retrieved for run-time display. */ -class EXPCL_DTOOL TypeHandle FINAL { +class EXPCL_DTOOL_DTOOLBASE TypeHandle FINAL { PUBLISHED: TypeHandle() NOEXCEPT DEFAULT_CTOR; @@ -162,7 +162,7 @@ INLINE ostream &operator << (ostream &out, TypeHandle type) { return out; } -EXPCL_DTOOL ostream &operator << (ostream &out, TypeHandle::MemoryClass mem_class); +EXPCL_DTOOL_DTOOLBASE ostream &operator << (ostream &out, TypeHandle::MemoryClass mem_class); // We must include typeRegistry at this point so we can call it from our // inline functions. This is a circular include that is strategically placed diff --git a/dtool/src/dtoolbase/typeRegistry.h b/dtool/src/dtoolbase/typeRegistry.h index 651eb1904b..5c5c09ad4c 100644 --- a/dtool/src/dtoolbase/typeRegistry.h +++ b/dtool/src/dtoolbase/typeRegistry.h @@ -33,7 +33,7 @@ class TypedObject; * should be migrated to shared memory as soon as shared memory becomes * available. */ -class EXPCL_DTOOL TypeRegistry : public MemoryBase { +class EXPCL_DTOOL_DTOOLBASE TypeRegistry : public MemoryBase { public: // User code shouldn't generally need to call TypeRegistry::register_type() // or record_derivation() directly; instead, use the register_type @@ -118,7 +118,7 @@ private: }; // Helper function to allow for "C" interaction into the type system -extern "C" EXPCL_DTOOL int get_best_parent_from_Set(int id, const std::set &this_set); +extern "C" EXPCL_DTOOL_DTOOLBASE int get_best_parent_from_Set(int id, const std::set &this_set); #include "typeHandle.h" diff --git a/dtool/src/dtoolbase/typeRegistryNode.h b/dtool/src/dtoolbase/typeRegistryNode.h index 46e4b9f5a1..a8df5c339e 100644 --- a/dtool/src/dtoolbase/typeRegistryNode.h +++ b/dtool/src/dtoolbase/typeRegistryNode.h @@ -27,7 +27,7 @@ * directly access this class; this class is hidden within the TypeRegistry * accessors. */ -class EXPCL_DTOOL TypeRegistryNode { +class EXPCL_DTOOL_DTOOLBASE TypeRegistryNode { public: TypeRegistryNode(TypeHandle handle, const string &name, TypeHandle &ref); diff --git a/dtool/src/dtoolbase/typedObject.h b/dtool/src/dtoolbase/typedObject.h index cc963b0fac..f3d6c193e3 100644 --- a/dtool/src/dtoolbase/typedObject.h +++ b/dtool/src/dtoolbase/typedObject.h @@ -85,7 +85,7 @@ * } * @endcode */ -class EXPCL_DTOOL TypedObject : public MemoryBase { +class EXPCL_DTOOL_DTOOLBASE TypedObject : public MemoryBase { public: INLINE TypedObject() DEFAULT_CTOR; INLINE TypedObject(const TypedObject ©) DEFAULT_CTOR;