From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <896a8e3f7b8e6e7a50a7d889811c50a3.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199802120049.TAA07622@ulexite.nist.gov> Date: Wed, 11 Feb 1998 19:49:12 -0500 From: Michael J. Donahue Subject: Trouble with sockets while compiling Tcl 8.0 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 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