Commit | Line | Data |
---|---|---|
eed88ce0 JH |
1 | ?MAKE:d_srand48_r srand48_r_proto: Inlibc Protochk i_systypes i_unistd |
2 | ?MAKE: -pick add $@ %< | |
959f3c4c | 3 | ?S:d_srand48_r: |
eed88ce0 JH |
4 | ?S: This variable conditionally defines the HAS_SRAND48_R symbol, |
5 | ?S: which indicates to the C program that the srand48_r() | |
6 | ?S: routine is available. | |
46953654 JH |
7 | ?S:. |
8 | ?S:srand48_r_proto: | |
eed88ce0 | 9 | ?S: This variable encodes the prototype of srand48_r. |
959f3c4c JH |
10 | ?S:. |
11 | ?C:HAS_SRAND48_R: | |
eed88ce0 JH |
12 | ?C: This symbol, if defined, indicates that the srand48_r routine |
13 | ?C: is available to srand48 re-entrantly. | |
46953654 JH |
14 | ?C:. |
15 | ?C:SRAND48_R_PROTO: | |
eed88ce0 | 16 | ?C: This symbol encodes the prototype of srand48_r. |
959f3c4c | 17 | ?C:. |
eed88ce0 JH |
18 | ?H:#$d_srand48_r HAS_SRAND48_R /**/ |
19 | ?H:#define SRAND48_R_PROTO $srand48_r_proto /**/ | |
959f3c4c | 20 | ?H:. |
46953654 | 21 | ?T:try hdrs |
959f3c4c | 22 | ?LINT:set d_srand48_r |
46953654 | 23 | ?LINT:set srand48_r_proto |
959f3c4c JH |
24 | : see if srand48_r exists |
25 | set srand48_r d_srand48_r | |
26 | eval $inlibc | |
46953654 JH |
27 | case "$d_srand48_r" in |
28 | "$define") | |
eed88ce0 | 29 | hdrs="$i_systypes sys/types.h $i_unistd unistd.h" |
46953654 JH |
30 | case "$srand48_r_proto" in |
31 | '') try='extern int srand48_r(long, struct drand48_data*);' | |
32 | ./protochk "$try" $hdrs && srand48_r_proto=I_LS; | |
33 | ;; | |
34 | esac | |
35 | case "$srand48_r_proto" in | |
36 | '') d_srand48_r=undef ; echo "Disabling srand48_r, cannot find prototype." ;; | |
7e4a251e | 37 | * ) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ; echo "$try" ;; |
46953654 JH |
38 | esac |
39 | ;; | |
40 | esac | |
959f3c4c | 41 |