Commit | Line | Data |
---|---|---|
2cb64bf6 | 1 | ?RCS: Copyright (c) 2006-2007, H.Merijn Brand |
65a32477 MBT |
2 | ?RCS: |
3 | ?RCS: You may redistribute only under the terms of the Artistic License, | |
53332010 SP |
4 | ?RCS: as specified in the README file that comes with the distribution. |
5 | ?RCS: You may reuse parts of this distribution only within the terms of | |
65a32477 | 6 | ?RCS: that same Artistic License; a copy of which may be found at the root |
53332010 SP |
7 | ?RCS: of the source tree for dist 3.0. |
8 | ?RCS: | |
9 | ?RCS: | |
2cb64bf6 | 10 | ?MAKE:d_dir_dd_fd: Compile cat rm_try Setvar i_dirent i_stdlib |
53332010 SP |
11 | ?MAKE: -pick add $@ %< |
12 | ?S:d_dir_dd_fd (d_dir_dd_fd.U): | |
13 | ?S: This variable conditionally defines the HAS_DIR_DD_FD symbol, which | |
14 | ?S: indicates that the DIR directory stream type contains a member | |
15 | ?S: variable called dd_fd. | |
16 | ?S:. | |
17 | ?C:HAS_DIR_DD_FD: | |
18 | ?C: This symbol, if defined, indicates that the the DIR* dirstream | |
19 | ?C: structure contains a member variable named dd_fd. | |
20 | ?C:. | |
21 | ?H:#$d_dir_dd_fd HAS_DIR_DD_FD /**/ | |
22 | ?H:. | |
23 | ?LINT:set d_dir_dd_fd | |
24 | : Look for DIR.dd_fd | |
25 | case "$i_dirent" in | |
26 | "$define") | |
27 | echo "Checking to see if DIR has a dd_fd member variable" >&4 | |
28 | $cat >try.c <<EOCP | |
29 | #$i_stdlib I_STDLIB | |
30 | #ifdef I_STDLIB | |
31 | #include <stdlib.h> | |
32 | #endif | |
33 | #include <dirent.h> | |
34 | ||
35 | int main() { | |
36 | DIR dir; | |
37 | dir.dd_fd = 1; | |
38 | return 0; | |
39 | } | |
40 | EOCP | |
41 | val=$undef | |
42 | set try | |
43 | if eval $compile; then | |
44 | echo "Yes, it does." | |
45 | val="$define" | |
46 | else | |
47 | echo "No, it does not." | |
48 | val="$undef" | |
49 | fi | |
50 | ;; | |
51 | *) | |
52 | echo "You don't have a <dirent.h>, so not checking for dd_fd." >&4 | |
53 | val="$undef" | |
54 | ;; | |
55 | esac | |
56 | set d_dir_dd_fd | |
57 | eval $setvar | |
2cb64bf6 | 58 | $rm_try |
53332010 | 59 |