Skip to content

Commit

Permalink
build: Rename libmd_alias() to libmd_strong_alias()
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemj committed Apr 8, 2023
1 parent ed69599 commit 08b2c5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/local-link.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
* maintainable.
*/
#if defined(__APPLE__)
#define libmd_alias(alias, symbol) \
#define libmd_strong_alias(alias, symbol) \
__asm__(".globl _" #alias); \
__asm__(".set _" #alias ", _" #symbol); \
extern __typeof__(symbol) alias
#elif !defined(_MSC_VER)
#define libmd_alias(alias, symbol) \
#define libmd_strong_alias(alias, symbol) \
extern __typeof__(symbol) alias __attribute__((__alias__(#symbol)))
#endif

Expand All @@ -60,7 +60,7 @@
__asm__(".symver " #symbol "," #alias "@" #version)
#else
#define libmd_symver_default(alias, symbol, version) \
libmd_alias(alias, symbol)
libmd_strong_alias(alias, symbol)

#define libmd_symver_variant(alias, symbol, version)
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/sha2.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,10 @@ SHA384Init(SHA2_CTX *context)
context->bitcount[0] = context->bitcount[1] = 0;
}

#ifdef libmd_alias
libmd_alias(SHA384Transform, SHA512Transform);
libmd_alias(SHA384Update, SHA512Update);
libmd_alias(SHA384Pad, SHA512Pad);
#ifdef libmd_strong_alias
libmd_strong_alias(SHA384Transform, SHA512Transform);
libmd_strong_alias(SHA384Update, SHA512Update);
libmd_strong_alias(SHA384Pad, SHA512Pad);
#else
void
SHA384Transform(uint64_t state[8], const uint8_t data[SHA512_BLOCK_LENGTH])
Expand Down

0 comments on commit 08b2c5d

Please sign in to comment.