This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig: new round of the _r units.
[metaconfig.git] / U / threads / d_gethostbyaddr_r.U
1 ?MAKE:d_gethostbyaddr_r gethostbyaddr_r_proto: Inlibc Protochk i_systypes i_netdb
2 ?MAKE:  -pick add $@ %<
3 ?S:d_gethostbyaddr_r:
4 ?S:     This variable conditionally defines the HAS_GETHOSTBYADDR_R symbol,
5 ?S:     which indicates to the C program that the gethostbyaddr_r()
6 ?S:     routine is available.
7 ?S:.
8 ?S:gethostbyaddr_r_proto:
9 ?S:     This variable encodes the prototype of gethostbyaddr_r.
10 ?S:.
11 ?C:HAS_GETHOSTBYADDR_R:
12 ?C:     This symbol, if defined, indicates that the gethostbyaddr_r routine
13 ?C:     is available to gethostbyaddr re-entrantly.
14 ?C:.
15 ?C:GETHOSTBYADDR_R_PROTO:
16 ?C:     This symbol encodes the prototype of gethostbyaddr_r.
17 ?C:.
18 ?H:#$d_gethostbyaddr_r HAS_GETHOSTBYADDR_R         /**/
19 ?H:#define GETHOSTBYADDR_R_PROTO $gethostbyaddr_r_proto    /**/
20 ?H:.
21 ?T:try hdrs
22 ?LINT:set d_gethostbyaddr_r
23 ?LINT:set gethostbyaddr_r_proto
24 : see if gethostbyaddr_r exists
25 set gethostbyaddr_r d_gethostbyaddr_r
26 eval $inlibc
27 case "$d_gethostbyaddr_r" in
28 "$define")
29         hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
30         case "$gethostbyaddr_r_proto" in
31         '') try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
32         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
33         esac
34         case "$gethostbyaddr_r_proto" in
35         '') try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
36         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
37         esac
38         case "$gethostbyaddr_r_proto" in
39         '') try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
40         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
41         esac
42         case "$gethostbyaddr_r_proto" in
43         '') try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
44         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
45         esac
46         case "$gethostbyaddr_r_proto" in
47         '') try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
48         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
49         esac
50         case "$gethostbyaddr_r_proto" in
51         '') try='int gethostbyaddr_r(const char*, int, int);'
52         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
53         esac
54         case "$gethostbyaddr_r_proto" in
55         '')     d_gethostbyaddr_r=undef
56                 echo "Disabling gethostbyaddr_r, cannot determine prototype." ;;
57         * )     case "$gethostbyaddr_r_proto" in
58                 REENTRANT_PROTO*) ;;
59                 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
60                 esac
61                 echo "Prototype: $try" ;;
62         esac
63         ;;
64 esac
65