Added macro expansion round before stringification for GET_SECTION_START/STOP. This fixes report hooks not working for Windows and OSX
This commit is contained in:
parent
799f46a3e3
commit
efb2587da5
1 changed files with 8 additions and 4 deletions
|
@ -79,13 +79,17 @@ bool is_current_process(s_proc_handle *proc);
|
|||
# ifdef VANILLA_WIN32
|
||||
void *get_win_section_start(const char *section);
|
||||
void *get_win_section_end(const char *section);
|
||||
# define GET_SECTION_START(Name) get_win_section_start(#Name)
|
||||
# define GET_SECTION_END(Name) get_win_section_end(#Name)
|
||||
# define CR_STRINGIFY_(Param) #Param
|
||||
# define CR_STRINGIFY(Param) CR_STRINGIFY_(Param)
|
||||
# define GET_SECTION_START(Name) get_win_section_start(CR_STRINGIFY(Name))
|
||||
# define GET_SECTION_END(Name) get_win_section_end(CR_STRINGIFY(Name))
|
||||
# elif defined(__APPLE__)
|
||||
void *get_osx_section_start(const char *section);
|
||||
void *get_osx_section_end(const char *section);
|
||||
# define GET_SECTION_START(Name) get_osx_section_start(#Name)
|
||||
# define GET_SECTION_END(Name) get_osx_section_end(#Name)
|
||||
# define CR_STRINGIFY_(Param) #Param
|
||||
# define CR_STRINGIFY(Param) CR_STRINGIFY_(Param)
|
||||
# define GET_SECTION_START(Name) get_osx_section_start(CR_STRINGIFY(Name))
|
||||
# define GET_SECTION_END(Name) get_osx_section_end(CR_STRINGIFY(Name))
|
||||
# else
|
||||
# define GET_SECTION_START(Name) SECTION_START(Name)
|
||||
# define GET_SECTION_END(Name) SECTION_END(Name)
|
||||
|
|
Loading…
Add table
Reference in a new issue