diff options
author | Robert Lipe <robertlipe@usa.net> | 1999-07-01 18:39:28 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-07-01 18:39:28 -0600 |
commit | a23fbf72c7c79d6ab8183e5baceb94a65ced64fc (patch) | |
tree | 838e46eddd0003ddbae06b70ce38b3ded6798355 /gcc/fixinc/fixinc.svr4 | |
parent | 37f7ba0a1c8e5408ce8fd3c54127975432c1b875 (diff) | |
download | gcc-a23fbf72c7c79d6ab8183e5baceb94a65ced64fc.zip gcc-a23fbf72c7c79d6ab8183e5baceb94a65ced64fc.tar.gz gcc-a23fbf72c7c79d6ab8183e5baceb94a65ced64fc.tar.bz2 |
fixinc.svr4: Fix <arpa/inet.h> by deleting protos for htons and ntohs.
P
* fixinc.svr4: Fix <arpa/inet.h> by deleting protos for htons and
ntohs.
From-SVN: r27915
Diffstat (limited to 'gcc/fixinc/fixinc.svr4')
-rwxr-xr-x | gcc/fixinc/fixinc.svr4 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/fixinc/fixinc.svr4 b/gcc/fixinc/fixinc.svr4 index 30aa679..fbec4bc 100755 --- a/gcc/fixinc/fixinc.svr4 +++ b/gcc/fixinc/fixinc.svr4 @@ -1570,6 +1570,37 @@ if [ \! -z "$file_to_fix" ]; then rm -f /tmp/$base fi +# If arpa/inet.h prototypes are incompatible with the ones we just +# installed in <sys/byteorder.h>, just remove the protos. +set -x +file=arpa/inet.h +base=`basename $file` +if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file +else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi +fi +if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + sed -e '/^extern.*htons.*(in_port_t)/d' \ + -e '/^extern.*ntohs.*(in_port_t)/d' \ + $file_to_fix > /tmp/$base + if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ + true + else + echo Fixed $file_to_fix + mkdir -p $LIB/`dirname $file` + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base +fi + echo 'Removing unneeded directories:' cd $LIB files=`find . -type d \! -name '.' -print | sort -r` |