summaryrefslogtreecommitdiff
path: root/mcon/U/d_readdir.U
blob: 535dd0739ed151dd54af1ab17c5b017cc35d6479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
?RCS: $Id: d_readdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS: 
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_readdir.U,v $
?RCS: Revision 3.0.1.1  1994/05/06  14:46:37  ram
?RCS: patch23: added support for seekdir, telldir and rewinddir (ADO)
?RCS:
?RCS: Revision 3.0  1993/08/18  12:06:52  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Trylink cat i_dirent
?MAKE:	-pick add $@ %<
?S:d_readdir:
?S:	This variable conditionally defines HAS_READDIR if readdir() is
?S:	available to read directory entries.
?S:.
?C:HAS_READDIR (READDIR):
?C:	This symbol, if defined, indicates that the readdir routine is
?C:	available to read directory entries. You may have to include
?C:	<dirent.h>. See I_DIRENT.
?C:.
?H:#$d_readdir HAS_READDIR		/**/
?H:.
?S:d_seekdir:
?S:	This variable conditionally defines HAS_SEEKDIR if seekdir() is
?S:	available.
?S:.
?C:HAS_SEEKDIR:
?C:	This symbol, if defined, indicates that the seekdir routine is
?C:	available. You may have to include <dirent.h>. See I_DIRENT.
?C:.
?H:#$d_seekdir HAS_SEEKDIR		/**/
?H:.
?S:d_telldir:
?S:	This variable conditionally defines HAS_TELLDIR if telldir() is
?S:	available.
?S:.
?C:HAS_TELLDIR:
?C:	This symbol, if defined, indicates that the telldir routine is
?C:	available. You may have to include <dirent.h>. See I_DIRENT.
?C:.
?H:#$d_telldir HAS_TELLDIR		/**/
?H:.
?S:d_rewinddir:
?S:	This variable conditionally defines HAS_REWINDDIR if rewinddir() is
?S:	available.
?S:.
?C:HAS_REWINDDIR:
?C:	This symbol, if defined, indicates that the rewinddir routine is
?C:	available. You may have to include <dirent.h>. See I_DIRENT.
?C:.
?H:#$d_rewinddir HAS_REWINDDIR		/**/
?H:.
?LINT:set d_readdir d_seekdir d_telldir d_rewinddir
: see if readdir and friends exist
$cat >try.c <<EOC
#$i_dirent I_DIRENT
#ifdef I_DIRENT
#include <dirent.h>
#endif
int main(void)
{
	static DIR *dir;
	struct dirent *ret;
	ret = readdir(dir);
	return ret ? 0 : 1;
}
EOC
cyn=readdir
set d_readdir
eval $trylink

@if d_seekdir || HAS_SEEKDIR
$cat >try.c <<EOC
#$i_dirent I_DIRENT
#ifdef I_DIRENT
#include <dirent.h>
#endif
int main(void)
{
	static DIR *dir;
	static long loc;
	seekdir(dir, loc);
	return 0;
}
EOC
cyn=seekdir
set d_seekdir
eval $trylink
@end
@if d_telldir || HAS_TELLDIR
$cat >try.c <<EOC
#$i_dirent I_DIRENT
#ifdef I_DIRENT
#include <dirent.h>
#endif
int main(void)
{
	static DIR *dir;
	static long ret;
	ret |= telldir(dir);
	if (ret)
		return 1;
	return 0;
}
EOC
cyn=telldir
set d_telldir
eval $trylink
@end
@if d_rewinddir || HAS_REWINDDIR
$cat >try.c <<EOC
#$i_dirent I_DIRENT
#ifdef I_DIRENT
#include <dirent.h>
#endif
int main(void)
{
	static DIR *dir;
	rewinddir(dir);
	return 0;
}
EOC
cyn=rewinddir
set d_rewinddir
eval $trylink
@end