From 3f855edbf11d9972994eec15656b6d70dd2c88e4 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 19 Mar 2002 11:01:20 +0000 Subject: [PATCH] sync() has different return values depending on whether we build with GUSI or not. --- Mac/Modules/macmodule.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mac/Modules/macmodule.c b/Mac/Modules/macmodule.c index 7f80b19f4c8c..93dfaee1bf87 100644 --- a/Mac/Modules/macmodule.c +++ b/Mac/Modules/macmodule.c @@ -58,11 +58,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif /* USE_GUSI */ #ifdef USE_GUSI2 -#define sync bad_sync #include #include -#undef sync -int sync(void); #else #define mode_t int #include @@ -643,7 +640,12 @@ mac_sync(self, args) 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(); -- 2.47.3