Commit | Line | Data |
---|---|---|
0ed44c70 JH |
1 | ?RCS: $Id: d_tmpnam_r.U,v 0RCS: |
2 | ?RCS: Copyright (c) 2002 Jarkko Hietaniemi | |
3 | ?RCS: | |
4 | ?RCS: You may distribute under the terms of either the GNU General Public | |
5 | ?RCS: License or the Artistic License, as specified in the README file. | |
6 | ?RCS: | |
7 | ?RCS: Generated by the reentr.pl from the Perl 5.8 distribution. | |
8 | ?RCS: | |
89d9cf69 | 9 | ?MAKE:d_tmpnam_r tmpnam_r_proto: Inlibc Protochk Hasproto i_systypes usethreads |
eed88ce0 | 10 | ?MAKE: -pick add $@ %< |
959f3c4c | 11 | ?S:d_tmpnam_r: |
eed88ce0 JH |
12 | ?S: This variable conditionally defines the HAS_TMPNAM_R symbol, |
13 | ?S: which indicates to the C program that the tmpnam_r() | |
14 | ?S: routine is available. | |
46953654 JH |
15 | ?S:. |
16 | ?S:tmpnam_r_proto: | |
eed88ce0 | 17 | ?S: This variable encodes the prototype of tmpnam_r. |
05fdd8fd JH |
18 | ?S: It is zero if d_tmpnam_r is undef, and one of the |
19 | ?S: REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r | |
20 | ?S: is defined. | |
959f3c4c JH |
21 | ?S:. |
22 | ?C:HAS_TMPNAM_R: | |
eed88ce0 JH |
23 | ?C: This symbol, if defined, indicates that the tmpnam_r routine |
24 | ?C: is available to tmpnam re-entrantly. | |
46953654 JH |
25 | ?C:. |
26 | ?C:TMPNAM_R_PROTO: | |
eed88ce0 | 27 | ?C: This symbol encodes the prototype of tmpnam_r. |
05fdd8fd JH |
28 | ?C: It is zero if d_tmpnam_r is undef, and one of the |
29 | ?C: REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r | |
30 | ?C: is defined. | |
959f3c4c | 31 | ?C:. |
eed88ce0 JH |
32 | ?H:#$d_tmpnam_r HAS_TMPNAM_R /**/ |
33 | ?H:#define TMPNAM_R_PROTO $tmpnam_r_proto /**/ | |
959f3c4c | 34 | ?H:. |
f42a43f5 | 35 | ?T:try hdrs d_tmpnam_r_proto |
959f3c4c | 36 | ?LINT:set d_tmpnam_r |
46953654 | 37 | ?LINT:set tmpnam_r_proto |
959f3c4c JH |
38 | : see if tmpnam_r exists |
39 | set tmpnam_r d_tmpnam_r | |
40 | eval $inlibc | |
46953654 JH |
41 | case "$d_tmpnam_r" in |
42 | "$define") | |
ba7e8067 | 43 | hdrs="$i_systypes sys/types.h define stdio.h " |
9bb0d1dd JH |
44 | case "$d_tmpnam_r_proto:$usethreads" in |
45 | ":define") d_tmpnam_r_proto=define | |
f42a43f5 JH |
46 | set d_tmpnam_r_proto tmpnam_r $hdrs |
47 | eval $hasproto ;; | |
48 | *) ;; | |
49 | esac | |
50 | case "$d_tmpnam_r_proto" in | |
51 | define) | |
46953654 | 52 | case "$tmpnam_r_proto" in |
5002a627 | 53 | ''|0) try='char* tmpnam_r(char*);' |
f2dee704 | 54 | ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;; |
46953654 JH |
55 | esac |
56 | case "$tmpnam_r_proto" in | |
81d83c43 | 57 | ''|0) d_tmpnam_r=undef |
5002a627 | 58 | tmpnam_r_proto=0 |
f42a43f5 | 59 | echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;; |
f2dee704 JH |
60 | * ) case "$tmpnam_r_proto" in |
61 | REENTRANT_PROTO*) ;; | |
62 | *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;; | |
63 | esac | |
64 | echo "Prototype: $try" ;; | |
46953654 JH |
65 | esac |
66 | ;; | |
9bb0d1dd JH |
67 | *) case "$usethreads" in |
68 | define) echo "tmpnam_r has no prototype, not using it." >&4 ;; | |
69 | esac | |
81d83c43 JH |
70 | d_tmpnam_r=undef |
71 | tmpnam_r_proto=0 | |
9bb0d1dd | 72 | ;; |
f42a43f5 JH |
73 | esac |
74 | ;; | |
5002a627 JH |
75 | *) tmpnam_r_proto=0 |
76 | ;; | |
46953654 | 77 | esac |
959f3c4c | 78 |