Replace JEMALLOC_ATTR with various different macros when it makes sense

Theses newly added macros will be used to implement the equivalent under
MSVC. Also, move the definitions to headers, where they make more sense,
and for some, are even more useful there (e.g. malloc).
This commit is contained in:
Mike Hommey
2012-04-30 12:38:29 +02:00
committed by Jason Evans
parent 7cdea3973c
commit da99e31105
8 changed files with 56 additions and 82 deletions

View File

@@ -40,8 +40,7 @@ static char *x2s(uintmax_t x, bool alt_form, bool uppercase, char *s,
/******************************************************************************/
/* malloc_message() setup. */
JEMALLOC_CATTR(visibility("hidden"), static)
void
static void
wrtmessage(void *cbopaque, const char *s)
{
@@ -57,8 +56,8 @@ wrtmessage(void *cbopaque, const char *s)
#endif
}
void (*je_malloc_message)(void *, const char *s)
JEMALLOC_ATTR(visibility("default")) = wrtmessage;
JEMALLOC_EXPORT void (*je_malloc_message)(void *, const char *s) =
wrtmessage;
/*
* glibc provides a non-standard strerror_r() when _GNU_SOURCE is defined, so