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

Re: libc6 select problems?



> Ah well, maybe I can start on X next weekend.  It isn't really worth
> trying until we get more of this worked out (even if I do punt the
> -lpthread stuff, I'd rather not go further with a known broken libc
> when I've got useful small examples that break...)

Just as a side note, I've been fiddling with compiling X (hey, what else
am I going to do over the holidays?) and I've noticed a few minor problems.
Most of them revolve around not #including termios.h and in one case a
program needed to be compiled without -lpthread (it isn't part of the
distribution, it's used to generate one header file; this was easier than
fixing libc), but there are two major problems.
    Currently I can't compile the server because I'm missing ndbm.h.  This is
needed by the X server color routines (since, by default, Xsun uses a DBM file
instead of rgb.txt for its color database).  This could (and, IMHO, should)
be fixed by sticking a #define USE_RGB_TXT at the appropriate spot in the
config files.  The only trick is finding that spot, which shouldn't be too hard.
    The second problem prevents a few utilities from compiling and seems to be
a problem with gcc.  If you have a global filehandle and initalize it to be
equal to some pre-existing stream, such as stdout or stderr, gcc (2.7.2.3 on
Debian/Sparc) doesn't compile it and complains that "initalizer value not
constant".  However, if you use gcc on another platform it works okay.  In
short, this compiles:

    #include <stdio.h>
    void main() {
	FILE *foo = stdout;
	fprintf(foo, "Hi!\n");
    }

but not this:

    #include <stdio.h>
    FILE *foo = stdout;
    void main() {
	fprintf(foo, "Hi!\n");
    }

Both forms should work.  I don't know enough about what gcc does under the
hood to even pretend to know why the second form doesn't compile.  I'm just
curious to see if other people are experiencing the same sort of problems.

    Anyway, if you start working on X let me know and I'll give you a few
patches to play with, including all those that RedHat uses to make Xsun work
with Linux/Sparc.  Good luck.

-- 
Mike "No .sig for you" Shuey


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-sparc-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: