summaryrefslogtreecommitdiff
path: root/security/cfs/files/unansi.sh
blob: 58a83b555b06b79b93f59bba7802820933d061a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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