1 ?MAKE:d_ttyname_r ttyname_r_proto: Inlibc Protochk i_systypes i_unistd
4 ?S: This variable conditionally defines the HAS_TTYNAME_R symbol,
5 ?S: which indicates to the C program that the ttyname_r()
6 ?S: routine is available.
9 ?S: This variable encodes the prototype of ttyname_r.
12 ?C: This symbol, if defined, indicates that the ttyname_r routine
13 ?C: is available to ttyname re-entrantly.
16 ?C: This symbol encodes the prototype of ttyname_r.
18 ?H:#$d_ttyname_r HAS_TTYNAME_R /**/
19 ?H:#define TTYNAME_R_PROTO $ttyname_r_proto /**/
23 ?LINT:set ttyname_r_proto
24 : see if ttyname_r exists
25 set ttyname_r d_ttyname_r
27 case "$d_ttyname_r" in
29 hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h"
30 case "$ttyname_r_proto" in
31 '') try='int ttyname_r(int, char*, size_t);'
32 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;;
34 case "$ttyname_r_proto" in
35 '') try='int ttyname_r(int, char*, int);'
36 ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;;
38 case "$ttyname_r_proto" in
39 '') try='char* ttyname_r(int, char*, int);'
40 ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;;
42 case "$ttyname_r_proto" in
44 echo "Disabling ttyname_r, cannot determine prototype." ;;
45 * ) case "$ttyname_r_proto" in
47 *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;;
49 echo "Prototype: $try" ;;