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 $i_unistd unistd.h"
30 case "$ttyname_r_proto" in
31 '') try='extern int ttyname_r(int, char*, size_t);'
32 ./protochk "$try" $hdrs && ttyname_r_proto=I_IBW;
35 case "$ttyname_r_proto" in
36 '') try='extern int ttyname_r(int, char*, int);'
37 ./protochk "$try" $hdrs && ttyname_r_proto=I_IBI;
40 case "$ttyname_r_proto" in
41 '') try='extern char* ttyname_r(int, char*, int);'
42 ./protochk "$try" $hdrs && ttyname_r_proto=B_IBI;
45 case "$ttyname_r_proto" in
46 '') d_ttyname_r=undef ; echo "Disabling ttyname_r, cannot find prototype." ;;
47 * ) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ; echo "$try" ;;