@@ -112,6 +112,8 @@ corresponding Unix manual entries for more information on calls.");
112112#define HAVE_POPEN 1
113113#define HAVE_SYSTEM 1
114114#define HAVE_CWAIT 1
115+ #define HAVE_FSYNC 1
116+ #define fsync _commit
115117#else
116118#if defined(PYOS_OS2 ) && defined(PYCC_GCC ) || defined(__VMS )
117119/* Everything needed is defined in PC/os2emx/pyconfig.h or vms/pyconfig.h */
@@ -301,7 +303,7 @@ extern int lstat(const char *, struct stat *);
301303# define STRUCT_STAT struct stat
302304#endif
303305
304- #if defined(MAJOR_IN_MKDEV )
306+ #if defined(MAJOR_IN_MKDEV )
305307#include <sys/mkdev.h>
306308#else
307309#if defined(MAJOR_IN_SYSMACROS )
@@ -325,7 +327,7 @@ extern char **environ;
325327
326328#if defined(__VMS )
327329/* add some values to provide a similar environment like POSIX */
328- static
330+ static
329331void
330332vms_add_posix_env (PyObject * d )
331333{
@@ -516,8 +518,8 @@ static PyObject *_PyUnicode_FromFileSystemEncodedObject(register PyObject *obj)
516518 return PyUnicode_FromUnicode (PyUnicode_AS_UNICODE (obj ),
517519 PyUnicode_GET_SIZE (obj ));
518520 }
519- return PyUnicode_FromEncodedObject (obj ,
520- Py_FileSystemDefaultEncoding ,
521+ return PyUnicode_FromEncodedObject (obj ,
522+ Py_FileSystemDefaultEncoding ,
521523 "strict" );
522524}
523525
@@ -621,19 +623,19 @@ posix_fildes(PyObject *fdobj, int (*func)(int))
621623}
622624
623625#ifdef Py_WIN_WIDE_FILENAMES
624- static int
626+ static int
625627unicode_file_names (void )
626628{
627629 static int canusewide = -1 ;
628630 if (canusewide == -1 ) {
629- /* As per doc for ::GetVersion(), this is the correct test for
631+ /* As per doc for ::GetVersion(), this is the correct test for
630632 the Windows NT family. */
631633 canusewide = (GetVersion () < 0x80000000 ) ? 1 : 0 ;
632634 }
633635 return canusewide ;
634636}
635637#endif
636-
638+
637639static PyObject *
638640posix_1str (PyObject * args , char * format , int (* func )(const char * ),
639641 char * wformat , int (* wfunc )(const Py_UNICODE * ))
@@ -678,7 +680,7 @@ posix_1str(PyObject *args, char *format, int (*func)(const char*),
678680}
679681
680682static PyObject *
681- posix_2str (PyObject * args ,
683+ posix_2str (PyObject * args ,
682684 char * format ,
683685 int (* func )(const char * , const char * ),
684686 char * wformat ,
@@ -971,7 +973,7 @@ _pystat_fromstructstat(STRUCT_STAT st)
971973}
972974
973975static PyObject *
974- posix_do_stat (PyObject * self , PyObject * args ,
976+ posix_do_stat (PyObject * self , PyObject * args ,
975977 char * format ,
976978#ifdef __VMS
977979 int (* statfunc )(const char * , STRUCT_STAT * , ...),
@@ -1181,7 +1183,7 @@ posix_chdir(PyObject *self, PyObject *args)
11811183#elif defined(PYOS_OS2 ) && defined(PYCC_GCC )
11821184 return posix_1str (args , "et:chdir" , _chdir2 , NULL , NULL );
11831185#elif defined(__VMS )
1184- return posix_1str (args , "et:chdir" , (int (* )(const char * ))chdir ,
1186+ return posix_1str (args , "et:chdir" , (int (* )(const char * ))chdir ,
11851187 NULL , NULL );
11861188#else
11871189 return posix_1str (args , "et:chdir" , chdir , NULL , NULL );
@@ -1314,7 +1316,7 @@ posix_lchown(PyObject *self, PyObject *args)
13141316 Py_BEGIN_ALLOW_THREADS
13151317 res = lchown (path , (uid_t ) uid , (gid_t ) gid );
13161318 Py_END_ALLOW_THREADS
1317- if (res < 0 )
1319+ if (res < 0 )
13181320 return posix_error_with_allocated_filename (path );
13191321 PyMem_Free (path );
13201322 Py_INCREF (Py_None );
@@ -1646,7 +1648,7 @@ posix_listdir(PyObject *self, PyObject *args)
16461648 PyObject * w ;
16471649
16481650 w = PyUnicode_FromEncodedObject (v ,
1649- Py_FileSystemDefaultEncoding ,
1651+ Py_FileSystemDefaultEncoding ,
16501652 "strict" );
16511653 if (w != NULL ) {
16521654 Py_DECREF (v );
@@ -1692,7 +1694,7 @@ posix__getfullpathname(PyObject *self, PyObject *args)
16921694 if (PyArg_ParseTuple (args , "U|:_getfullpathname" , & po )) {
16931695 Py_UNICODE woutbuf [MAX_PATH * 2 ];
16941696 Py_UNICODE * wtemp ;
1695- if (!GetFullPathNameW (PyUnicode_AS_UNICODE (po ),
1697+ if (!GetFullPathNameW (PyUnicode_AS_UNICODE (po ),
16961698 sizeof (woutbuf )/sizeof (woutbuf [0 ]),
16971699 woutbuf , & wtemp ))
16981700 return win32_error ("GetFullPathName" , "" );
@@ -3185,7 +3187,7 @@ os2emx_popen3(PyObject *self, PyObject *args)
31853187/*
31863188 * Variation on os2emx.popen2
31873189 *
3188- * The result of this function is 2 pipes - the processes stdin,
3190+ * The result of this function is 2 pipes - the processes stdin,
31893191 * and stdout+stderr combined as a single pipe.
31903192 */
31913193
@@ -3519,7 +3521,7 @@ _PyPopen(char *cmdstring, int mode, int n, int bufsize)
35193521 }
35203522 }
35213523 }
3522-
3524+
35233525 /*
35243526 * Clean up our localized references for the dictionary keys
35253527 * and value since PyDict_SetItem will Py_INCREF any copies
@@ -3936,7 +3938,7 @@ _PyPopenCreateProcess(char *cmdstring,
39363938 s3 ,
39373939 cmdstring );
39383940 /* Not passing CREATE_NEW_CONSOLE has been known to
3939- cause random failures on win9x. Specifically a
3941+ cause random failures on win9x. Specifically a
39403942 dialog:
39413943 "Your program accessed mem currently in use at xxx"
39423944 and a hopeful warning about the stability of your
0 commit comments