Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!decuac!lemans.dec.com!libove.det.dec.com!libove From: libove@libove.det.dec.com (Jay Libove) Newsgroups: comp.sources.games.bugs Subject: Nethack 3 PL 9 on SCO Unix and const declarations Keywords: SCO,Unix,nethack,const Message-ID: <11@lemans.dec.com> Date: 9 Jul 90 16:21:51 GMT Sender: news@lemans.dec.com Reply-To: libove@kamet.enet.dec.com Distribution: usa Organization: Digital Equipment Corporation, Detroit Ultrix Resource Center Lines: 28 I brought my nethack 3 sources up to patchlevel 9 on a SCO Unix 3.2.0 (80386 based) machine, compiled, ran, and found the following three problems: 1) any call to the yn_function() function ended up losing the 'resp' parameter - tracing in a debugger showed that the resp parameter was empty. The def parameter however was maintained properly. 2) having, method not being given because the overall solution took care of this too, gotten past the yn_function() problem, trying to save the game caused an IOT trap and killed the program. 3) an inventory listing titled every section 'Illegal Objects' The solution to all of these problems was to add -Dconst= to the compiler command line... it seems that the SCO C compiler (the default, Microsoft C compiler) doesn't handle the 'const' declarations used in nethack 3 (patchlevel 9) properly. I hope this is of some use to others who try to run nethack on a SCO platform... the problems I listed above immediately went away when I recompiled with -Dconst= so now I have to play some to see if I can uncover any more SCO problems... Does anyone have an explanation why the use of the const keyword caused SCO's compiler to generate non-working code? -Jay Libove libove@kamet.enet.dec.com decwrl!kamet.enet.dec.com!libove