diff Mac/Modules/macmodule.c @ 22410:457bf184e7ba 2.2

sync() has different return values depending on whether we build with GUSI or not.
author Jack Jansen <jack.jansen@cwi.nl>
date Tue, 19 Mar 2002 11:01:20 +0000
parents 91dd223829c6
children 4f9d5ea4f37d
line wrap: on
line diff
--- a/Mac/Modules/macmodule.c	Tue Mar 19 10:59:38 2002 +0000
+++ b/Mac/Modules/macmodule.c	Tue Mar 19 11:01:20 2002 +0000
@@ -58,11 +58,8 @@
 #endif /* USE_GUSI */
 
 #ifdef USE_GUSI2
-#define sync bad_sync
 #include <unistd.h>
 #include <fcntl.h>
-#undef sync
-int sync(void);
 #else
 #define mode_t int
 #include <fcntl.h>
@@ -643,7 +640,12 @@
 	if (!PyArg_ParseTuple(args, ""))
 		return NULL;
 	Py_BEGIN_ALLOW_THREADS
+#ifdef USE_GUSI2
+	sync();
+	res = 0;
+#else
 	res = sync();
+#endif
 	Py_END_ALLOW_THREADS
 	if (res != 0)
 		return mac_error();