summaryrefslogtreecommitdiff
path: root/c89
diff options
context:
space:
mode:
Diffstat (limited to 'c89')
-rw-r--r--c8923
1 files changed, 23 insertions, 0 deletions
diff --git a/c89 b/c89
new file mode 100644
index 0000000..d0a3c1e
--- /dev/null
+++ b/c89
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# Call the appropriate C compiler with options to accept ANSI/ISO C
+# The following options are the same (as of gcc-2.95):
+# -ansi
+# -std=c89
+# -std=iso9899:1990
+
+extra_flag=-std=c89
+
+for i; do
+ case "$i" in
+ -ansi|-std=c89|-std=iso9899:1990)
+ extra_flag=
+ ;;
+ -std=*)
+ echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
+ exit 1
+ ;;
+ esac
+done
+
+exec gcc $extra_flag ${1+"$@"}