* lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
* lib/md4.h: Likewise.
* lib/md5.h: Likewise.
* lib/sha1.h: Likewise.
* lib/sha256.h: Likewise.
* lib/sha512.h: Likewise.
2009-07-22 Peter Simons <simons@cryp.to>
+ C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
+ * lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
+ * lib/md4.h: Likewise.
+ * lib/md5.h: Likewise.
+ * lib/sha1.h: Likewise.
+ * lib/sha256.h: Likewise.
+ * lib/sha512.h: Likewise.
+
tests-sha1: don't assign literal string to 'char *' variable
* tests/test-sha1.c (main): Declare locals with "const" to match
attributes of the right hand side.
# include <stdio.h>
# include <stddef.h>
+# ifdef __cplusplus
+extern "C" {
+# endif
+
# define MD2_DIGEST_SIZE 16
/* Structure to save state of computation between the single steps. */
digest. */
extern void *md2_buffer (const char *buffer, size_t len, void *resblock);
+# ifdef __cplusplus
+}
+# endif
+
#endif
# include <stdio.h>
# include <stdint.h>
+# ifdef __cplusplus
+extern "C" {
+# endif
+
# define MD4_DIGEST_SIZE 16
/* Structure to save state of computation between the single steps. */
digest. */
extern void *md4_buffer (const char *buffer, size_t len, void *resblock);
+# ifdef __cplusplus
+}
+# endif
+
#endif
# define __md5_stream md5_stream
#endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+
/* Structure to save state of computation between the single steps. */
struct md5_ctx
{
extern void *__md5_buffer (const char *buffer, size_t len,
void *resblock) __THROW;
+# ifdef __cplusplus
+}
+# endif
+
#endif /* md5.h */
# 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. */
digest. */
extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
+# ifdef __cplusplus
+}
+# endif
+
#endif
# include <stdio.h>
# include <stdint.h>
+# ifdef __cplusplus
+extern "C" {
+# endif
+
/* Structure to save state of computation between the single steps. */
struct sha256_ctx
{
extern void *sha256_buffer (const char *buffer, size_t len, void *resblock);
extern void *sha224_buffer (const char *buffer, size_t len, void *resblock);
+# ifdef __cplusplus
+}
+# endif
+
#endif
# include "u64.h"
+# ifdef __cplusplus
+extern "C" {
+# endif
+
/* Structure to save state of computation between the single steps. */
struct sha512_ctx
{
extern void *sha512_buffer (const char *buffer, size_t len, void *resblock);
extern void *sha384_buffer (const char *buffer, size_t len, void *resblock);
+# ifdef __cplusplus
+}
+# endif
+
#endif