fixed double load/unload in example/example.library.c when building with MinGW
case by both __GNUC__ and _WIN32 preprocessor definitions being defined at the same time
This commit is contained in:
parent
73c56ffacc
commit
574cea6708
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <whereami.h>
|
#include <whereami.h>
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__) && !defined(_WIN32)
|
||||||
__attribute__((constructor))
|
__attribute__((constructor))
|
||||||
#endif
|
#endif
|
||||||
static void load()
|
static void load()
|
||||||
@ -42,7 +42,8 @@ static void load()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__) && !defined(_WIN32)
|
||||||
|
__attribute__((constructor))
|
||||||
__attribute__((destructor))
|
__attribute__((destructor))
|
||||||
#endif
|
#endif
|
||||||
static void unload()
|
static void unload()
|
||||||
|
Loading…
Reference in New Issue
Block a user