[haiku-development] Re: patch to stdint.h and issues

  • From: "Curtis Wanner" <katisu@xxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Fri, 14 Mar 2008 09:27:31 -0400

Ingo wrote:
> This doesn't sound right. Not that I'm an expert on this matter, but
> AFAIK
> this macro should be defined by the compiler or maybe something like
> glibc's features.h. It definitely shouldn't be defined (even
> unconditionally) in BeOS headers.

Alright, lack of experience on my part.  I question adding it in glibc's
features.h since I would expect somebody to update those files at some
point.  Although I would think that might resolve the issue I had with
WCHAR_MIN and WCHAR_MAX.

> If the respective limit macros were
> defined before, they probably should remain available regardless of
> __STDC_LIMIT_MACROS. Or maybe this macro should only be checked when
> compiling with ISO C99 compatiblity enabled.
 
Well, I could get rid of the check completely since the initial file didn't
check either.  This leads me to question about whether I should be checking
for __STDC_CONSTANT_MACROS in stdint.h and also __STDC_FORMAT_MACROS in
inttypes.h

I was under the impression that these macros were added in C99 (might be
mistaken).  So basically the code is using these C99 features without
complying completely with the standard.  Not that I'm saying that's not OK,
just want to be clear on it.

> > Attached are diffs to stdint.h, Mediadefs.cpp, and
> STXTTranslator.cpp.
> 
> BTW, it's generally preferred to have a single diff for a changes to
> different files, if they belong together ("svn diff" can have multiple
> arguments).

Sorry, I was actually expecting some input back on this anyway.  Thank you.

Curtis


Other related posts: