diff options
author | Manfred Hollstein <manfred@gcc.gnu.org> | 1998-05-08 01:17:24 +0000 |
---|---|---|
committer | Manfred Hollstein <manfred@gcc.gnu.org> | 1998-05-08 01:17:24 +0000 |
commit | 85c262ac41ebe512a3424b0a5580444c2ed44c95 (patch) | |
tree | 135defb230fb88456a97822b5aa64601bffde34a /gcc | |
parent | 749adefd03907c4dd0e039ad8cb6c4345a3b5bf7 (diff) | |
download | gcc-85c262ac41ebe512a3424b0a5580444c2ed44c95.zip gcc-85c262ac41ebe512a3424b0a5580444c2ed44c95.tar.gz gcc-85c262ac41ebe512a3424b0a5580444c2ed44c95.tar.bz2 |
Renamed fixinc.math to fixinc.wrap
From-SVN: r19627
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/fixinc.math | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/gcc/fixinc.math b/gcc/fixinc.math deleted file mode 100755 index a8a9fe7..0000000 --- a/gcc/fixinc.math +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh -# Fix struct exception in /usr/include/math.h. -# -# We expect several systems which did not need fixincludes in the past -# to need to fix just math.h. So we created a separate fixinc.math -# script to fix just that problem. -# See README-fixinc for more information. - -# Directory containing the original header files. -# (This was named INCLUDES, but that conflicts with a name in Makefile.in.) -INPUT=${2-${INPUT-/usr/include}} - -# 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 - -echo Building fixed headers in ${LIB} - -# Some math.h files define struct exception, which conflicts with -# the class exception defined in the C++ file std/stdexcept.h. We -# redefine it to __math_exception. This is not a great fix, but I -# haven't been able to think of anything better. -file=math.h -if [ -r $INPUT/$file ]; then - echo Checking $INPUT/$file - if grep 'struct exception' $INPUT/$file >/dev/null - then - echo Fixed $file - rm -f $LIB/$file - cat <<'__EOF__' >$LIB/$file -#ifndef _MATH_H_WRAPPER -#ifdef __cplusplus -# define exception __math_exception -#endif -#include_next <math.h> -#ifdef __cplusplus -# undef exception -#endif -#define _MATH_H_WRAPPER -#endif /* _MATH_H_WRAPPER */ -__EOF__ - # Define _MATH_H_WRAPPER at the end of the wrapper, not the start, - # so that if #include_next gets another instance of the wrapper, - # this will follow the #include_next chain until we arrive at - # the real <math.h>. - chmod a+r $LIB/$file - fi -fi -exit 0 |