[gnu.g++.bug] inlining math.h functions on SUN3

metz@iam.unibe.ch (Igor Metz) (07/10/89)

There is a little bug in math.h as distributed with g++ 1.35.1-. It will
include the asm inline code for math.h functions, but the code will instead
use jsr _xxx !!

You'll find the patch below.

Igor Metz                    X400: metz@iam.unibe.ch
Institut fuer Informatik     ARPA: metz%iam.unibe.ch@relay.cs.net
und angewandte Mathematik    UUCP: ..!uunet!mcvax!iam.unibe.ch!metz
Universitaet Bern
Switzerland		     Phone: (+41) 31 65 49 02


*** /usr/local/lib/g++-include/math.h	Tue Jun 13 14:05:25 1989
--- math.h	Mon Jul 10 11:22:43 1989
***************
*** 48,53 ****
--- 48,59 ----
  overload tan;
  overload tanh;
  
+ #ifdef __HAVE_68881__		/* MC68881/2 Floating-Point Coprocessor */
+ #include <math-68881.h>
+ /* Please add inline asm code for other machines here! */
+ 
+ #else
+ 
  extern "C" {
  
  double  acos(double);
***************
*** 100,105 ****
--- 106,113 ----
  
  }
  
+ #endif /* __HAVE_68881__ */
+ 
  /* libg++ doesn't use this since it is not available on some systems */
  
  /* the following ifdef is just for compiling OOPS */
***************
*** 180,188 ****
  #define PI2  M_PI_2
  #endif
  
- #ifdef __HAVE_68881__		/* MC68881/2 Floating-Point Coprocessor */
- #include <math-68881.h>
- /* Please add inline asm code for other machines here! */
- #endif
  
  #endif
--- 188,192 ----