Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
Subject: Re: Trouble with sockets while compiling Tcl 8.0
Date: Wed, 11 Feb 1998 22:30:13 -0700 (MST)	[thread overview]
Message-ID: <4531a07dbd2e37acc085cca44fd30c6c.axp-list@archive.invalid> (raw)
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 <linux/stddef.h> 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

       reply	other threads:[~1998-02-12  5:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199802120049.TAA07622@ulexite.nist.gov>
1998-02-12  5:30 ` Michal Jaegermann [this message]
1998-02-12  9:36 Trouble with sockets while compiling Tcl 8.0 Stefan Traby
  -- strict thread matches above, loose matches on Subject: below --
1998-02-12  0:49 Michael J. Donahue
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox