mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-09 19:27:42 +01:00
build: Add new libbsd_symver_weak() macro
We will use it for the reworked md5 deprecation logic.
This commit is contained in:
parent
1eba406021
commit
500b3080a2
@ -42,18 +42,29 @@
|
|||||||
#define libbsd_symver_variant(alias, symbol, version) \
|
#define libbsd_symver_variant(alias, symbol, version) \
|
||||||
extern __typeof__(symbol) symbol \
|
extern __typeof__(symbol) symbol \
|
||||||
__attribute__((__symver__(#alias "@" #version)))
|
__attribute__((__symver__(#alias "@" #version)))
|
||||||
|
|
||||||
|
#define libbsd_symver_weak(alias, symbol, version) \
|
||||||
|
extern __typeof__(symbol) symbol \
|
||||||
|
__attribute__((__symver__(#alias "@" #version), __weak__))
|
||||||
# else
|
# else
|
||||||
#define libbsd_symver_default(alias, symbol, version) \
|
#define libbsd_symver_default(alias, symbol, version) \
|
||||||
__asm__(".symver " #symbol "," #alias "@@" #version)
|
__asm__(".symver " #symbol "," #alias "@@" #version)
|
||||||
|
|
||||||
#define libbsd_symver_variant(alias, symbol, version) \
|
#define libbsd_symver_variant(alias, symbol, version) \
|
||||||
__asm__(".symver " #symbol "," #alias "@" #version)
|
__asm__(".symver " #symbol "," #alias "@" #version)
|
||||||
|
|
||||||
|
#define libbsd_symver_weak(alias, symbol, version) \
|
||||||
|
libbsd_symver_variant(alias, symbol, version); \
|
||||||
|
extern __typeof__(symbol) alias \
|
||||||
|
__attribute__((__weak__))
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#define libbsd_symver_default(alias, symbol, version) \
|
#define libbsd_symver_default(alias, symbol, version) \
|
||||||
extern __typeof__(symbol) alias __attribute__((__alias__(#symbol)))
|
extern __typeof__(symbol) alias __attribute__((__alias__(#symbol)))
|
||||||
|
|
||||||
#define libbsd_symver_variant(alias, symbol, version)
|
#define libbsd_symver_variant(alias, symbol, version)
|
||||||
|
|
||||||
|
#define libbsd_symver_weak(alias, symbol, version)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user