This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Make include/md5.h C++ safe
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Mon, 24 Mar 2008 16:43:58 -0700
- Subject: Make include/md5.h C++ safe
I brought this patch over from the gcc repository.
Ian
2008-03-24 Ian Lance Taylor <iant@google.com>
* md5.h: Add extern "C" when compiled with C++.
Index: md5.h
===================================================================
--- md5.h (revision 133491)
+++ md5.h (working copy)
@@ -21,6 +21,10 @@
#ifndef _MD5_H
#define _MD5_H 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdio.h>
#if defined HAVE_LIMITS_H || _LIBC
@@ -138,4 +142,8 @@ extern int md5_stream (FILE *stream, voi
digest. */
extern void *md5_buffer (const char *buffer, size_t len, void *resblock);
+#ifdef __cplusplus
+}
+#endif
+
#endif