This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]