summaryrefslogtreecommitdiffstats
path: root/bin/make_err
diff options
context:
space:
mode:
Diffstat (limited to 'bin/make_err')
-rwxr-xr-xbin/make_err12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/make_err b/bin/make_err
index 4b1f474..1b39d53fb 100755
--- a/bin/make_err
+++ b/bin/make_err
@@ -175,6 +175,12 @@ sub create_public ($) {
print_warning(*HEADER);
print_startprotect(*HEADER, $file);
+ # Begin extern C block
+ print HEADER "\n";
+ print HEADER "#ifdef __cplusplus\n";
+ print HEADER "extern \"C\" {\n";
+ print HEADER "#endif\n";
+
# Iterate over all the major errors
print HEADER "\n/*********************/\n";
print HEADER "/* Major error codes */\n";
@@ -202,6 +208,12 @@ sub create_public ($) {
}
}
+ # End extern C block
+ print HEADER "\n";
+ print HEADER "#ifdef __cplusplus\n";
+ print HEADER "}\n";
+ print HEADER "#endif\n";
+
print_endprotect(*HEADER, $file);
# Close header file