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:
Snaipe 2015-08-07 21:40:00 -07:00
parent 799f46a3e3
commit efb2587da5

View file

@ -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)