A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-June/025444.html below:

[Python-Dev] mkdev, major, st_rdev, etc

[Python-Dev] mkdev, major, st_rdev, etcMartin v. Loewis martin@v.loewis.de
15 Jun 2002 23:22:19 +0200
Gustavo Niemeyer <niemeyer@conectiva.com> writes:

> - mkdev would be able to use the standard posix format, and would
>   work regardless of makedev's availability (mkdev is being
>   introduced in 2.3).

Notice that the this interface is *not* part of the Posix spec.

http://www.opengroup.org/onlinepubs/007904975/functions/mknod.html

says that the only portable use of mknod is to create FIFOs; any use
where dev is not null is unspecified. Furthermore, major and minor are
not part of Posix.

> - TYPES.py is already trying to provide them, but it's broken
>   (indeed, it's more broken than that. h2py should use cpp to
>   preprocess the files, but that's something for another occasion).

That cannot work: the preprocessor will eat the macro definition, and
you have no way to find out what its body was.

> A patch providing these functions is available at
> http://www.python.org/sf/569139

I wonder whether the additional TRY_COMPILE test is really
necessary. Isn't it sufficient to restrict attention to systems on
which major and minor are macros, and use

#ifdef major

inside posixmodule.c?

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4