aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/libsha1.h
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-11-01 22:01:15 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-11-01 22:35:48 -0700
commitc81cecf620d506653a1ead83858b8b3fc240abb5 (patch)
treef69fd387af5c9c28637f6f4f2fa0253df0be9571 /lib/libsha1.h
parent67c3bc9db48c9e12d648df4792c706cae723676c (diff)
lib: Add GCC visibility(hidden) pragmas to private header files.
This prevents any of the private functions from being leaked out through the library interface (at least when compiling with a recent-enough gcc to support the visibility pragma).
Diffstat (limited to 'lib/libsha1.h')
-rw-r--r--lib/libsha1.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libsha1.h b/lib/libsha1.h
index b4dca93b..c1c848fc 100644
--- a/lib/libsha1.h
+++ b/lib/libsha1.h
@@ -43,6 +43,8 @@ extern "C"
#include <stdint.h>
+#pragma GCC visibility push(hidden)
+
/* Size of SHA1 digest */
#define SHA1_DIGEST_SIZE 20
@@ -60,6 +62,8 @@ void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1]);
void sha1_end(unsigned char hval[], sha1_ctx ctx[1]);
void sha1(unsigned char hval[], const unsigned char data[], unsigned long len);
+#pragma GCC visibility pop
+
#if defined(__cplusplus)
}
#endif