Commit 7f3feeea by Didier FORT Committed by Jeff Law

fixincludes: Fix up rpc/{clnt,svr,xdr}.h for SunOS.

 
        * fixincludes: Fix up rpc/{clnt,svr,xdr}.h for SunOS.

From-SVN: r23100
parent 2e945f38
...@@ -2921,17 +2921,42 @@ if [ -r ${LIB}/$file ]; then ...@@ -2921,17 +2921,42 @@ if [ -r ${LIB}/$file ]; then
fi fi
fi fi
# rpc/xdr.h on SunOS needs prototypes for its XDR->xdr_ops function pointers. # rpc/auth.h on SunOS needs prototypes for its AUTH->auth_ops function pointers
file=rpc/xdr.h # Similarly for
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then # rpc/clnt.h CLIENT->clnt_ops
# rpc/svc.h SVCXPRT->xp_ops
# rpc/xdr.h XDR->xdr_ops
for file in rpc/auth.h rpc/clnt.h rpc/svc.h rpc/xdr.h; do
# each file has a different name to replace, so if you add a file to
# that list please update the following case statement.
case "$file" in
rpc/auth.h)
prefix="ah_"
;;
rpc/clnt.h)
prefix="cl_"
;;
rpc/svc.h)
prefix="xp_"
;;
rpc/xdr.h)
prefix="x_"
;;
*)
# Oh Oh, we shouldn't be here
exit 1;
;;
esac
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
chmod +w ${LIB}/$file 2>/dev/null chmod +w ${LIB}/$file 2>/dev/null
chmod a+r ${LIB}/$file 2>/dev/null chmod a+r ${LIB}/$file 2>/dev/null
fi fi
if [ -r ${LIB}/$file ]; then if [ -r ${LIB}/$file ]; then
echo "Checking for needed C++ prototype in $file" echo "Checking for needed C++ prototype in $file"
sed -e 's/^\(.*\)\*\(x_.*\)();\(.*\)/\ sed -e 's/^\(.*\)\*\('$prefix'.*\)();\(.*\)/\
#ifdef __cplusplus\ #ifdef __cplusplus\
\1*\2(...);\3\ \1*\2(...);\3\
#else\ #else\
...@@ -2949,7 +2974,8 @@ if [ -r ${LIB}/$file ]; then ...@@ -2949,7 +2974,8 @@ if [ -r ${LIB}/$file ]; then
required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include" required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
done done
fi fi
fi fi
done
# sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by # sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by
# defining regex.h types. This causes C++ library build and usage failures. # defining regex.h types. This causes C++ library build and usage failures.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment