mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-21 01:06:40 +00:00
a3696c0b91
lib/sysdep: clean up by moving OS and cpu-arch folders into "os" and "arch" folders This was SVN commit r6162.
33 lines
901 B
C
33 lines
901 B
C
/**
|
|
* =========================================================================
|
|
* File : wdll_delay_load.h
|
|
* Project : 0 A.D.
|
|
* Description : DLL delay loading and notification
|
|
* =========================================================================
|
|
*/
|
|
|
|
// license: GPL; see lib/license.txt
|
|
|
|
#ifndef INCLUDED_WDLL_DELAY_LOAD
|
|
#define INCLUDED_WDLL_DELAY_LOAD
|
|
|
|
// must be POD because it is used before static ctors run.
|
|
struct WdllLoadNotify
|
|
{
|
|
const char* dll_name;
|
|
LibError (*func)(void);
|
|
WdllLoadNotify* next;
|
|
};
|
|
|
|
extern void wdll_add_notify(WdllLoadNotify*);
|
|
|
|
// request that func be called if and when dll_name is ever delay-loaded.
|
|
// must be invoked at function scope.
|
|
#define WDLL_ADD_NOTIFY(dll_name, func)\
|
|
STMT(\
|
|
static WdllLoadNotify UID__ = { dll_name, func };\
|
|
wdll_add_notify(&UID__);\
|
|
)
|
|
|
|
#endif // #ifndef INCLUDED_WDLL_DELAY_LOAD
|