Index: objc/runtime.h =================================================================== --- objc/runtime.h (revision 37015) +++ objc/runtime.h (working copy) @@ -188,17 +188,30 @@ -#ifndef YES -# define YES ((BOOL)1) +#if __has_feature(objc_bool) +# ifndef YES +# define YES __objc_yes +# endif +# ifndef NO +# define NO __objc_no +# endif +#else +# ifndef YES +# define YES ((BOOL)1) +# endif +# ifndef NO +# define NO ((BOOL)0) +# endif #endif -#ifndef NO -# define NO ((BOOL)0) -#endif #ifdef __GNUC # define _OBJC_NULL_PTR __null #elif defined(__cplusplus) -# define _OBJC_NULL_PTR 0 +# if __has_feature(cxx_nullptr) +# define _OBJC_NULL_PTR nullptr +# else +# define _OBJC_NULL_PTR 0 +# endif #else # define _OBJC_NULL_PTR ((void*)0) #endif