Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Stefan Traby <stefan@sime.com>
Subject: Re: Trouble with sockets while compiling Tcl 8.0
Date: Thu, 12 Feb 1998 10:36:04 +0100	[thread overview]
Message-ID: <f682cfe37a011f5ddc8e7c019ac73991.axp-list@archive.invalid> (raw)

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

             reply	other threads:[~1998-02-12  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-12  9:36 Stefan Traby [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  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