Loading...
Searching...
No Matches
Go to the documentation of this file.
34#if defined(__sun) && defined(__SVR4)
35#define INITIALIZER(name) __attribute__((constructor)) static void name(void)
36#define FINALIZER(name) __attribute__((destructor)) static void name(void)
38#define INITIALIZER(name) __attribute__((constructor(101))) static void name(void)
39#define FINALIZER(name) __attribute__((destructor(101))) static void name(void)
41#define REGISTER_FINALIZER(name) ((void) 0)
43#elif defined(_MSC_VER)
48#pragma section(".CRT$XCT", read)
49#define INITIALIZER(name) \
50 static void __cdecl name(void); \
51 __declspec(allocate(".CRT$XCT")) void (__cdecl *const _##name)(void) = &name; \
52 static void __cdecl name(void)
53#define FINALIZER(name) \
54 static void __cdecl name(void)
55#define REGISTER_FINALIZER(name) \
57 int _res = atexit(name); \
62#error Unsupported compiler