Re: nhc98-1.0pre17



About this list Date view Thread view Subject view Author view

Malcolm Wallace (malcolm-nhc@cs.york.ac.uk)
Wed, 22 Mar 2000 12:07:49 +0000


Mike, > make all on NT for Pre 17 goes well until this point (which I believe is the > trace package): > > cd src/compiler98; make CFG=T HC=nhc98 install > //d/lang/nhc98-1.0pre17/script/hmake -nhc98 -DDBGTRANS > -d d:/lang/nhc98-1.0pre17/targets/ix86-CYGWIN_NT-4.0/obj/compiler98 > Main > > //d/lang/nhc98-1.0pre17/script/hmake: compilerstyle: command not found > IO system error (ENOENT): No such file or directory > Stop - hmake dependency error. The "compilerstyle: command not found" error is a little bit worrying, but I don't yet have any idea what is causing it. The "No such file or directory" error is a bug in the new implementation of the standard Directory library in nhc98. It only manifests in programs compiled by nhc98-1.0pre17, most noticeably in hmake. A quick by-hand patch (below) will solve this, and we'll make a new pre-release with this and other fixes in a couple of days. In src/prelude/Directory/DoesFileExist.gc, lines 24-34: %fun primDoesFileExist :: FilePath -> IO (Int,Bool) %call (filePath fp) %code % struct stat st; % err = stat(fp,&st); % if ((err==0) && S_ISREG(st.st_mode)) b=TRUE; - % else b=FALSE; + % else { + % err=0; /* MUST reset err flag! */ + % b=FALSE; % } %result (int err, bool b) In src/prelude/Directory/DoesFileExist_.c, lines 18-25: /* User code starts here */ struct stat st; err = stat(fp,&st); if ((err==0) && S_ISREG(st.st_mode)) b=TRUE; - else b=FALSE; + else { + err=0; /* MUST reset err flag! */ + b=FALSE; + } /* User code ends here */ Regards, Malcolm -------------------------------------------------------------------- To unsubscribe, send a message containing the word `unsubscribe' to: nhc-users-request@cs.york.ac.uk --------------------------------------------------------------------


About this list Date view Thread view Subject view Author view