[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#915334: Details on faulty code section + proposal



Good Day,

It seems that, since GlibC 2.28, a hack in ipl/cfuncs/fpoll.c
fails to detect the newer level of Gnu operating system, as the
definition of _STDIO_USES_IOSTREAM seems to be have been
dropped.  The following patch completely drops support for older
Gnu libraries:

--- icon-9.4.3.orig/ipl/cfuncs/fpoll.c
+++ icon-9.4.3/ipl/cfuncs/fpoll.c
@@ -59,12 +59,9 @@ int fpoll(int argc, descriptor *argv)	/*

    /* check for data already in buffer */
    /* there's no legal way to do this in C; we cheat */
-#if defined(__GLIBC__) && defined(_STDIO_USES_IOSTREAM)	/* new GCC library */
+#if defined(__GLIBC__)
    if (f->_IO_read_ptr < f->_IO_read_end)
       RetArg(1);
-#elif defined(__GLIBC__)				/* old GCC library */
-   if (f->__bufp < f->__get_limit)
-      RetArg(1);
 #elif defined(_FSTDIO)					/* new BSD library */
    if (f->_r > 0)
       RetArg(1);

I have no idea if this is a good course of action, and am not
exactly happy with my patch, but it does fix the build in
Unstable without breaking Stable or Testing, according to my few
tests.

Haven't had much issues rebuilding my Noweb documents/programs
afterwards, but I have just the "iconx" package installed.

I hope this helps,
-- 
Étienne Mollier <etienne.mollier@mailoo.org>


Reply to: