File indexing completed on 2025-11-19 09:50:53
0001 #ifndef Py_FILEUTILS_H
0002 #define Py_FILEUTILS_H
0003
0004
0005
0006
0007
0008 #ifdef HAVE_SYS_STAT_H
0009 # include <sys/stat.h> // S_ISREG()
0010 #elif defined(HAVE_STAT_H)
0011 # include <stat.h> // S_ISREG()
0012 #endif
0013
0014 #ifndef S_IFMT
0015
0016 # define S_IFMT 0170000
0017 #endif
0018 #ifndef S_IFLNK
0019
0020
0021 # define S_IFLNK 0120000
0022 #endif
0023 #ifndef S_ISREG
0024 # define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
0025 #endif
0026 #ifndef S_ISDIR
0027 # define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
0028 #endif
0029 #ifndef S_ISCHR
0030 # define S_ISCHR(x) (((x) & S_IFMT) == S_IFCHR)
0031 #endif
0032 #ifndef S_ISLNK
0033 # define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
0034 #endif
0035
0036
0037
0038
0039 #ifdef __cplusplus
0040 extern "C" {
0041 #endif
0042
0043 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
0044 PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
0045 const char *arg,
0046 size_t *size);
0047
0048 PyAPI_FUNC(char*) Py_EncodeLocale(
0049 const wchar_t *text,
0050 size_t *error_pos);
0051 #endif
0052
0053 #ifndef Py_LIMITED_API
0054 # define Py_CPYTHON_FILEUTILS_H
0055 # include "cpython/fileutils.h"
0056 # undef Py_CPYTHON_FILEUTILS_H
0057 #endif
0058
0059 #ifdef __cplusplus
0060 }
0061 #endif
0062 #endif