This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[gcc-in-cxx] Add extern "C" to files in include


I committed this patch to the gcc-in-cxx branch.  It adds extern "C"
to a couple of files in the include directory.

Ian


2009-01-30  Ian Lance Taylor  <iant@google.com>

	* dyn-string.h: Add extern "C".
	* fibheap.h: Likewise.


Index: dyn-string.h
===================================================================
--- dyn-string.h	(revision 143118)
+++ dyn-string.h	(working copy)
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING.  I
 the Free Software Foundation, 51 Franklin Street - Fifth Floor,
 Boston, MA 02110-1301, USA.  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 typedef struct dyn_string
 {
@@ -58,3 +61,7 @@ extern int dyn_string_append_cstr (dyn_s
 extern int dyn_string_append_char (dyn_string_t, int);
 extern int dyn_string_substring (dyn_string_t,  dyn_string_t, int, int);
 extern int dyn_string_eq (dyn_string_t, dyn_string_t);
+
+#ifdef __cplusplus
+}
+#endif
Index: fibheap.h
===================================================================
--- fibheap.h	(revision 143118)
+++ fibheap.h	(working copy)
@@ -42,6 +42,10 @@ Boston, MA 02110-1301, USA.  */
 
 #include "ansidecl.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef long fibheapkey_t;
 
 typedef struct fibheap
@@ -83,4 +87,8 @@ extern void *fibheap_delete_node (fibhea
 extern void fibheap_delete (fibheap_t);
 extern fibheap_t fibheap_union (fibheap_t, fibheap_t);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _FIBHEAP_H_ */

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