summaryrefslogtreecommitdiff
path: root/gdb/features/feature_to_c.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/features/feature_to_c.sh')
-rwxr-xr-x[-rw-r--r--]gdb/features/feature_to_c.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/features/feature_to_c.sh b/gdb/features/feature_to_c.sh
index 1f435362f45..e6665f118da 100644..100755
--- a/gdb/features/feature_to_c.sh
+++ b/gdb/features/feature_to_c.sh
@@ -63,7 +63,13 @@ for input; do
done
echo >> $output
-echo "const char *const xml_builtin[][2] = {" >> $output
+
+echo "#ifdef __cplusplus" >> $output
+echo "# define EXTERN_CONST extern const" >> $output
+echo "#else" >> $output
+echo "# define EXTERN_CONST const" >> $output
+echo "#endif" >> $output
+echo "EXTERN_CONST char *const xml_builtin[][2] = {" >> $output
for input; do
basename=`echo $input | sed 's,.*/,,'`