hugs compilation error on Debian woody
In file included from builtin.c:1431: iomonad.c: In function `primHGetPosn': iomonad.c:715: aggregate value used where an integer was expected iomonad.c: In function `primHSetPosn': iomonad.c:730: invalid initializer iomonad.c:736: incompatible types in assignment is the error I'm encountering. It seems to be that the semantics of fgetpos and fsetpos in glibc have changed. What I've come up with is a hack, but it appears to restore hugs to a state where it can compile. A unified diff which appears to repair these errors follows: diff -urN --exclude=*.in --exclude=configure --exclude=*.h --exclude=hugs.* hugs98/src/iomonad.c hugs98-98.200002/src/iomonad.c --- hugs98/src/iomonad.c Tue Feb 29 02:29:00 2000 +++ hugs98-98.200002/src/iomonad.c Wed Jan 10 19:10:05 2001 @@ -709,7 +709,7 @@ Int h; HandleArg(h,3); if (handles[h].hmode!=HCLOSED) { -#if HAVE_FGETPOS +#if HAVE_FGETPOS && !defined(__linux__) fpos_t pos; if (fgetpos(handles[h].hfp,&pos)) { IOReturn(mkInt((Int)pos)); @@ -726,7 +726,7 @@ } primFun(primHSetPosn) { /* Set file position */ -#if HAVE_FSETPOS +#if HAVE_FSETPOS && !defined(__linux__) fpos_t pos = 0; #elif HAVE_FSEEK long pos = 0; @@ -735,7 +735,7 @@ HandleArg(h,3); IntArg(pos,4); if (handles[h].hmode!=HCLOSED) { -#if HAVE_FSETPOS +#if HAVE_FSETPOS && !defined(__linux__) if (fsetpos(handles[h].hfp,&pos)) { IOReturn(nameUnit); }
participants (1)
-
William Lee Irwin III