[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] lib/sha1.h: wrap declarations in extern "C" scope when included
From: |
Peter Simons |
Subject: |
[PATCH] lib/sha1.h: wrap declarations in extern "C" scope when included from C++ |
Date: |
Sun, 19 Jul 2009 18:28:38 +0200 |
>From 640f2ed9570eef3189e43ec7550b32776fdebd0f Mon Sep 17 00:00:00 2001
From: Peter Simons <address@hidden>
Date: Sun, 19 Jul 2009 18:25:44 +0200
Subject: [PATCH] lib/sha1.h: wrap declarations in extern "C" scope when
included from C++
---
lib/sha1.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/sha1.h b/lib/sha1.h
index 4ffda7a..b5f725b 100644
--- a/lib/sha1.h
+++ b/lib/sha1.h
@@ -23,6 +23,10 @@
# include <stdio.h>
# include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define SHA1_DIGEST_SIZE 20
/* Structure to save state of computation between the single steps. */
@@ -81,4 +85,8 @@ extern int sha1_stream (FILE *stream, void *resblock);
digest. */
extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
--
1.6.3.3
- [PATCH] lib/sha1.h: wrap declarations in extern "C" scope when included from C++,
Peter Simons <=