fix for posix_fsync under SunOS 4.1.x
Guido van Rossum
guido at CNRI.Reston.VA.US
Sat Apr 3 08:11:40 EST 1999
> Here's a patch to make sure that posix_fsync will compile on all operating
> systems (specifically needed for SunOS 4.1.x).
>
> This unified diff was made against Python 1.5.2 beta 2 .
>
> -scott
>
> --- Modules/posixmodule.c~ Tue Feb 16 11:38:04 1999
> +++ Modules/posixmodule.c Fri Apr 2 22:18:03 1999
> @@ -647,6 +647,8 @@
> "fsync(fildes) -> None\n\
> force write of file with filedescriptor to disk.";
>
> +extern int fsync(int); /* Prototype just in case */
> +
> static PyObject *
> posix_fsync(self, args)
> PyObject *self;
On how many other operating systems have you tried this patch? I have
found that almost invariably when you use an extern declaration of a
standard function that is defined in the system headers on most modern
systems, there's at least one system out there where what they have in
the headers causes a conflict with what you declare! It would be
better if you put it insude an #ifdef specific for the SunOS 4.x
platform.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list