Commit | Line | Data |
---|---|---|
46953654 JH |
1 | ?MAKE:d_ctime_r ctime_r_proto: Inlibc Protochk i_systypes i_dirent |
2 | ?MAKE: -pick add $@ %< | |
959f3c4c | 3 | ?S:d_ctime_r: |
46953654 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: |
46953654 | 9 | ?S: This variable encodes the prototype of ctime_r. |
8e87a72a | 10 | ?S:. |
959f3c4c | 11 | ?C:HAS_CTIME_R: |
46953654 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: |
46953654 | 16 | ?C: This symbol encodes the prototype of ctime_r. |
8e87a72a | 17 | ?C:. |
46953654 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 |
25 | set ctime_r d_ctime_r | |
26 | eval $inlibc | |
8e87a72a JH |
27 | case "$d_ctime_r" in |
28 | "$define") | |
46953654 JH |
29 | hdrs="$i_systypes sys/types.h ${i}_time time.h" |
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." ;; | |
52 | * ) ctime_r_proto="REENTRANT_$ctime_r_proto" ; echo "$try" ;; | |
53 | esac | |
8e87a72a | 54 | ;; |
8e87a72a | 55 | esac |
959f3c4c | 56 |