This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix .gitignore: only ignore 'perl' in root of repo, not U/perl subdir
[metaconfig.git] / U / perl / d_socklen_t.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 2000, Jarkko Hietaniemi
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic License,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
10 ?RCS:
11 ?MAKE:d_socklen_t: Inhdr cat rm_try Setvar Compile d_socket sizetype
12 ?MAKE:  -pick add $@ %<
13 ?S:d_socklen_t:
14 ?S:     This symbol will be defined if the C compiler supports socklen_t.
15 ?S:.
16 ?C:HAS_SOCKLEN_T:
17 ?C:     This symbol will defined if the C compiler supports socklen_t.
18 ?C:     Usually the <sys/socket.h> needs to be included.
19 ?C:.
20 ?H:#$d_socklen_t     HAS_SOCKLEN_T               /**/
21 ?H:.
22 ?LINT:set d_socklen_t
23 : check for socklen_t
24 echo " "
25 echo "Checking to see if you have socklen_t..." >&4
26 $cat >try.c <<EOCP
27 #include <sys/types.h>
28 #$d_socket HAS_SOCKET
29 #ifdef HAS_SOCKET
30 #include <sys/socket.h>
31 #endif
32 int main() { socklen_t x = 16; }
33 EOCP
34 set try
35 if eval $compile; then
36         val="$define"
37         echo "You have socklen_t."
38 else
39         val="$undef"
40         echo "You do not have socklen_t."
41         case "$sizetype" in
42         size_t) echo "(You do have size_t, that might work. Some people are happy with just an int.)" ;;
43         esac
44 fi
45 $rm_try
46 set d_socklen_t
47 eval $setvar
48