- Notifications
You must be signed in to change notification settings - Fork 31.7k
/
Copy pathfileutils.h
62 lines (53 loc) · 1.39 KB
/
fileutils.h
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
#ifndefPy_FILEUTILS_H
#definePy_FILEUTILS_H
/*******************************
* stat() and fstat() fiddling *
*******************************/
#ifdefHAVE_SYS_STAT_H
# include<sys/stat.h>// S_ISREG()
#elif defined(HAVE_STAT_H)
# include<stat.h>// S_ISREG()
#endif
#ifndefS_IFMT
// VisualAge C/C++ Failed to Define MountType Field in sys/stat.h.
# defineS_IFMT 0170000
#endif
#ifndefS_IFLNK
// Windows doesn't define S_IFLNK, but posixmodule.c maps
// IO_REPARSE_TAG_SYMLINK to S_IFLNK.
# defineS_IFLNK 0120000
#endif
#ifndefS_ISREG
# defineS_ISREG(x) (((x) & S_IFMT) == S_IFREG)
#endif
#ifndefS_ISDIR
# defineS_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
#endif
#ifndefS_ISCHR
# defineS_ISCHR(x) (((x) & S_IFMT) == S_IFCHR)
#endif
#ifndefS_ISLNK
# defineS_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
#endif
// Move this down here since some C++ #include's don't like to be included
// inside an extern "C".
#ifdef__cplusplus
extern"C" {
#endif
#if !defined(Py_LIMITED_API) ||Py_LIMITED_API+0 >= 0x03050000
PyAPI_FUNC(wchar_t*) Py_DecodeLocale(
constchar*arg,
size_t*size);
PyAPI_FUNC(char*) Py_EncodeLocale(
constwchar_t*text,
size_t*error_pos);
#endif
#ifndefPy_LIMITED_API
# definePy_CPYTHON_FILEUTILS_H
# include"cpython/fileutils.h"
# undef Py_CPYTHON_FILEUTILS_H
#endif
#ifdef__cplusplus
}
#endif
#endif/* !Py_FILEUTILS_H */