Skip to content

Commit c95b4e8

Browse files
committed
Adjust preprocessor symbols for Argon2
1 parent 185408f commit c95b4e8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/argon2/include/argon2.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,20 @@ extern "C" {
3131
#define ARGON2_PUBLIC __attribute__((visibility("default")))
3232
#define ARGON2_LOCAL __attribute__ ((visibility ("hidden")))
3333
#elif defined(_MSC_VER)
34+
#ifndef ARGON2_PUBLIC
3435
#define ARGON2_PUBLIC __declspec(dllexport)
36+
#endif
37+
#ifndef ARGON2_LOCAL
3538
#define ARGON2_LOCAL
39+
#endif
3640
#else
41+
#ifndef ARGON2_PUBLIC
3742
#define ARGON2_PUBLIC
43+
#endif
44+
#ifndef ARGON2_LOCAL
3845
#define ARGON2_LOCAL
3946
#endif
47+
#endif
4048

4149
/*
4250
* Argon2 input parameter restrictions

src/argon2/libargon2.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#ifndef ARGON2_API
2-
#define ARGON2_API
2+
#define ARGON2_API static
33
#endif
44

55
#ifndef ARGON2_PRIVATE
66
#define ARGON2_PRIVATE static
77
#endif
88

9+
#ifndef ARGON2_PUBLIC
10+
#define ARGON2_PUBLIC static
11+
#endif
12+
913
#ifndef ARGON2_LOCAL
1014
#define ARGON2_LOCAL static
1115
#endif

0 commit comments

Comments
 (0)