This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH COMMITTED: Make filenames.h C++ safe
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Fri, 21 Mar 2008 16:40:24 -0700
- Subject: PATCH COMMITTED: Make filenames.h C++ safe
I have brought over this patch from the master gcc repository.
Ian
2008-03-21 Ian Lance Taylor <iant@google.com>
* filenames.h: Add extern "C" when compiled with C++.
Index: filenames.h
===================================================================
RCS file: /cvs/src/src/include/filenames.h,v
retrieving revision 1.4
diff -u -r1.4 filenames.h
--- filenames.h 29 Mar 2007 21:03:43 -0000 1.4
+++ filenames.h 21 Mar 2008 23:39:52 -0000
@@ -26,6 +26,10 @@
#ifndef FILENAMES_H
#define FILENAMES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
#ifndef HAVE_DOS_BASED_FILE_SYSTEM
@@ -49,4 +53,8 @@
extern int filename_cmp (const char *s1, const char *s2);
#define FILENAME_CMP(s1, s2) filename_cmp(s1, s2)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FILENAMES_H */