Merge pull request #168 from etamme/master

update glfw files with ifdef to get M_PI when using GCC
master
Michael Fogleman 2016-02-03 11:33:36 -05:00
commit 6e544076ef
6 changed files with 17 additions and 6 deletions

View File

@ -30,6 +30,8 @@
#if defined(_MSC_VER)
// Make MS math.h define M_PI
#define _USE_MATH_DEFINES
#elif __GNUC__
#define _GNU_SOURCE
#endif
#include <stdio.h>

View File

@ -24,6 +24,8 @@
#if defined(_MSC_VER)
// Make MS math.h define M_PI
#define _USE_MATH_DEFINES
#elif __GNUC__
#define _GNU_SOURCE
#endif
#include <math.h>

View File

@ -27,6 +27,8 @@
#if defined(_MSC_VER)
// Make MS math.h define M_PI
#define _USE_MATH_DEFINES
#elif __GNUC__
#define _GNU_SOURCE
#endif
#include <stdlib.h>

View File

@ -9,15 +9,16 @@
// (If the code seems a little bit strange here and there, it may be
// because I am not a friend of orthogonal projections)
//========================================================================
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#if defined(_MSC_VER)
// Make MS math.h define M_PI
#define _USE_MATH_DEFINES
#elif __GNUC__
#define _GNU_SOURCE
#endif
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -11,6 +11,8 @@
#if defined(_MSC_VER)
// Make MS math.h define M_PI
#define _USE_MATH_DEFINES
#elif __GNUC__
#define _GNU_SOURCE
#endif
#include <stdio.h>

View File

@ -30,13 +30,15 @@
//
//========================================================================
#include <GLFW/glfw3.h>
#if defined(_MSC_VER)
// Make MS math.h define M_PI
#define _USE_MATH_DEFINES
#elif __GNUC__
#define _GNU_SOURCE
#endif
#include <GLFW/glfw3.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>