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