For use building with non-C++11 compilers, or broken stdlib definitions.
In the absence of nullptr we define it to be a synonym for NULL.
Also, removethe old hack defining NULL in terms of nullptr. It has never
worked properly and C++11 compilers define NULL explicitly.
AC_MSG_RESULT(yes)], [
HAVE_NULLPTR=no
AC_MSG_RESULT(no)])
- if test "x$HAVE_NULLPTR" = xyes; then
- AC_DEFINE(HAVE_NULLPTR, 1, [Define to 1 if nullptr is supported])
+ if test "x$HAVE_NULLPTR" = xno; then
+ AC_DEFINE(nullptr, NULL, [Leave undefined if nullptr is supported])
fi
AC_MSG_CHECKING([whether nullptr_t is supported])
AC_TRY_COMPILE([#include <cstddef>],[typedef nullptr_t peng;], [
#endif
#ifndef NULL
-#if defined(__cplusplus) && HAVE_NULLPTR
-#define NULL nullptr
-#else
#define NULL 0
#endif
-#endif
#endif /* SQUID_TYPES_H */