diff --git a/src/posix-compat.h b/src/posix-compat.h index 82da12c..fa4f87d 100644 --- a/src/posix-compat.h +++ b/src/posix-compat.h @@ -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)