diff options
author | Jürgen Gehring <Juergen.Gehring@bmw.de> | 2016-12-12 00:48:23 -0800 |
---|---|---|
committer | Jürgen Gehring <Juergen.Gehring@bmw.de> | 2016-12-12 00:48:23 -0800 |
commit | 436750026fb1a27944584513c7191d1bc83e9f0d (patch) | |
tree | 4df006e10d30438fe241ce7aec3f8569062615c6 | |
parent | a4c5fed7760238b2ef0e3b204801fed088c99fa7 (diff) | |
download | genivi-common-api-runtime-436750026fb1a27944584513c7191d1bc83e9f0d.tar.gz |
CommonAPI 3.1.10.13.1.10.1
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | include/CommonAPI/Types.hpp | 10 |
2 files changed, 13 insertions, 0 deletions
@@ -1,6 +1,9 @@ Changes ======= +v3.1.10.1 +- Fixed crash on dlclose() + v3.1.10 - no changes diff --git a/include/CommonAPI/Types.hpp b/include/CommonAPI/Types.hpp index 6f6801d..4cdff5d 100644 --- a/include/CommonAPI/Types.hpp +++ b/include/CommonAPI/Types.hpp @@ -53,11 +53,21 @@ namespace CommonAPI { static void __cdecl f(void); \ __declspec(allocate(".CRT$XCU")) void(__cdecl*f##_)(void) = f; \ static void __cdecl f(void) +#define DEINITIALIZER(f) \ + static void __cdecl f(void); \ + static void _##f##_wrapper(void) { \ + atexit(f); \ + } \ + __declspec(allocate(".CRT$XCU")) void(__cdecl * f##_)(void) = _##f##_wrapper; \ + static void __cdecl f(void) #else #define CCALL #define INITIALIZER(f) \ static void f(void) __attribute__((constructor)); \ static void f(void) +#define DEINITIALIZER(f) \ + static void f(void) __attribute__((destructor)); \ + static void f(void) #endif namespace CommonAPI { |