[Patches] Problem with _SC_AIO_LIST_MAX in posixmodule.c on
Linux
Greg Stein
gstein@lyra.org
Fri, 25 Feb 2000 09:10:48 -0800 (PST)
On Fri, 25 Feb 2000, Guido van Rossum wrote:
>...
> This seems a bug in the confname.h header file, which contains:
>
> enum
> {
> ...
> _SC_SHARED_MEMORY_OBJECTS,
> #define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
> _SC_AIO_LISTIO_MAX,
> #define _SC_AIO_LIST_MAX _SC_AIO_LIST_MAX
> _SC_AIO_MAX,
> #define _SC_AIO_MAX _SC_AIO_MAX
> ...
> };
...
> but here the enum value uses LISTIO_MAX while the #define uses
> LIST_MAX.
On my Linux machine, I've got glic 2.1.2, and the above bug has been
corrected. Specifically, it looks like:
...
#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
_SC_AIO_LISTIO_MAX,
#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
_SC_AIO_MAX,
...
> Can anybody here suggest a better fix than this patch?
I would suggest keeping the SC_AIO_LISTIO_MAX stuff, and tossing
SC_AIO_LIST_MAX.
> Index: posixmodule.c
> ===================================================================
> RCS file: /projects/cvsroot/python/dist/src/Modules/posixmodule.c,v
> retrieving revision 2.123
> diff -c -r2.123 posixmodule.c
> *** posixmodule.c 2000/01/31 18:41:26 2.123
> --- posixmodule.c 2000/02/25 16:50:02
> ***************
> *** 3785,3791 ****
> #ifdef _SC_AIO_LISTIO_MAX
> {"SC_AIO_LISTIO_MAX", _SC_AIO_LISTIO_MAX},
> #endif
> ! #ifdef _SC_AIO_LIST_MAX
> {"SC_AIO_LIST_MAX", _SC_AIO_LIST_MAX},
> #endif
In other words: toss the latter three lines, keep the first three.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/