hugs compilation error on Debian woody

William Lee Irwin III wli@holomorphy.com
Wed, 10 Jan 2001 20:07:57 -0800


--dWYAkE0V1FpFQHQ3
Content-Type: text/plain; charset=us-ascii
Content-Description: brief message
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=3D*.in --exclude=3Dconfigure --exclude=3D*.h --exclude=
=3Dhugs.* 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!=3DHCLOSED) {
-#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 @@
 }
=20
 primFun(primHSetPosn) {			/* Set file position               */
-#if HAVE_FSETPOS
+#if HAVE_FSETPOS && !defined(__linux__)
     fpos_t pos =3D 0;
 #elif HAVE_FSEEK
     long   pos =3D 0;
@@ -735,7 +735,7 @@
     HandleArg(h,3);
     IntArg(pos,4);
     if (handles[h].hmode!=3DHCLOSED) {
-#if HAVE_FSETPOS
+#if HAVE_FSETPOS && !defined(__linux__)
 	if (fsetpos(handles[h].hfp,&pos)) {
 	    IOReturn(nameUnit);
 	}

--dWYAkE0V1FpFQHQ3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6XTGdD5IAOwBGvKIRAm+JAJ9H41YYktJxwBZJjHAmDJbSgZCmeQCfSXEq
4CTJsc7ea25r8DZltSWXoF8=
=zSkg
-----END PGP SIGNATURE-----

--dWYAkE0V1FpFQHQ3--