Article View: comp.windows.x
Article #37188gcc 1.37, sun3 version, and X11R4
From: Andy Fyfe
Date: Thu, 22 Feb 1990 02:52
Date: Thu, 22 Feb 1990 02:52
28 lines
1516 bytes
1516 bytes
[This message has already been sent to bug-gcc@prep.ai.mit.edu.]
It was previously reported that when the X server was compiled on a sun3
with gcc 1.37 it failed to correctly draw wide lines. The posting pointed
out that if the file server/ddx/mi/miwideline.c was compiled with cc the
problem went away. As it turns out, the problem is that the function
hypot() is not declared in the file math-68881.h which we include here
when __HAVE_68881__ is defined. Gcc assumes hypot() returns an int and
bad things happen. The following patch adds hypot() to math-68881.h.
Two files need to be recompiled, miwideline.c and miarc.c, as both call
hypot(). [Aside -- using gcc and the inline math functions, the server
Xsun can be build without -lm.]
*** math-68881.h Wed Feb 14 01:07:28 1990
--- /usr/local/lib/gcc-include/math-68881.h Wed Feb 21 12:01:32 1990
***************
*** 250,253 ****
--- 250,258 ----
}
+ __inline static const double hypot (const double x, const double y)
+ {
+ return sqrt(x*x + y*y);
+ }
+
__inline static const double pow (const double x, const double y)
{
Technical Details
Message-ID:
<13938@cit-vax.Caltech.Edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!cit-vax!andyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!cit-vax!andy From: andy@cit-vax.Caltech.Edu (Andy Fyfe) Newsgroups: comp.windows.x Subject: gcc 1.37, sun3 version, and X11R4 Message-ID: <13938@cit-vax.Caltech.Edu> Date: 22 Feb 90 02:52:08 GMT Reply-To: andy@csvax.caltech.edu (Andy Fyfe) Organization: California Institute of Technology Lines: 28