[vlc-devel] [PATCH 1/6] OS/2 needs __STDC_xxx_MACROS even if C++11 mode
Rémi Denis-Courmont
remi at remlab.net
Tue Jul 7 09:04:34 CEST 2015
Le 2015-07-07 07:40, KO Myung-Hun a écrit :
> Rémi Denis-Courmont wrote:
>> Le lundi 06 juillet 2015, 17:03:20 KO Myung-Hun a écrit :
>>> ---
>>> include/vlc_fixups.h | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
>>> index 0a7b2aa..b3e1577 100644
>>> --- a/include/vlc_fixups.h
>>> +++ b/include/vlc_fixups.h
>>> @@ -28,7 +28,8 @@
>>>
>>> /* C++11 says there's no need to define __STDC_*_MACROS when
>>> including
>>> * inttypes.h and stdint.h. */
>>> -#if defined (__cplusplus) && (!defined(HAVE_CXX11) ||
>>> defined(__MINGW32__))
>>> +#if defined (__cplusplus) && \
>>> + (!defined(HAVE_CXX11) || defined(__MINGW32__) ||
>>> defined(__OS2__))
>>> # ifndef __STDC_FORMAT_MACROS
>>> # define __STDC_FORMAT_MACROS 1
>>> # endif
>>
>> I do not see how it is a property of "OS/2" that your specific
>> version of GCC
>> has broken or incomplete support for C++11.
>>
>
> Good point. However, this is not a problem of gcc, but of libc.
That is an implementation detail. The compiler can provide header
files, especially for parts that do not depend on the OS, such as the
type system.
> Anyway, there are no compilers enough to compile VLC other than
> gcc on OS/2.
I don't care. The point is, do not enable C(++)11 if your environment
does not support it. VLC is not the place to hack around all the
possible ways that C11/C++11 is incomplete in older compiler versions.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list