From 77b355a0790586d6f28b6e2fcfddc8e12c9b9c4e Mon Sep 17 00:00:00 2001 From: neroden Date: Thu, 13 Mar 2003 03:01:26 +0000 Subject: * fixinc/fixinc.interix: Remove dead code (most of it). * fixinc/fixinc.dgux: Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64292 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fixinc/fixinc.dgux | 224 ---------------------------------------------- gcc/fixinc/fixinc.interix | 162 --------------------------------- 2 files changed, 386 deletions(-) delete mode 100755 gcc/fixinc/fixinc.dgux (limited to 'gcc/fixinc') diff --git a/gcc/fixinc/fixinc.dgux b/gcc/fixinc/fixinc.dgux deleted file mode 100755 index 39a5b63f00e..00000000000 --- a/gcc/fixinc/fixinc.dgux +++ /dev/null @@ -1,224 +0,0 @@ -#!/bin/sh -# -# modified for dgux by hassey@dg-rtp.dg.com based on -# -# fixinc.svr4 written by Ron Guilmette (rfg@ncd.com). -# -# This file is part of GNU CC. -# -# GNU CC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU CC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU CC; see the file COPYING. If not, write to -# the Free Software Foundation, 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. -# -# -# See README-fixinc for more information. - -# Fail if no arg to specify a directory for the output. -if [ x$1 = x ] -then echo fixincludes: no output directory specified -exit 1 -fi - -# Directory in which to store the results. -LIB=${1?"fixincludes: output directory not specified"} - -# Make sure it exists. -if [ ! -d $LIB ]; then - mkdir $LIB || exit 1 -fi - -ORIG_DIR=`${PWDCMD-pwd}` - -# Make LIB absolute if it is relative. -# Don't do this if not necessary, since may screw up automounters. -case $LIB in -/*) - ;; -*) - cd $LIB; LIB=`${PWDCMD-pwd}` - ;; -esac - -echo 'Building fixincludes in ' ${LIB} - -# Determine whether this filesystem has symbolic links. -if ln -s X $LIB/ShouldNotExist 2>/dev/null; then - rm -f $LIB/ShouldNotExist - LINKS=true -else - LINKS=false -fi - -echo 'Making directories:' -# Directory containing the original header files. -shift -if [ $# -eq 0 ] ; then - set /usr/include -fi - -INLIST="$@" - -for INPUT in ${INLIST} ; do -cd ${ORIG_DIR} -cd ${INPUT} - -if $LINKS; then - files=`ls -LR | sed -n s/:$//p` -else - files=`find . -type d -print | sed '/^.$/d'` -fi -for file in $files; do - rm -rf $LIB/$file - if [ ! -d $LIB/$file ] - then mkdir $LIB/$file - fi -done - -# treetops gets an alternating list -# of old directories to copy -# and the new directories to copy to. -treetops="${INPUT} ${LIB}" - -if $LINKS; then - echo 'Making internal symbolic directory links' - for file in $files; do - dest=`ls -ld $file | sed -n 's/.*-> //p'` - if [ "$dest" ]; then - cwd=`${PWDCMD-pwd}` - # In case $dest is relative, get to $file's dir first. - cd ${INPUT} - cd `echo ./$file | sed -n 's&[^/]*$&&p'` - # Check that the target directory exists. - # Redirections changed to avoid bug in sh on Ultrix. - (cd $dest) > /dev/null 2>&1 - if [ $? = 0 ]; then - cd $dest - # X gets the dir that the link actually leads to. - x=`${PWDCMD-pwd}` - # If link leads back into ${INPUT}, - # make a similar link here. - if expr $x : "${INPUT}/.*" > /dev/null; then - # Y gets the actual target dir name, relative to ${INPUT}. - y=`echo $x | sed -n "s&${INPUT}/&&p"` - # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}. - dots=`echo "$file" | - sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'` - echo $file '->' $dots$y ': Making link' - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s $dots$y ${LIB}/$file > /dev/null 2>&1 - else - # If the link is to outside ${INPUT}, - # treat this directory as if it actually contained the files. -# This line used to have $dest instead of $x. -# $dest seemed to be wrong for links found in subdirectories -# of ${INPUT}. Does this change break anything? - treetops="$treetops $x ${LIB}/$file" - fi - fi - cd $cwd - fi - done -fi - -# Completely replace <_int_varargs.h> with a file that defines -# va_list and gnuc_va_list - -file=_int_varargs.h -if [ -r ${INPUT}/$file ]; then - echo Replacing $file - cat > ${LIB}/$file << EOF -/* This file was generated by fixinc.dgux. */ -#ifndef __INT_VARARGS_H -#define __INT_VARARGS_H - -#ifndef ___int_features_h -#include -#endif - -#if !(defined(_VA_LIST) || defined(_VA_LIST_)) -#define _VA_LIST -#define _VA_LIST_ - -#ifdef __LINT__ - -#ifdef __STDC__ -typedef void * va_list; -#else -typedef char * va_list; -#endif - -#else -#if _M88K_ANY - -#if defined(__DCC__) - -typedef struct { - int next_arg; - int *mem_ptr; - int *reg_ptr; -} va_list; - -#else /* ! defined(__DCC__) */ - -typedef struct { - int __va_arg; /* argument number */ - int *__va_stk; /* start of args passed on stack */ - int *__va_reg; /* start of args passed in regs */ -} va_list; - -#endif /* ! defined(__DCC__) */ - -#elif _IX86_ANY - -#if defined(__GNUC__) || defined(__STDC__) -typedef void * va_list; -#else -typedef char * va_list; -#endif - -#endif /* _IX86_ANY */ - -#endif /* __LINT__ */ -#endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */ -#endif /* #ifndef __INT_VARARGS_H */ - -EOF - chmod a+r ${LIB}/$file -fi - -echo 'Removing unneeded directories:' -cd $LIB -files=`find . -type d -print | sort -r` -for file in $files; do - rmdir $LIB/$file > /dev/null 2>&1 -done - -if $LINKS; then - echo 'Making internal symbolic non-directory links' - cd ${INPUT} - files=`find . -type l -print` - for file in $files; do - dest=`ls -ld $file | sed -n 's/.*-> //p'` - if expr "$dest" : '[^/].*' > /dev/null; then - target=${LIB}/`echo file | sed "s|[^/]*\$|$dest|"` - if [ -f $target ]; then - ln -s $dest ${LIB}/$file >/dev/null 2>&1 - fi - fi - done -fi - -done - -exit 0 diff --git a/gcc/fixinc/fixinc.interix b/gcc/fixinc/fixinc.interix index d0fe4cfba78..1e5413eeb6a 100644 --- a/gcc/fixinc/fixinc.interix +++ b/gcc/fixinc/fixinc.interix @@ -1,165 +1,3 @@ #!/bin/sh rm -f include/stddef.h exit -# -# fixinc.interix -- Install modified versions of Interix system include -# files. -# -# Based on fixinc.sco script by Ian Lance Taylor (ian@airs.com)). -# With modifications by Douglas Rupp (drupp@cs.washington.edu) -# -# Copyright (C) 1999 Free Software Foundation, Inc. -# -# This file is part of GNU CC. -# -# GNU CC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU CC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU CC; see the file COPYING. If not, write to -# the Free Software Foundation, 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. -# -# ?????? fixup comment -# This script munges the native include files provided with Windows NT -# 3.5 SDK systems so as to provide a reasonable namespace when -# compiling with gcc. The header files by default do not -# provide many essential definitions and declarations if -# __STDC__ is 1. This script modifies the header files to check -# for __STRICT_ANSI__ being defined instead. Once munged, the -# resulting new system include files are placed in a directory -# that GNU C will search *before* searching the Include -# directory. -# -# See README-fixinc for more information. - -# Fail if no arg to specify a directory for the output. -if [ x$1 = x ] -then echo fixincludes: no output directory specified -exit 1 -fi - -# Directory in which to store the results. -LIB=${1} - -# Make sure it exists. -if [ ! -d $LIB ]; then - mkdir $LIB || exit 1 -fi - -ORIG_DIR=`${PWDCMD-pwd}` - -# Make LIB absolute if it is relative. -# Don't do this if not necessary, since may screw up automounters. -case $LIB in -/*) - ;; -*) - cd $LIB; LIB=`${PWDCMD-pwd}` - ;; -esac - -echo 'Building fixincludes in ' ${LIB} - -# Determine whether this filesystem has symbolic links. -if ln -s X $LIB/ShouldNotExist 2>/dev/null; then - rm -f $LIB/ShouldNotExist - LINKS=true -else - LINKS=false -fi - -echo 'Making directories:' -# Directory containing the original header files. -shift -if [ $# -eq 0 ] ; then - set /usr/include -fi - -INLIST="$@" - -for INPUT in ${INLIST} ; do -cd ${ORIG_DIR} -cd ${INPUT} - -if $LINKS; then - files=`ls -LR | sed -n s/:$//p` -else - files=`find . -type d -print | sed '/^\.$/d'` -fi - -if [ "x$files" = x ]; then - echo No files found in $INPUT\; skipped - continue -fi - -for file in $files; do - rm -rf $LIB/$file - if [ ! -d $LIB/$file ] - then mkdir $LIB/$file - fi -done - -# treetops gets an alternating list -# of old directories to copy -# and the new directories to copy to. -treetops="${INPUT} ${LIB}" - -set - $treetops -while [ $# != 0 ]; do - # $1 is an old directory to copy, and $2 is the new directory to copy to. - echo "Finding header files in $1:" - cd ${INPUT} - cd $1 - files=`find . -name '*.[hH]' -type f -print` - echo "Checking header files in $1; transforming into directory $2:" - for file in $files; do - echo " " $file - if [ -r $file ]; then - cp $file $2/$file >/dev/null 2>&1 || echo "Can't copy $file" - chmod +w,a+r $2/$file - -# The following have been removed from the sed command below -# because it is more useful to leave these things in. -# The only reason to remove them was for -pedantic, -# which isn't much of a reason. -- rms. -# ??? above/below -# /^[ ]*#[ ]*ident/d -# s/!__STDC__/!defined (__STRICT_ANSI__)/g - - sed -e '/#[ ]*include.*[<"][A-Za-z]:\\/ s,\\,/,g' \ - -e '/#[ ]*include.*[<"][A-Za-z]:\// s,\([A-Za-z]\):/,//\1/,' \ - -e '\,#[ ]*include.*[<"]//[A-Za-z]/, y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,' \ - -e '\,#[ ]*INCLUDE.*[<"]//[A-Za-z]/, s,INCLUDE,include,' \ - $2/$file > $2/$file.sed - - mv $2/$file.sed $2/$file - if cmp $file $2/$file >/dev/null 2>&1; then - rm $2/$file - else - echo Fixed $file - flip -u $2/$file - fi - fi - done - shift; shift -done - -echo 'Removing unneeded directories:' -# (Rmdir leaf to root, and if the rmdir fails, who cares....) -cd $LIB -files=`find . -type d -print | sort -r` -for file in $files; do - rmdir $LIB/$file > /dev/null 2>&1 -done - -done # for include directory list - -exit 0 -- cgit v1.2.1