Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Thu, 2 May 2002 12:02:59 +0200 (CEST) From: Joerg Schilling Message-Id: <200205021002.g42A2xOP016077@burner.fokus.gmd.de> To: cygwin-developers AT cygwin DOT com, jason AT tishler DOT net Subject: Re: Should sys/types.h include sys/sysmacros.h? >From: Jason Tishler >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 in SVR4, it contains * an old definition for major()/minor() defining 8 minorbits. * Use 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