From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: include files 21 May 1998 06:22:26 -0700 Message-ID: <199805211238.IAA26756.cygnus.cygwin32.developers@kramden.cygnus.com> To: newsham AT lava DOT net, noer AT cygnus DOT com Cc: cygwin32-developers AT cygnus DOT com >2) Is it really a good idea to add a CYGWIN/CYGWINb_19 define? Cygwin >versions are currently in winsup/version.h. I like having these >defined in the winsup directory somewhere... I agree. >3) isn't included in param.h in either Linux or Solaris. I don't see any reason to include a file unless it is needed by something in the file itself. Is there something in sys/param.h which requires the use of sys/signal.h? If so, sys/signal.h should be added to sys/param.h. Otherwise I don't think it should go there. >4) NOFILE_MAX isn't defined in any Linux or Solaris include files. Is >it really needed? I don't think so. What would the number be? Infinity? There is no hardwired file maximum. Even if we were to include it, I believe that it should be "NOFILE", not "NOFILE_MAX". Modern UNIXes provide this information via sysconf. >5) Under Linux, MIN and MAX are defined in compat.h. Solaris defines >them in sys/sysmacros.h. Where should we put them? AIX 3.x, OSF 3.2, Digital UNIX 4.0, and IRIX 5.3 define them in sys/params.h. HPUX 9.x doesn't seem to define them at all. I guess sys/params.h is the place for these. I hate polluting the name space with simple words like "MIN" and "MAX", but if it is universally done, then I guess we should do it. It will probably cut down on mailing list traffic... >6) Under Solaris, bitmap macros are defined in fs/ufs_fs.h. Under >Linux, they're only to be found in the g++ headers. Do we want them >defined under Cygwin32? All of the systems I polled had these macros in sys/param.h. >7) Solaris defines howmany in sysmacros.h and select.h. Linux defines >it in sys/param.h and sys/types.h. Where should we put them? > >8) Solaris defines roundup in sysmacros.h. Linux defines it in >sys/param.h and sys/types.h. Where should we put them? Of the systems that had this, the majority seemed to have roundup in sys/param.h. >9) Solaris doesn't define powerof2. Neither does Linux. Sounds like >we don't really need it for Cygwin32 unless it's a common MS define. I only found it in param.h for Digital UNIX 4.0. >> - sys/time.h does not define the POSIX timespec structure or operations >> on it, and does not define the CLOCK_{RELTIME,VIRTUAL,PROF} constants. > >Linux doesn't seem to define the CLOCK_ constants or the timespec >structure. Solaris does. Do we want them? The only common CLOCK_ constant I found was CLOCKS_PER_SEC. That was only in a couple of systems that I polled. I think that modern UNIXes provide this information via sysconf. >Linux and Solaris don't define timeradd or timersub in time.h. They >do define the others. Are timeradd and timersub worth adding? I don't see those definitions in any of the systems that I have access to. >> - sys/types is missing the "unchar" and "ulong" definitions in >> the System V compatibility section. It also does not have >> U_quad_t,quad_t and quaddr_t definitions: >> >> +typedef unsigned char unchar; /* System V compatibility */ >> +typedef unsigned long ulong; /* System V compatibility */ unchar is, by no means, universal. ulong is. I don't see any harm in adding unchar, though. >I'll look into adding these. > >> +/* XXX these were outside of !POSIX in BSD - is this right? */ >> +typedef u_int64_t u_quad_t; >> +typedef int64_t quad_t; >> +typedef quad_t * quaddr_t; > >These aren't defined by Solaris or Linux. Probably should leave them >out? I could only find them on IRIX and Digital UNIX 4.0. I don't see any harm in adding them, though. cgf