Mail Archives: cygwin-developers/2002/05/02/06:04:59
>From: Jason Tishler <jason AT tishler DOT net>
>In the process of trying to build the latest Python CVS, I get a link
>error due to the following line:
> res = mknod(filename, mode, makedev(major, minor));
>After building successfully under Linux, I determined that the above
>works because Linux's sys/types.h includes sys/sysmacros.h.
>Should newlib's sys/types.h include sys/sysmacros.h (possibly only for
>Cygwin)?
>I tried searching:
> http://www.opengroup.org/onlinepubs/007908799/index.html
>but came up empty.
First, SUSv2 is outdated by POSIX.1-2001 (aka. SUSv3 / The Open Group Base Specifications Issue 6)
For curiosity: although major/minor numbers are mentioned in the standard
for the ustar/pax archive format, it seems that anything bejond the granularity
of a dev_t (like st_rdev) is bejond the scope of the standard.
In addition: I am not sure where sysmacros.h comes from, but here is a quote
from one of my portability files:
/*
* On generic SVR4, major is a function (defined in sys/mkdev.h).
* On Solaris it is defined ...
* As we cannot just test if major is #define'd, we have to
* define _FOUND_MAJOR_ instead.
*
* WARNING: Do never include <sys/sysmacros.h> in SVR4, it contains
* an old definition for major()/minor() defining 8 minorbits.
* Use <sys/mkdev.h> instead.
*/
Jörg
EMail:joerg AT schily DOT isdn DOT cs DOT tu-berlin DOT de (home) Jörg Schilling D-13353 Berlin
js AT cs DOT tu-berlin DOT de (uni) If you don't have iso-8859-1
schilling AT fokus DOT gmd DOT de (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
- Raw text -