From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4531a07dbd2e37acc085cca44fd30c6c.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199802120530.WAA04070@ellpspace.math.ualberta.ca> Date: Wed, 11 Feb 1998 22:30:13 -0700 (MST) From: Michal Jaegermann Subject: Re: Trouble with sockets while compiling Tcl 8.0 In-Reply-To: <199802120049.TAA07622@ulexite.nist.gov> > > I'm trying to build Tcl 8.0p2 on my linux/axp/RedHat 4.1 box, >From everything I know about it Tcl is, unfortunately, broken as distributed and always was. None of versions I tried was able to get through, on Alpha, through its own self-test. Not that I spent a lot of time on that code. > running into some trouble with some of the socket code. To be > specific, my /usr/include/sys/socket.h file gives: Always believe in system headers. They have precedence over what some outside code is trying to say. > extern int accept __P ((int __fd, __SOCKADDR_ARG __addr,size_t *__addr_len)); ^^^^ Not that I have here a copy of a POSIX standard here to check, but I believe that this is what it requires. Other functions as well. > However, the man pages and the Tcl code say the last arg in each case > should be (int *) instead of (size_t *). Both man page and Tcl should be corrected. Not that this makes, unfortunately, a real difference on machines on which sizeof(int) == sizeof(size_t). > > This is a problem, because size_t is apparently getting set in > > /usr/lib/gcc-lib/alpha-linux/2.7.2.1/include/stddef.h > > as (long unsigned int), Like it should be if I interpret C standard correctly. In any case C standard does not prescribe directly some particular size to size_t and programs assuming that it is the same as sizeof(int) are simply broken. > Incidentally, my file gives > > #ifndef _SIZE_T > #define _SIZE_T > typedef unsigned int size_t; > #endif This may be used internally by a kernel. Libraries do not have to follow that (not that this is not causing problems right now when we are switching to glibc2, a.k.a. libc6, and this separation bites here and there :-\ ). > And is any of > this different in latter releases of RH? No, AFAIK, and it will not be. Michal -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com