Mercurial > cpython-lru_cache-weakref
diff Mac/Modules/macmodule.c @ 22430:7002f24f818f legacy-trunk
Solve sync() signature conflict differently: manually return 0 if
we have GUSI's void sync().
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Thu, 21 Mar 2002 21:09:36 +0000 |
| parents | 91dd223829c6 |
| children | 4f9d5ea4f37d |
line wrap: on
line diff
--- a/Mac/Modules/macmodule.c Thu Mar 21 20:18:32 2002 +0000 +++ b/Mac/Modules/macmodule.c Thu Mar 21 21:09:36 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();
