Nigel Somerfield wrote:

> Hi,
>
> Trying to install rpm package on redhat 7 fails with:
>
> error: failed dependencies:
>  libncurses.so.4 is needed by hugs98-Feb2000-1
>  libreadline.so.3 is needed by hugs98-Feb2000-1
>
> tried to compile source, didn't work either reports and error from
> builtin.c in iomonad.c line 715.
>
> HELP! I need this to work on a project for University.

I've included a patch that should let you work around the problems in
iomonad.c.

--Jeff


Index: iomonad.c
===================================================================
RCS file: /home/cvs/root/hugs98/src/iomonad.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -c -r1.9 -r1.10
*** iomonad.c   2000/05/05 15:49:52     1.9
--- iomonad.c   2000/10/06 00:45:07     1.10
***************
*** 19,26 ****
   * included in the distribution.
   *
   * $RCSfile: iomonad.c,v $
!  * $Revision: 1.9 $
!  * $Date: 2000/05/05 15:49:52 $
   * ------------------------------------------------------------------------*/
   
  Name nameIORun;                               /* run IO code                     */
--- 19,26 ----
   * included in the distribution.
   *
   * $RCSfile: iomonad.c,v $
!  * $Revision: 1.10 $
!  * $Date: 2000/10/06 00:45:07 $
   * ------------------------------------------------------------------------*/
   
  Name nameIORun;                               /* run IO code                     */
***************
*** 711,723 ****
      Int h;
      HandleArg(h,3);
      if (handles[h].hmode!=HCLOSED) {
! #if HAVE_FGETPOS
!       fpos_t pos;
!       if (fgetpos(handles[h].hfp,&pos)) {
!           IOReturn(mkInt((Int)pos));
!       }
! #elif HAVE_FTELL
!       /* A reasonable approximation for pre-ANSI compilers */
        long pos = ftell(handles[h].hfp);
        IOReturn(mkInt((Int)pos));
  #else
--- 711,717 ----
      Int h;
      HandleArg(h,3);
      if (handles[h].hmode!=HCLOSED) {
! #if HAVE_FTELL
        long pos = ftell(handles[h].hfp);
        IOReturn(mkInt((Int)pos));
  #else
***************
*** 728,748 ****
  }
  
  primFun(primHSetPosn) {                       /* Set file position               */
! #if HAVE_FSETPOS
!     fpos_t pos = 0;
! #elif HAVE_FSEEK
      long   pos = 0;
  #endif
      Int    h;
      HandleArg(h,3);
      IntArg(pos,4);
      if (handles[h].hmode!=HCLOSED) {
! #if HAVE_FSETPOS
!       if (fsetpos(handles[h].hfp,&pos)) {
!           IOReturn(nameUnit);
!       }
! #elif HAVE_FSEEK
!       /* A reasonable approximation for pre-ANSI compilers */
        if (fseek(handles[h].hfp,pos,SEEK_SET)) {
            IOReturn(nameUnit);
        }
--- 722,735 ----
  }
  
  primFun(primHSetPosn) {                       /* Set file position               */
! #if HAVE_FSEEK
      long   pos = 0;
  #endif
      Int    h;
      HandleArg(h,3);
      IntArg(pos,4);
      if (handles[h].hmode!=HCLOSED) {
! #if HAVE_FSEEK
        if (fseek(handles[h].hfp,pos,SEEK_SET)) {
            IOReturn(nameUnit);
        }

Reply via email to