I am not sure I would put it that way.  The POSIX headers are part of
the "implementation," so they are permitted to use the reserved
namespace.  Since mynewt code needs to build in sim (POSIX) and also
freestanding implementations, it is probably best to respect both
standards in our code.

Chris

On Tue, Apr 26, 2016 at 09:31:55AM -0700, Sterling Hughes wrote:
> 
> 
> On 4/26/16 9:22 AM, Christopher Collins wrote:
> > On Tue, Apr 26, 2016 at 09:06:37AM -0700, Sterling Hughes wrote:
> >> I think we do need a naming convention here - I'm fine adopting H_*.
> >> I'll point out that almost every POSIX or LIBC header I've ever seen
> >> uses underscore, and I believe this is only reserved in C++ -- that
> >> said, we need to be friendly to C++, and as you point out, we should
> >> follow a defined behavior.
> >
> > These identifiers are reserved in C as well.  From 7.1.3 of n1570:
> >
> >      All identifiers that begin with an underscore and either an
> >      uppercase letter or another underscore are always reserved for for
> >      any use.
> >
> > (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf)
> >
> 
> Hrm, you're right.  There are a lot of POSIX headers that have undefined 
> behavior. :-)
> 
> Sterling

Reply via email to