On irix trunc is defined as "double trunc (double x)"
After including stdio.h I get

cc -o trunc1 trunc1.c -lm
trunc1
trunc(a): -1.000000
trunc(b): 1.000000

gcc -o trunc1 trunc1.c -lm
trunc1
trunc(a): -1.000000
trunc(b): 1.000000


> -----Original Message-----
> From: David L. Thompson [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, 15 December 1999 9:29
> To:   [email protected]
> Subject:      Re: [opendx-dev] LessTif Problems (bugs)
> 
> Yah! I've found the problem with the strange interactor problems of 
> the up and down arrows, etc. not working. It is not Lesstif and it is 
> not DX. It is the use of the trunc() function. This is not working on 
> my LinuxPPC machine. I have notified the LinuxPPC dev list and we'll 
> see if anybody can provide an explanation. If anybody else is having 
> problems with interactors not going up and down, etc. Try the 
> following little piece of code.
> 
> c
> gcc trunc1.c -lm
> a.out
> 
> If you get:
> -1
> 1
> 
> Then you're okay and your interactors should work fine.
> 
> If you don't, then there is a problem with your math librarie's trunc 
> function. The fix would be to edit include/dxconfig.h and change the 
> HAVE_TRUNC line.
> 
> Is anybody else, other than LinuxPPC users seeing this behavior?
> 
> Thanks,
> David
> 
> >Okay, now that the easy stuff is out of the way, I guess I roll up my
> sleeves
> >and dig in :) Does anyone else see this strange behaviour with the
> >interactors?? Especially on a different platform. Or better yet, does
> anyone
> >see the correct behavior with a similar setup?? I'm referring mainly to
> the
> >interactor problems. I can see the geometry problems, and the core dumps,
> I
> >just haven't located the code that is causing it yet.
> >
> >On 06-Dec-99 at 17:52, David L. Thompson ([EMAIL PROTECTED]) wrote:
> >  > I've compiled all of said things myself with gcc 2.95.2. I have
> >  > libc6, then compiled XFree86 3.3.5, and then LessTif, plus all the
> >  > gnome and enlightment stuff.
> >  >
> >  > David
> >  >
> >  > >Understood. Pretty much the same reason I got into LessTif. I don't
> know
> >  > >much about LinuxPPC. Do you have any idea how X, libc, and LessTif
> were
> >  > >compiled? The interactor problems sound like some of the strange
> reports
> >  > >we've  had when X
> >  > >was compiled with libc5, LessTif with libc6, or X was compiled with
> gcc
> >  > >2.7.2 and LessTif with egcs, and many other different combinations.
> I'm
> >  > >not sure of the exact details, but it seems that mixing and matching
> >  > >compilers/libs is not a good idea. Best if all of the components get
> >  > >compiled with the same tools. It's not always easy to tell, but if
> the
> >  > >LinuxPPC dist. comes with X, and you haven't upgraded the 
> >compilers and you
> >  > >compiled LessTif on this machine, everything is probably matched
> fairly
> >  > >well.
> >  > >I reproduced a couple of the "dumps", so I will start with
> those.....
> >  >
> >  > 
> >...................................................................... 
> >.......
> >  > David L. Thompson                          The University of Montana
> >  > mailto:[EMAIL PROTECTED]                 Computer Science
> Department
> >  > http://www.cs.umt.edu/u/dthompsn           Missoula, MT  59812
> >  >                                             Work Phone :
> (406)257-8530
> 
> ..........................................................................
> ....
> David L. Thompson                          The University of Montana
> mailto:[EMAIL PROTECTED]                 Computer Science Department
> http://www.cs.umt.edu/u/dthompsn           Missoula, MT  59812
>                                             Work Phone : (406)257-8530

Reply via email to