mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
ITS#9919 - Mark infrequently used functions as cold rather than manually putting them in a separate section
This commit is contained in:
parent
b181666eec
commit
abe36745d2
1 changed files with 14 additions and 8 deletions
|
|
@ -199,8 +199,13 @@ typedef SSIZE_T ssize_t;
|
||||||
# error "Two's complement, reasonably sized integer types, please"
|
# error "Two's complement, reasonably sized integer types, please"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (((__clang_major__ << 8) | __clang_minor__) >= 0x0302) || (((__GNUC__ << 8) | __GNUC_MINOR__) >= 0x0403)
|
||||||
|
/** Mark infrequently used env functions as cold. This puts them in a separate
|
||||||
|
* section, and optimizes them for size */
|
||||||
|
#define ESECT __attribute__ ((cold))
|
||||||
|
#else
|
||||||
|
/* On older compilers, use a separate section */
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
/** Put infrequently used env functions in separate section */
|
|
||||||
# ifdef __APPLE__
|
# ifdef __APPLE__
|
||||||
# define ESECT __attribute__ ((section("__TEXT,text_env")))
|
# define ESECT __attribute__ ((section("__TEXT,text_env")))
|
||||||
# else
|
# else
|
||||||
|
|
@ -209,6 +214,7 @@ typedef SSIZE_T ssize_t;
|
||||||
# else
|
# else
|
||||||
# define ESECT
|
# define ESECT
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define CALL_CONV WINAPI
|
#define CALL_CONV WINAPI
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue