diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-03-21 21:09:36 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-03-21 21:09:36 (GMT) |
commit | 0e5a7338877c7ef0f8e021e7390f9d6cf80d7875 (patch) | |
tree | a913c2bab7ecc2f3434b958b0a1f434267a9d7ba | |
parent | 99286f96ac3ebcc0d9c07185bdc15cab76a46ecf (diff) | |
download | cpython-0e5a7338877c7ef0f8e021e7390f9d6cf80d7875.zip cpython-0e5a7338877c7ef0f8e021e7390f9d6cf80d7875.tar.gz cpython-0e5a7338877c7ef0f8e021e7390f9d6cf80d7875.tar.bz2 |
Solve sync() signature conflict differently: manually return 0 if
we have GUSI's void sync().
-rw-r--r-- | Mac/Modules/macmodule.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Mac/Modules/macmodule.c b/Mac/Modules/macmodule.c index 7f80b19..93dfaee 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 <unistd.h> #include <fcntl.h> -#undef sync -int sync(void); #else #define mode_t int #include <fcntl.h> @@ -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(); |