From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199802120936.KAA06354@stefan.sime.com> Date: Thu, 12 Feb 1998 10:36:04 +0100 From: Stefan Traby Subject: Re: Trouble with sockets while compiling Tcl 8.0 Hi Michal ! > > 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. ;-} The man pages are BSD like ! UNIX Network Programming (Stevens) says about BSD Sockets: int accept(int sockfd, struct sockaddr *peer, int *addrlen); But for all GNU software check first the info and then the man pages. glibc-info: - Function: int accept (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH-PTR) And look deep into the info file. (An _exact_ text on your problem...) --------- Throughout the following description at various places variables/parameters to denote sizes are required. And here the trouble starts. In the first implementations the type of these variables was simply `int'. This type was on almost all machines of this time 32 bits wide and so a de-factor standard required 32 bit variables. This is important since references to variables of this type are passed to the kernel. But now the POSIX people came and unified the interface with their words "all size values are of type `size_t'". But on 64 bit machines `size_t' is 64 bits wide and so variable references are not anymore possible. A solution provides the Unix98 specification which finally introduces a type `socklen_t'. This type is used in all of the cases in previously changed to use `size_t'. The only requirement of this type is that it is an unsigned type of at least 32 bits. Therefore, implementations which require references to 32 bit variables be passed can be as happy as implementations which right from the start of 64 bit values. -------- -- ciao - Stefan Stefan Traby phone: +43-3133-6107-2 Mitterlasznitzstr. 13 fax: +43-3133-6107-9 8302 Nestelbach mailto://stefan@sime.com Austria -- 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