summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/known_errors.inc.tmpl18
1 files changed, 18 insertions, 0 deletions
diff --git a/template/known_errors.inc.tmpl b/template/known_errors.inc.tmpl
new file mode 100644
index 0000000000..86c23e18e4
--- /dev/null
+++ b/template/known_errors.inc.tmpl
@@ -0,0 +1,18 @@
+/** -*-c-*-
+ * This file is automatically generated by tools/generic_erb.rb
+ * DO NOT TOUCH!
+ *
+ * If you want to fix something, you should edit 'template/knwon_erros.inc.tmpl or defs/knwon_errors.def
+ */
+
+% error_names = ARGF.read.split(/\s+/)
+void Init_syserr(void) {
+ rb_eNOERROR = set_syserr(0, "NOERROR");
+% error_names.each do |name|
+#ifdef <%=name%>
+ set_syserr(<%=name%>, "<%=name%>");
+#else
+ set_syserr(0, "<%=name%>");
+#endif
+% end
+}