errno fix



About this list Date view Thread view Subject view Author view

Malcolm Wallace (malcolm-nhc@cs.york.ac.uk)
Wed, 8 Mar 2000 11:48:29 +0000


Mike, > Re the new Pre 16 sources, I get a link error about errno when compiling > from the C sources: > > d:/lang/nhc98-1.0pre16/lib/ix86-CYGWIN_NT-4.0/Prelude.a(PatchIOError_.o) > (.text+0xa):PatchIOError_.: undefined reference to `errno' Here is a patch to fix this, for both C and Haskell builds. Regards, Malcolm **** cut here **** diff -u src/prelude/Directory/PatchIOError.gc.old src/prelude/Directory/PatchIOError.gc --- PatchIOError.gc.old Tue Feb 8 15:52:55 2000 +++ PatchIOError.gc Wed Mar 8 11:39:23 2000 @@ -6,7 +6,7 @@ %-#include <sys/stat.h> %-#include <unistd.h> -%-extern int errno; +%-#include <errno.h>; %fun readErrNo :: () -> IO ErrNo %call () diff -u src/prelude/Directory/PatchIOError_.c.old src/prelude/Directory/PatchIOError_.c --- PatchIOError_.c.old Wed Mar 8 11:40:10 2000 +++ PatchIOError_.c Wed Mar 8 11:40:43 2000 @@ -1,7 +1,7 @@ #include <haskell2c.h> #include <sys/stat.h> #include <unistd.h> -extern int errno; +#include <errno.h> C_HEADER (gr_readErrNo) { NodePtr nodeptr; -------------------------------------------------------------------- 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