use alias attribute only for elf platforms

It was reported that clang on OSX doesn't support alias attribute. Most
likely because of executable format limitations.

New code limits use of alias to gcc-compatible compilers on elf
platforms (various gnu and *bsd systems). Elf format is known to support
aliases.
This commit is contained in:
Aliaksey Kandratsenka 2015-12-12 18:27:40 -08:00
parent 07b0b21ddd
commit 050f2d28be

View File

@ -1598,7 +1598,7 @@ extern "C" PERFTOOLS_DLL_DECL void tc_free_sized(void *ptr, size_t size) __THROW
do_free_with_callback(ptr, &InvalidFree, true, size);
}
#if defined(__GNUC__) && !defined(WIN32)
#if defined(__GNUC__) && defined(__ELF__)
extern "C" PERFTOOLS_DLL_DECL void tc_delete_sized(void *p, size_t size) throw()
__attribute__((alias("tc_free_sized")));