]> granicus.if.org Git - python/commitdiff
Solve sync() signature conflict differently: manually return 0 if
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 21 Mar 2002 21:09:36 +0000 (21:09 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 21 Mar 2002 21:09:36 +0000 (21:09 +0000)
we have GUSI's void sync().

Mac/Modules/macmodule.c

index 7f80b19f4c8cf36d794c873d85d1920fe697ee25..93dfaee1bf87566a97b8ce35d9d600d4471a9b24 100644 (file)
@@ -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();