1 ?RCS: $Id: socksizetype.U,v $
3 ?RCS: Copyright (c) 2000 Jarkko Hietaniemi
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
9 Protochk Oldconfig Myread cat d_socket d_socklen_t sizetype
10 ?MAKE: -pick add $@ %<
12 ?S: This variable holds the type used for the size argument
13 ?S: for various socket calls like accept. Usual values include
14 ?S: socklen_t, size_t, and int.
17 ?C: This symbol holds the type used for the size argument
18 ?C: of various socket calls.
20 ?H:#define Sock_size_t $socksizetype /**/
24 : check for type of the size argument to socket calls
29 Checking to see what type is the last argument of accept().
31 hdrs="$define sys/types.h $d_socket sys/socket.h"
33 case "$d_socklen_t" in
34 "$define") yyy="$yyy socklen_t"
36 yyy="$yyy $sizetype int long"
38 case "$socksizetype" in
39 '') try="extern int accept(int, struct sockaddr *, $xxx *);"
40 if ./protochk "$try" $hdrs; then
41 echo "Your system accepts '$xxx *' for the last argument of accept()."
47 : In case none of those worked, prompt the user.
48 case "$socksizetype" in
49 '') rp='What is the type for the last argument to accept()?'
56 *) : no gethostbyaddr, so pick relatively harmless defaults