pkgsrc/security/cfs/files/unansi.sh
jlam 76c9a0c91a Add patches from Simon Burge <simonb@wasabisystems.com> to build cfs
without needing -traditional.  This fixes socklen_t lossage mentioned in
the README.netbsd file.  This was tested on i386 NetBSD-1.5 and -current.
2001-06-09 04:32:13 +00:00

22 lines
452 B
Bash

#!/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