From 3565eacf878f57dd49246bb0e36193250d20e569 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Mon, 18 Mar 2019 20:28:18 +1000 Subject: [PATCH] Include cstddef and cstdint (rather than C versions) for C++ compiler on macOS and Linux --- auto/src/glew_head.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h index 742f27f..ad48840 100644 --- a/auto/src/glew_head.h +++ b/auto/src/glew_head.h @@ -140,15 +140,26 @@ typedef _W64 int ptrdiff_t; * (mem, 2004-01-04) */ -#include +#if defined(__APPLE__) || defined(__linux__) +# if defined(__cplusplus) +# include +# include +# else +# include +# include +# endif +#else + +# include /* SGI MIPSPro doesn't like stdint.h in C++ mode */ /* ID: 3376260 Solaris 9 has inttypes.h, but not stdint.h */ -#if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__) -#include -#else -#include +# if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__) +# include +# else +# include +# endif #endif #define GLEW_APIENTRY_DEFINED