update glfw files with ifdef to get M_PI when using GCC

master
Eric Tamme 2016-02-03 08:54:08 -07:00
parent 6cf76d4b4a
commit 7e34bdd5bf
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>