summaryrefslogtreecommitdiff
path: root/security/cfs/files/unansi.sh
diff options
context:
space:
mode:
Diffstat (limited to 'security/cfs/files/unansi.sh')
-rw-r--r--security/cfs/files/unansi.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/security/cfs/files/unansi.sh b/security/cfs/files/unansi.sh
new file mode 100644
index 00000000000..58a83b555b0
--- /dev/null
+++ b/security/cfs/files/unansi.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# We need to disable ANSI prototypes for the rpcgen'd functions because of
+# the way the build script redefines some functions in terms of other
+# functions which have different prototypes.
+
+case $1 in
+NetBSD)
+ set -e
+ @AWK@ '
+ /__STDC__/ { last = NR - 1 }
+ { lines[linec++] = $0 }
+ END {
+ gsub("__STDC__", "__STDC__XXX", lines[last]);
+ for (i = 0; i < linec; i++)
+ print lines[i]
+ }' < $2 > $2.tmp
+ @MV@ -f $2.tmp $2
+ ;;
+*)
+ ;;
+esac