diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2010-09-17 23:39:42 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2010-09-17 23:39:42 (GMT) |
commit | 6c9c09058f78a5f7e32090c1091409c7a5fa00a3 (patch) | |
tree | 07ae29c8a9180b8995bac34950c56fa92bb39485 /Modules/posixmodule.c | |
parent | bc85d848f5638b3c79c6d0d72e05e23cea697a25 (diff) | |
download | cpython-6c9c09058f78a5f7e32090c1091409c7a5fa00a3.zip cpython-6c9c09058f78a5f7e32090c1091409c7a5fa00a3.tar.gz cpython-6c9c09058f78a5f7e32090c1091409c7a5fa00a3.tar.bz2 |
Remove unused code in posixmodule.c
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 8026096..5969262 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -557,14 +557,6 @@ posix_error_with_filename(char* name) return PyErr_SetFromErrnoWithFilename(PyExc_OSError, name); } -#ifdef MS_WINDOWS -static PyObject * -posix_error_with_unicode_filename(Py_UNICODE* name) -{ - return PyErr_SetFromErrnoWithUnicodeFilename(PyExc_OSError, name); -} -#endif /* MS_WINDOWS */ - static PyObject * posix_error_with_allocated_filename(PyObject* name) @@ -1628,66 +1620,6 @@ _pystat_fromstructstat(STRUCT_STAT *st) return v; } -#ifdef MS_WINDOWS - -/* IsUNCRoot -- test whether the supplied path is of the form \\SERVER\SHARE\, - where / can be used in place of \ and the trailing slash is optional. - Both SERVER and SHARE must have at least one character. -*/ - -#define ISSLASHA(c) ((c) == '\\' || (c) == '/') -#define ISSLASHW(c) ((c) == L'\\' || (c) == L'/') -#ifndef ARRAYSIZE -#define ARRAYSIZE(a) (sizeof(a) / sizeof(a[0])) -#endif - -static BOOL -IsUNCRootA(char *path, int pathlen) -{ - #define ISSLASH ISSLASHA - - int i, share; - - if (pathlen < 5 || !ISSLASH(path[0]) || !ISSLASH(path[1])) - /* minimum UNCRoot is \\x\y */ - return FALSE; - for (i = 2; i < pathlen ; i++) - if (ISSLASH(path[i])) break; - if (i == 2 || i == pathlen) - /* do not allow \\\SHARE or \\SERVER */ - return FALSE; - share = i+1; - for (i = share; i < pathlen; i++) - if (ISSLASH(path[i])) break; - return (i != share && (i == pathlen || i == pathlen-1)); - - #undef ISSLASH -} - -static BOOL -IsUNCRootW(Py_UNICODE *path, int pathlen) -{ - #define ISSLASH ISSLASHW - - int i, share; - - if (pathlen < 5 || !ISSLASH(path[0]) || !ISSLASH(path[1])) - /* minimum UNCRoot is \\x\y */ - return FALSE; - for (i = 2; i < pathlen ; i++) - if (ISSLASH(path[i])) break; - if (i == 2 || i == pathlen) - /* do not allow \\\SHARE or \\SERVER */ - return FALSE; - share = i+1; - for (i = share; i < pathlen; i++) - if (ISSLASH(path[i])) break; - return (i != share && (i == pathlen || i == pathlen-1)); - - #undef ISSLASH -} -#endif /* MS_WINDOWS */ - static PyObject * posix_do_stat(PyObject *self, PyObject *args, char *format, |