Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Daniel Gruner <dgruner@tikva.chem.utoronto.ca>
Subject: sockets and portability
Date: Mon, 7 Apr 1997 11:49:55 -0400 (EDT)	[thread overview]
Message-ID: <d274bfbd3ddd58159edff7cf2fd2b696.axp-list@archive.invalid> (raw)

Hi

Can anyone enlighten me as to why sys/socket.h on linux/alpha defines
functions like accept() and getsockname() using a "size_t *" 3rd
argument, while the rest of the world, including linux/intel use "int
*"?  This causes all sorts of portability problems.  Here is the
definition from linux/alpha (RH 4.0, kernel 2.0.27 + axp-diffs):

extern int accept __P ((int __fd, __SOCKADDR_ARG __addr,
								size_t *__addr_len));

while on intel it is

int accept __P ((int __sockfd, __const struct sockaddr *__peer,
					 int *__paddrlen));

Mind you, the compiler should automatically cast one to the other (after
all the two are only pointers), but it somehow doesn't and dies with

ksock.cpp:210: passing `int *' as argument 3 of `accept(int, sockaddr *, long un
signed int *)'

Daniel.

-- 

Dr. Daniel Gruner                        dgruner@tikva.chem.utoronto.ca
Dept. of Chemistry                       phone:  (416)-978-8689
University of Toronto                    fax:    (416)-978-5325

--
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:[~1997-04-07 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-07 15:49 Daniel Gruner [this message]
     [not found] <199704071549.LAA21600@tikva>
1997-04-07 16:27 ` sockets and portability Alvin Starr
     [not found] <Pine.OSF.3.91.970407121521.2467E-100000@caesar.iplink.net>
1997-04-07 16:37 ` Daniel Gruner
  -- strict thread matches above, loose matches on Subject: below --
1997-04-07 16:45 Michael Alan Dorman
1997-04-07 17:22 Philip Blundell
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