diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
commit | ec7df03c867d28316708e9b91bec5cef0aee832e (patch) | |
tree | 3f560939b745032e235d9ac789c4117d669d6462 /source/creator/creator.c | |
parent | 4c318539b2f6abdf8f2a02376b6fcb8d30a4b12e (diff) |
Warning fixes, one actual bug found in sequencer sound wave drawing. Also
changed some malloc to MEM_mallocN while trying to track down a memory leak.
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 2ad3881a4a0..c3bf8968650 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -26,6 +26,12 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +#if defined(__linux__) && defined(__GNUC__) +#define _GNU_SOURCE +#include <fenv.h> +#endif + #include <stdlib.h> #include <string.h> @@ -35,10 +41,6 @@ #include <unistd.h> #endif -#ifdef __linux__ -#include <fenv.h> -#endif - /* This little block needed for linking to Blender... */ #include "MEM_guardedalloc.h" @@ -350,7 +352,7 @@ static int set_fpe(int argc, char **argv, void *data) * set breakpoints on fpe_handler */ signal(SIGFPE, fpe_handler); -#ifdef __linux__ +#if defined(__linux__) && defined(__GNUC__) feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW ); #endif #endif |