This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig unit changes for #15910.
[metaconfig.git] / U / threads / d_gethostbyaddr_r.U
1 ?RCS: $Id: d_gethostbyaddr_r.U,v 0RCS:
2 ?RCS: Copyright (c) 2002 Jarkko Hietaniemi
3 ?RCS:
4 ?RCS: You may distribute under the terms of either the GNU General Public
5 ?RCS: License or the Artistic License, as specified in the README file.
6 ?RCS:
7 ?RCS: Generated by the reentr.pl from the Perl 5.8 distribution.
8 ?RCS:
9 ?MAKE:d_gethostbyaddr_r gethostbyaddr_r_proto: Inlibc Protochk Hasproto i_systypes i_systime i_netdb usethreads i_pthread
10 ?MAKE:  -pick add $@ %<
11 ?S:d_gethostbyaddr_r:
12 ?S:     This variable conditionally defines the HAS_GETHOSTBYADDR_R symbol,
13 ?S:     which indicates to the C program that the gethostbyaddr_r()
14 ?S:     routine is available.
15 ?S:.
16 ?S:gethostbyaddr_r_proto:
17 ?S:     This variable encodes the prototype of gethostbyaddr_r.
18 ?S:.
19 ?C:HAS_GETHOSTBYADDR_R:
20 ?C:     This symbol, if defined, indicates that the gethostbyaddr_r routine
21 ?C:     is available to gethostbyaddr re-entrantly.
22 ?C:.
23 ?C:GETHOSTBYADDR_R_PROTO:
24 ?C:     This symbol encodes the prototype of gethostbyaddr_r.
25 ?C:.
26 ?H:#$d_gethostbyaddr_r HAS_GETHOSTBYADDR_R         /**/
27 ?H:#define GETHOSTBYADDR_R_PROTO $gethostbyaddr_r_proto    /**/
28 ?H:.
29 ?T:try hdrs d_gethostbyaddr_r_proto
30 ?LINT:set d_gethostbyaddr_r
31 ?LINT:set gethostbyaddr_r_proto
32 : see if gethostbyaddr_r exists
33 set gethostbyaddr_r d_gethostbyaddr_r
34 eval $inlibc
35 case "$d_gethostbyaddr_r" in
36 "$define")
37         hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h"
38         case "$d_gethostbyaddr_r_proto:$usethreads" in
39         ":define")      d_gethostbyaddr_r_proto=define
40                 set d_gethostbyaddr_r_proto gethostbyaddr_r $hdrs
41                 eval $hasproto ;;
42         *)      ;;
43         esac
44         case "$d_gethostbyaddr_r_proto" in
45         define)
46         case "$gethostbyaddr_r_proto" in
47         ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, struct hostent**, int*);'
48         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISBWRE ;;
49         esac
50         case "$gethostbyaddr_r_proto" in
51         ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, size_t, int, int*);'
52         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBWIE ;;
53         esac
54         case "$gethostbyaddr_r_proto" in
55         ''|0) try='struct hostent* gethostbyaddr_r(const char*, size_t, int, struct hostent*, char*, int, int*);'
56         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CWISBIE ;;
57         esac
58         case "$gethostbyaddr_r_proto" in
59         ''|0) try='struct hostent* gethostbyaddr_r(const void*, size_t, int, struct hostent*, char*, int, int*);'
60         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TWISBIE ;;
61         esac
62         case "$gethostbyaddr_r_proto" in
63         ''|0) try='struct hostent* gethostbyaddr_r(const char*, int, int, struct hostent*, char*, int, int*);'
64         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CIISBIE ;;
65         esac
66         case "$gethostbyaddr_r_proto" in
67         ''|0) try='struct hostent* gethostbyaddr_r(const char*, struct hostent*, char*, int, int*);'
68         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_CSBIE ;;
69         esac
70         case "$gethostbyaddr_r_proto" in
71         ''|0) try='struct hostent* gethostbyaddr_r(const void*, struct hostent*, char*, int, int*);'
72         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=S_TSBIE ;;
73         esac
74         case "$gethostbyaddr_r_proto" in
75         ''|0) try='int gethostbyaddr_r(const char*, size_t, int, struct hostent*, struct hostent_data*);'
76         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CWISD ;;
77         esac
78         case "$gethostbyaddr_r_proto" in
79         ''|0) try='int gethostbyaddr_r(const char*, int, int, struct hostent*, struct hostent_data*);'
80         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CIISD ;;
81         esac
82         case "$gethostbyaddr_r_proto" in
83         ''|0) try='int gethostbyaddr_r(const char*, int, int);'
84         ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;;
85         esac
86         case "$gethostbyaddr_r_proto" in
87         ''|0)   d_gethostbyaddr_r=undef
88                 gethostbyaddr_r_proto=0
89                 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;;
90         * )     case "$gethostbyaddr_r_proto" in
91                 REENTRANT_PROTO*) ;;
92                 *) gethostbyaddr_r_proto="REENTRANT_PROTO_$gethostbyaddr_r_proto" ;;
93                 esac
94                 echo "Prototype: $try" ;;
95         esac
96         ;;
97         *)      case "$usethreads" in
98                 define) echo "gethostbyaddr_r has no prototype, not using it." >&4 ;;
99                 esac
100                 d_gethostbyaddr_r=undef
101                 gethostbyaddr_r_proto=0
102                 ;;
103         esac
104         ;;
105 *)      gethostbyaddr_r_proto=0
106         ;;
107 esac
108