GOOD NEWS!
If got it running (tested it on 10.1.4) but will work on a clean 10.1.6 too.
The SIGFPE handler can be removed, im unable to test it on a different PC btw
at the moment..
Code: Select all
newLISP v.10.1.4 on OS/2 IPv4, execute 'newlisp -h' for more info.
(MAIN)-> (sqrt -1)
nan
(MAIN)-> (log 0)
-inf
(MAIN)-> (log -1)
nan
(MAIN)-> (atan -1)
-0.7853981634
(MAIN)-> (mod -1)
-1
(MAIN)-> (% -1 0)
ERR: division by zero in function %
(MAIN)-> (/ 0 0)
ERR: division by zero in function /
(MAIN)->
This is what I added to the newlisp.c (above inside main())
I did test befor this section below, I dont know what I did differently
but now its working..
Code: Select all
/* Unmask all floating-point exceptions. */
#ifdef OS2
/* _clear87(); */
_fpreset();
/* _control87( PC_53, MCW_RC ); */
#endif
initLocale();
initNewlispDir();
IOchannel = stdin;
initialize();
initStacks();
initDefaultInAddr(); /* nl-sock.c */
(the 87? the OS/2 Kernel? the Libc/gcc? its again in the dark ;-)
Anyway it works now overhere without Stack swapping..
PS: perhpas this should be default anyway in newlisp for all machines?
As it might be a hardware issue..