diff options
author | Manfred Hollstein <manfred@s-direktnet.de> | 1997-12-16 22:51:00 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-16 15:51:00 -0700 |
commit | ade7386a03439cde2997eb321da42f0f77c771f4 (patch) | |
tree | cc42e39d77a3a433ee763d6e9fe3505ecef60656 /gcc | |
parent | a24ebe1badf00553185c196c79f1e756e26a6a57 (diff) | |
download | gcc-ade7386a03439cde2997eb321da42f0f77c771f4.zip gcc-ade7386a03439cde2997eb321da42f0f77c771f4.tar.gz gcc-ade7386a03439cde2997eb321da42f0f77c771f4.tar.bz2 |
fixincludes (size_t): Add support for Motorola's stdlib.h which fails to provide a definition for size_t.
* fixincludes (size_t): Add support for Motorola's stdlib.h
which fails to provide a definition for size_t.
(fabs/hypot): Provide a prototype for fabs on m88k-motorola-sysv3.
(strlen,strspn,strcspn return value): Handle different layout on sysV88.
(hypot): Provide a fake for hypot for m88k-motorola-sysv3.
Fixes from Manfred.
From-SVN: r17120
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rwxr-xr-x | gcc/fixincludes | 15 |
2 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22c3463..64ba2e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ Tue Dec 16 23:44:54 1997 Manfred Hollstein <manfred@s-direktnet.de> + * fixincludes (size_t): Add support for Motorola's stdlib.h + which fails to provide a definition for size_t. + (fabs/hypot): Provide a prototype for fabs on m88k-motorola-sysv3. + (strlen,strspn,strcspn return value): Handle different layout on sysV88. + (hypot): Provide a fake for hypot for m88k-motorola-sysv3. + * m68k/xm-mot3300.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Define to prevent unresolved externals in libio. * m88k/xm-sysv3.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Likewise. @@ -121,7 +127,7 @@ Fri Oct 10 17:58:31 CEST 1997 Marc Lehmann <pcg@goof.com> Thu Dec 11 23:55:17 1997 Manfred Hollstein <manfred@s-direktnet.de> - * fixincludes (str{len,spn,cspn} return value): Handle different + * fixincludes (strlen,strspn,strcspn return value): Handle different layout on sysV88. (hypot): Provide a fake for hypot which is broken on m88k-motorola-sysv3. diff --git a/gcc/fixincludes b/gcc/fixincludes index 80032e6..42d81b9 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -366,6 +366,13 @@ for file in sys/types.h stdlib.h sys/stdtypes.h stddef.h memory.h unistd.h; do if [ -r ${LIB}/$file ]; then echo Fixing size_t, ptrdiff_t and wchar_t in $file sed \ + -e '/^[ ]*\*[ ]*typedef unsigned int size_t;/N' \ + -e 's/^\([ ]*\*[ ]*typedef unsigned int size_t;\n[ ]*\*\/\)/\1\ +#ifndef __SIZE_TYPE__\ +#define __SIZE_TYPE__ long unsigned int\ +#endif\ +typedef __SIZE_TYPE__ size_t;\ +/' \ -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/i\ #ifndef __SIZE_TYPE__\ #define __SIZE_TYPE__ long unsigned int\ @@ -2300,6 +2307,8 @@ done # libm.a on m88k-motorola-sysv3 contains a stupid optimization for function # hypot(), which returns the second argument without even looking at its value # if the other is 0.0 +# Another drawback is that fix-header doesn't fix fabs' prototype, and I have +# no idea why. file=math.h if [ $target_canonical = m88k-motorola-sysv3 ]; then if [ -r $file ] && [ ! -r ${LIB}/$file ]; then @@ -2309,8 +2318,10 @@ if [ $target_canonical = m88k-motorola-sysv3 ]; then fi if [ -r ${LIB}/$file ]; then - echo Fixing $file, hypot definition - sed -e '/^extern double hypot();$/a\ + echo Fixing $file, fabs/hypot definition + sed \ + -e 's/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/' \ + -e '/^extern double hypot();$/a\ \/* Workaround a stupid Motorola optimization if one\ of x or y is 0.0 and the other is negative! *\/\ #ifdef __STDC__\ |