Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michael J. Donahue <donahue@ulexite.nist.gov>
Subject: Trouble with sockets while compiling Tcl 8.0
Date: Wed, 11 Feb 1998 19:49:12 -0500	[thread overview]
Message-ID: <896a8e3f7b8e6e7a50a7d889811c50a3.axp-list@archive.invalid> (raw)

I'm trying to build Tcl 8.0p2 on my linux/axp/RedHat 4.1 box, and
running into some trouble with some of the socket code.  To be
specific, my /usr/include/sys/socket.h file gives:

extern int accept __P ((int __fd, __SOCKADDR_ARG __addr,size_t *__addr_len));
extern int getpeername __P ((int __fd, __SOCKADDR_ARG __addr,size_t *__len));
extern int getsockname __P ((int __fd, __SOCKADDR_ARG __addr,size_t *__len));
extern int getsockopt __P ((int __fd, int __level, int __optname,
                            __ptr_t __optval, size_t *__optlen));

However, the man pages and the Tcl code say the last arg in each case
should be (int *) instead of (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), which is 8 bytes wide rather than the 4 bytes
for an (int).  Incidentally, my <linux/stddef.h> file gives

   #ifndef _SIZE_T
   #define _SIZE_T
   typedef unsigned int size_t;
   #endif

So, should the "len" arg in the above calls be (int *) or (size_t *)?
Is size_t suppose to be unsigned int or unsigned long?  And is any of
this different in latter releases of RH?

TIA,

-mike

-- 
Michael J. Donahue
National Institute of Standards and Technology
Mathematical & Computational Sciences Division
Bldg 820, Rm 365
Gaithersburg, MD 20899
email: michael.donahue@nist.gov
voice: (301) 975-5424
  fax: (301) 990-4127
  web: http://math.nist.gov/mcsd/Staff/MDonahue/

-- 
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  0:49 UTC|newest]

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