This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig: three guesses.
[metaconfig.git] / U / threads / d_ctime_r.U
CommitLineData
eed88ce0
JH
1?MAKE:d_ctime_r ctime_r_proto: Inlibc Protochk i_systypes i_unistd
2?MAKE: -pick add $@ %<
959f3c4c 3?S:d_ctime_r:
eed88ce0
JH
4?S: This variable conditionally defines the HAS_CTIME_R symbol,
5?S: which indicates to the C program that the ctime_r()
6?S: routine is available.
959f3c4c 7?S:.
8e87a72a 8?S:ctime_r_proto:
eed88ce0 9?S: This variable encodes the prototype of ctime_r.
8e87a72a 10?S:.
959f3c4c 11?C:HAS_CTIME_R:
eed88ce0
JH
12?C: This symbol, if defined, indicates that the ctime_r routine
13?C: is available to ctime re-entrantly.
959f3c4c 14?C:.
8e87a72a 15?C:CTIME_R_PROTO:
eed88ce0 16?C: This symbol encodes the prototype of ctime_r.
8e87a72a 17?C:.
eed88ce0
JH
18?H:#$d_ctime_r HAS_CTIME_R /**/
19?H:#define CTIME_R_PROTO $ctime_r_proto /**/
959f3c4c 20?H:.
8e87a72a 21?T:try hdrs
959f3c4c 22?LINT:set d_ctime_r
46953654 23?LINT:set ctime_r_proto
959f3c4c
JH
24: see if ctime_r exists
25set ctime_r d_ctime_r
26eval $inlibc
8e87a72a
JH
27case "$d_ctime_r" in
28"$define")
eed88ce0 29 hdrs="$i_systypes sys/types.h $i_unistd unistd.h"
46953654
JH
30 case "$ctime_r_proto" in
31 '') try='extern char* ctime_r(const time_t*, char*);'
32 ./protochk "$try" $hdrs && ctime_r_proto=B_SB;
33 ;;
34 esac
35 case "$ctime_r_proto" in
36 '') try='extern char* ctime_r(const time_t*, char*, int);'
37 ./protochk "$try" $hdrs && ctime_r_proto=B_SBI;
38 ;;
39 esac
40 case "$ctime_r_proto" in
41 '') try='extern int ctime_r(const time_t*, char*);'
42 ./protochk "$try" $hdrs && ctime_r_proto=I_SB;
43 ;;
44 esac
45 case "$ctime_r_proto" in
46 '') try='extern int ctime_r(const time_t*, char*, int);'
47 ./protochk "$try" $hdrs && ctime_r_proto=I_SBI;
48 ;;
49 esac
50 case "$ctime_r_proto" in
51 '') d_ctime_r=undef ; echo "Disabling ctime_r, cannot find prototype." ;;
7e4a251e 52 * ) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ; echo "$try" ;;
46953654 53 esac
8e87a72a 54 ;;
8e87a72a 55esac
959f3c4c 56