lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Apr 28, 2014 at 06:31:21PM -0700, Tim Hill wrote:
> 
>    On Apr 28, 2014, at 5:44 PM, Philipp Janda <[1]siffiejoe@gmx.net>
>    wrote:
> 
>    Am 29.04.2014 02:08 schröbte William Ahern:
> 
>      POSIX.1-2008 requires stdio.h to define off_t:
>      The <stdio.h> header shall define the following data types through
>      typedef:
>      ...
>      off_t
>      As described in <sys/types.h>.
>      However, OS X is certified as POSIX.1-2001 compliant, where only
>      fpos_t was
>      required to be defined by stdio.h.
> 
>    OT, but is it only me who shudders at the byzantine mess the C standard
>    header files have become?
> 
>    --Tim

They've been getting better overtime, IMO, not worse. Once upon a time best
practice was to require the API _user_ to include all the necessary header
dependencies (and some grey beards on comp.lang.c, for example, still
recommend this in general). But over time POSIX moved toward requiring the
environment to include all the dependencies. So things are much better
today. POSIX.1-2008 is an improvement over -2001, which was an improvement
over early versions. And -201x will be an improvement over -2008.

In any event, it's trivial to know the rules now that the POSIX/SuS
specification is free to read and download. It even has an index of headers,
and is otherwise extensively hyperlinked internally. It's infinitely easier
to use than asking the cargo cultists on stack overflow, or copying the sins
of github projects, which far too many programmers rely on.