diff options
author | Richard Stallman <rms@gnu.org> | 1992-03-18 05:21:50 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-03-18 05:21:50 +0000 |
commit | 3308e40acfa587d7d7971f1bc2bbc90cdad022b7 (patch) | |
tree | b0a2eec659a5067148b4cfd36b16babdec932efa /gcc | |
parent | 1a2ef701e7e7fab9ef51e79bf6b34136c6ff1b1b (diff) | |
download | gcc-3308e40acfa587d7d7971f1bc2bbc90cdad022b7.zip gcc-3308e40acfa587d7d7971f1bc2bbc90cdad022b7.tar.gz gcc-3308e40acfa587d7d7971f1bc2bbc90cdad022b7.tar.bz2 |
*** empty log message ***
From-SVN: r516
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/fixincludes | 28 | ||||
-rw-r--r-- | gcc/ginclude/stddef.h | 15 |
2 files changed, 29 insertions, 14 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index c3b749c..413eefe 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -43,11 +43,9 @@ fi echo 'Making directories:' cd ${INPUT} -if $LINKS; then - files=`ls -LR | sed -n s/:$//p` -else - files=`find . -type d -print | sed '/^.$/d'` -fi +# Find all directories and all symlinks that point to directories. +files=` find . -type d -print | sed '/^.$/d' + $LINKS && find . -type l -exec test -d '{}' \; -print` for file in $files; do rm -rf $LIB/$file if [ ! -d $LIB/$file ] @@ -110,10 +108,12 @@ while [ $# != 0 ]; do for file in $files; do # This call to egrep is essential, since checking a file with egrep # is much faster than actually trying to fix it. +# It is also essential that most files *not* match! +# Thus, matching every #endif is unacceptable. # But the argument to egrep must be kept small, or many versions of egrep # won't be able to handle it. # rms: I removed `|#[el].*if.*[^/ ]' because it made egrep fail. - if egrep '[ _]_IO|CTRL|#define.NULL|#[el]*if.*([0-9]|#e[nl]|sparc|vax|sun|pyr)' $file > /dev/null; then + if egrep '[ _]_IO|CTRL|#define.NULL|#[el]*if.*([0-9]|sparc|vax|sun|pyr)' $file > /dev/null; then echo Fixing $file if [ -r $file ]; then cp $file $2/$file >/dev/null 2>&1 \ @@ -194,8 +194,8 @@ if [ -r ${LIB}/$file ]; then ex ${LIB}/$file <<EOF /size_t.*;/ i -#ifndef _SIZE_T -#define _SIZE_T +#ifndef _GCC_SIZE_T +#define _GCC_SIZE_T . /size_t/+1 i @@ -203,8 +203,8 @@ if [ -r ${LIB}/$file ]; then . /ptrdiff_t.*;/ i -#ifndef _PTRDIFF_T -#define _PTRDIFF_T +#ifndef _GCC_PTRDIFF_T +#define _GCC_PTRDIFF_T . /ptrdiff_t/+1 i @@ -212,8 +212,8 @@ if [ -r ${LIB}/$file ]; then . /wchar_t.*;/ i -#ifndef _WCHAR_T -#define _WCHAR_T +#ifndef _GCC_WCHAR_T +#define _GCC_WCHAR_T . /wchar_t/+1 i @@ -239,8 +239,8 @@ if [ -r ${LIB}/$file ]; then ex ${LIB}/$file <<EOF /size_t.*;/ i -#ifndef _SIZE_T -#define _SIZE_T +#ifndef _GCC_SIZE_T +#define _GCC_SIZE_T . /size_t/+1 i diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h index 9ceb469..ffd8c62 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -16,45 +16,57 @@ /* Signed type of difference of two pointers. */ #ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */ +#ifndef _T_PTRDIFF_ #ifndef _T_PTRDIFF #ifndef __PTRDIFF_T #ifndef _PTRDIFF_T_ #ifndef ___int_ptrdiff_t_h +#ifndef _GCC_PTRDIFF_T #define _PTRDIFF_T +#define _T_PTRDIFF_ #define _T_PTRDIFF #define __PTRDIFF_T #define _PTRDIFF_T_ #define ___int_ptrdiff_t_h +#define _GCC_PTRDIFF_T #ifndef __PTRDIFF_TYPE__ #define __PTRDIFF_TYPE__ long int #endif typedef __PTRDIFF_TYPE__ ptrdiff_t; +#endif /* _GCC_PTRDIFF_T */ #endif /* ___int_ptrdiff_t_h */ #endif /* _PTRDIFF_T_ */ #endif /* __PTRDIFF_T */ #endif /* _T_PTRDIFF */ +#endif /* _T_PTRDIFF_ */ #endif /* _PTRDIFF_T */ /* Unsigned type of `sizeof' something. */ #ifndef _SIZE_T /* in case <sys/types.h> has defined it. */ +#ifndef _T_SIZE_ #ifndef _T_SIZE #ifndef __SIZE_T #ifndef _SIZE_T_ #ifndef ___int_size_t_h +#ifndef _GCC_SIZE_T #define _SIZE_T +#define _T_SIZE_ #define _T_SIZE #define __SIZE_T #define _SIZE_T_ #define ___int_size_t_h +#define _GCC_SIZE_T #ifndef __SIZE_TYPE__ #define __SIZE_TYPE__ long unsigned int #endif typedef __SIZE_TYPE__ size_t; +#endif /* _GCC_SIZE_T */ #endif /* ___int_size_t_h */ #endif /* _SIZE_T_ */ #endif /* __SIZE_T */ #endif /* _T_SIZE */ +#endif /* _T_SIZE_ */ #endif /* _SIZE_T */ /* Data type for wide chars. */ @@ -65,12 +77,14 @@ typedef __SIZE_TYPE__ size_t; #ifndef __WCHAR_T #ifndef _WCHAR_T_ #ifndef ___int_wchar_t_h +#ifndef _GCC_WCHAR_T #define _WCHAR_T #define _T_WCHAR_ #define _T_WCHAR #define __WCHAR_T #define _WCHAR_T_ #define ___int_wchar_t_h +#define _GCC_WCHAR_T #ifndef __WCHAR_TYPE__ #define __WCHAR_TYPE__ int #endif @@ -81,6 +95,7 @@ typedef __WCHAR_TYPE__ wchar_t; #endif #endif #endif +#endif #endif /* __sys_stdtypes_h */ |