This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: conformtest: clean up POSIX expectations for sys/mman.h, sys/stat.h, sys/types.h


On Wed, 11 Jun 2014, Siddhesh Poyarekar wrote:

> On Thu, May 15, 2014 at 09:43:05PM +0000, Joseph S. Myers wrote:
> > diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data
> > index 0555fd1..3a88684 100644
> > --- a/conform/data/sys/mman.h-data
> > +++ b/conform/data/sys/mman.h-data
> > @@ -39,8 +39,10 @@ optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info
> >  optional-function int posix_typed_mem_open (const char*, int, int)
> >  # endif
> >  
> > +# ifndef POSIX
> >  type size_t
> >  type off_t
> > +# endif
> 
> The earliest POSIX I could access (2001) as this text:
> 
>     The size_t and off_t types are defined as described in
>     <sys/types.h>.
> 
> Since I didn't have a copy of the POSIX 1995/6, Carlos suggested I
> look at the next best available thing, which was the Susv1 and that
> too had the same text.  Wouldn't that make this change incorrect?

No.  POSIX.1:1995/6 does not have the header definition manpages from the 
Single Unix sequence of documents that were used as a basis for 2001 and 
later editions of POSIX, and those often include things that weren't in 
earlier versions of POSIX - not always XSI-conditional.  (In particular, 
cases where a function prototype uses a type have typically moved towards 
POSIX requiring that type to be defined in the header using it, rather 
than allowing the function to be declared with an implementation-namespace 
version __*_t without *_t itself being defined.  Other cases, such as 
where there was a permission for a header to include several other 
complete headers because of a few types used from those headers, have more 
often remained XSI-conditional.)

* These types are not listed in Annex C (not normative and not always to 
be trusted, but a good starting point for indications of what goes in each 
header before going through relevant normative content in more detail).

* The sys/mman.h header definition (section 12) lists various functions 
and constants but does not say anything about types being defined in this 
header (they are of course permitted, as part of the general permission to 
define *_t types in all POSIX headers).

> >  type suseconds_t
> >  # endif
> > +# ifndef POSIX
> >  type time_t
> 
> The Susv1 has time_t in sys/types.h.

Table 2-1 in POSIX.1:1995/6, listing sys/types.h contents, does not.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]