@@ -581,13 +581,13 @@ posix_error_with_filename(char* name)
581581 return PyErr_SetFromErrnoWithFilename (PyExc_OSError , name );
582582}
583583
584- #ifdef Py_WIN_WIDE_FILENAMES
584+ #ifdef MS_WINDOWS
585585static PyObject *
586586posix_error_with_unicode_filename (Py_UNICODE * name )
587587{
588588 return PyErr_SetFromErrnoWithUnicodeFilename (PyExc_OSError , name );
589589}
590- #endif /* Py_WIN_WIDE_FILENAMES */
590+ #endif /* MS_WINDOWS */
591591
592592
593593static PyObject *
@@ -615,7 +615,6 @@ win32_error(char* function, char* filename)
615615 return PyErr_SetFromWindowsErr (errno );
616616}
617617
618- #ifdef Py_WIN_WIDE_FILENAMES
619618static PyObject *
620619win32_error_unicode (char * function , Py_UNICODE * filename )
621620{
@@ -644,9 +643,7 @@ convert_to_unicode(PyObject **param)
644643 return (* param ) != NULL ;
645644}
646645
647- #endif /* Py_WIN_WIDE_FILENAMES */
648-
649- #endif
646+ #endif /* MS_WINDOWS */
650647
651648#if defined(PYOS_OS2 )
652649/**********************************************************************
@@ -745,7 +742,7 @@ posix_fildes(PyObject *fdobj, int (*func)(int))
745742 return Py_None ;
746743}
747744
748- #ifdef Py_WIN_WIDE_FILENAMES
745+ #ifdef MS_WINDOWS
749746static int
750747unicode_file_names (void )
751748{
@@ -808,7 +805,7 @@ posix_2str(PyObject *args,
808805 return Py_None ;
809806}
810807
811- #ifdef Py_WIN_WIDE_FILENAMES
808+ #ifdef MS_WINDOWS
812809static PyObject *
813810win32_1str (PyObject * args , char * func ,
814811 char * format , BOOL (__stdcall * funcA )(LPCSTR ),
@@ -1564,7 +1561,6 @@ IsUNCRootA(char *path, int pathlen)
15641561 #undef ISSLASH
15651562}
15661563
1567- #ifdef Py_WIN_WIDE_FILENAMES
15681564static BOOL
15691565IsUNCRootW (Py_UNICODE * path , int pathlen )
15701566{
@@ -1587,7 +1583,6 @@ IsUNCRootW(Py_UNICODE *path, int pathlen)
15871583
15881584 #undef ISSLASH
15891585}
1590- #endif /* Py_WIN_WIDE_FILENAMES */
15911586#endif /* MS_WINDOWS */
15921587
15931588static PyObject *
@@ -1607,7 +1602,7 @@ posix_do_stat(PyObject *self, PyObject *args,
16071602 int res ;
16081603 PyObject * result ;
16091604
1610- #ifdef Py_WIN_WIDE_FILENAMES
1605+ #ifdef MS_WINDOWS
16111606 /* If on wide-character-capable OS see if argument
16121607 is Unicode and if so use wide API. */
16131608 if (unicode_file_names ()) {
@@ -1670,7 +1665,7 @@ posix_access(PyObject *self, PyObject *args)
16701665 char * path ;
16711666 int mode ;
16721667
1673- #ifdef Py_WIN_WIDE_FILENAMES
1668+ #ifdef MS_WINDOWS
16741669 DWORD attr ;
16751670 if (unicode_file_names ()) {
16761671 PyUnicodeObject * po ;
@@ -1827,7 +1822,7 @@ posix_chmod(PyObject *self, PyObject *args)
18271822 char * path = NULL ;
18281823 int i ;
18291824 int res ;
1830- #ifdef Py_WIN_WIDE_FILENAMES
1825+ #ifdef MS_WINDOWS
18311826 DWORD attr ;
18321827 if (unicode_file_names ()) {
18331828 PyUnicodeObject * po ;
@@ -1878,7 +1873,7 @@ posix_chmod(PyObject *self, PyObject *args)
18781873 release_bytes (opath );
18791874 Py_INCREF (Py_None );
18801875 return Py_None ;
1881- #else /* Py_WIN_WIDE_FILENAMES */
1876+ #else /* MS_WINDOWS */
18821877 if (!PyArg_ParseTuple (args , "O&i:chmod" , PyUnicode_FSConverter ,
18831878 & opath , & i ))
18841879 return NULL ;
@@ -2128,7 +2123,7 @@ posix_getcwd(int use_bytes)
21282123 char buf [1026 ];
21292124 char * res ;
21302125
2131- #ifdef Py_WIN_WIDE_FILENAMES
2126+ #ifdef MS_WINDOWS
21322127 if (!use_bytes && unicode_file_names ()) {
21332128 wchar_t wbuf [1026 ];
21342129 wchar_t * wbuf2 = wbuf ;
@@ -2233,7 +2228,6 @@ posix_listdir(PyObject *self, PyObject *args)
22332228 char * bufptr = namebuf ;
22342229 Py_ssize_t len = sizeof (namebuf )- 5 ; /* only claim to have space for MAX_PATH */
22352230
2236- #ifdef Py_WIN_WIDE_FILENAMES
22372231 /* If on wide-character-capable OS see if argument
22382232 is Unicode and if so use wide API. */
22392233 if (unicode_file_names ()) {
@@ -2316,7 +2310,6 @@ posix_listdir(PyObject *self, PyObject *args)
23162310 are also valid. */
23172311 PyErr_Clear ();
23182312 }
2319- #endif
23202313
23212314 if (!PyArg_ParseTuple (args , "O&:listdir" ,
23222315 PyUnicode_FSConverter , & opath ))
@@ -2553,7 +2546,7 @@ posix__getfullpathname(PyObject *self, PyObject *args)
25532546 char * path ;
25542547 char outbuf [MAX_PATH * 2 ];
25552548 char * temp ;
2556- #ifdef Py_WIN_WIDE_FILENAMES
2549+ #ifdef MS_WINDOWS
25572550 if (unicode_file_names ()) {
25582551 PyUnicodeObject * po ;
25592552 if (PyArg_ParseTuple (args , "U|:_getfullpathname" , & po )) {
@@ -2615,7 +2608,7 @@ posix_mkdir(PyObject *self, PyObject *args)
26152608 char * path ;
26162609 int mode = 0777 ;
26172610
2618- #ifdef Py_WIN_WIDE_FILENAMES
2611+ #ifdef MS_WINDOWS
26192612 if (unicode_file_names ()) {
26202613 PyUnicodeObject * po ;
26212614 if (PyArg_ParseTuple (args , "U|i:mkdir" , & po , & mode )) {
@@ -2921,7 +2914,7 @@ second form is used, set the access and modified times to the current time.");
29212914static PyObject *
29222915posix_utime (PyObject * self , PyObject * args )
29232916{
2924- #ifdef Py_WIN_WIDE_FILENAMES
2917+ #ifdef MS_WINDOWS
29252918 PyObject * arg ;
29262919 PyUnicodeObject * obwpath ;
29272920 wchar_t * wpath = NULL ;
@@ -3001,7 +2994,7 @@ posix_utime(PyObject *self, PyObject *args)
30012994done :
30022995 CloseHandle (hFile );
30032996 return result ;
3004- #else /* Py_WIN_WIDE_FILENAMES */
2997+ #else /* MS_WINDOWS */
30052998
30062999 PyObject * opath ;
30073000 char * path ;
@@ -3077,7 +3070,7 @@ posix_utime(PyObject *self, PyObject *args)
30773070#undef UTIME_ARG
30783071#undef ATIME
30793072#undef MTIME
3080- #endif /* Py_WIN_WIDE_FILENAMES */
3073+ #endif /* MS_WINDOWS */
30813074}
30823075
30833076
@@ -6803,7 +6796,7 @@ win32_startfile(PyObject *self, PyObject *args)
68036796 char * filepath ;
68046797 char * operation = NULL ;
68056798 HINSTANCE rc ;
6806- #ifdef Py_WIN_WIDE_FILENAMES
6799+
68076800 if (unicode_file_names ()) {
68086801 PyObject * unipath , * woperation = NULL ;
68096802 if (!PyArg_ParseTuple (args , "U|s:startfile" ,
@@ -6838,7 +6831,6 @@ win32_startfile(PyObject *self, PyObject *args)
68386831 Py_INCREF (Py_None );
68396832 return Py_None ;
68406833 }
6841- #endif
68426834
68436835normal :
68446836 if (!PyArg_ParseTuple (args , "O&|s:startfile" ,
0 commit comments