aboutsummaryrefslogtreecommitdiff
path: root/gnu/libg++/g++-include/sys/dir.h
blob: 586867252a6c59195fd8a7f01a2d84462a315009 (plain) (blame)
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
#ifndef __libgxx_sys_dir_h

extern "C" {

#ifdef __sys_dir_h_recursive
#include_next <sys/dir.h>
#else
#define __sys_dir_h_recursive
#define opendir __hide_opendir
#define closedir __hide_closedir
#define readdir __hide_readdir
#define telldir __hide_telldir
#define seekdir __hide_seekdir

#include_next <sys/dir.h>

#define __libgxx_sys_dir_h
#undef opendir
#undef closedir
#undef readdir
#undef telldir
#undef seekdir

DIR *opendir(const char *);
int closedir(DIR *);
#ifdef __dirent_h_recursive
// Some operating systems we won't mention (such as the imitation
// of Unix marketed by IBM) implement dirent.h by including sys/dir.h,
// in which case sys/dir.h defines struct dirent, rather than
// the struct direct originally used by BSD.
struct dirent *readdir(DIR *);
#else
struct direct *readdir(DIR *);
#endif
long telldir(DIR *);
void seekdir(DIR *, long);
// We don't bother with rewinddir (many systems define it as a macro).
// void rewinddir(DIR *);
#endif
}

#endif